Topics

#v5dot2 #Beta #linux #linux #v5dot2 #beta


martinmenow
 

Hi everyone,

just happy to see the beta released and very exited to test ...

I tried to install Beta 1.0 at opensuse leap 15.1 ... and had same problems of deps like with libwebkitgtk ...

rpm -ivh --test xtrkcad-setup-5.2.0Beta1.0-1.x86_64.rpm
error: Failed dependencies:
        libwebkitgtk-1.0.so.0()(64bit) is needed by xtrkcad-5.2.0Beta1.0-1.x86_64
        libzip.so.4()(64bit) is needed by xtrkcad-5.2.0Beta1.0-1.x86_64
        webkitgtk is needed by xtrkcad-5.2.0Beta1.0-1.x86_64

opensuse has only following packages ...

libwebkit2gtk3-lang-2.28.2-lp151.2.18.1.noarch
libwebkit2gtk-4_0-37-2.28.2-lp151.2.18.1.x86_64

Thanks
Martin


Adam Richards
 


Adam Richards
 
Edited

BTW - I am not familiar with how packaging is done for Linux - I imagine from this thread that is like Mac was before we started running the gtk-bundler and turning it into a Mac "app" in a .dmg.

At that time the Mac user was expected to install a set of libraries as pre-reqs and they usually had to be in the same place that they were on the building machine. I'm wondering about this because, if that is true, we might want to add text to the README.md for Linux users to describe the pre-reqs. 

Adam


Adam Richards
 
Edited

Martin and I chatted a bit about this. 

The check made for gtkwebkit-1.0 libraries in the Makefiles will pull up v2.24 which is the last GtkWebLib to support GTK2. So that is reasonable as we are on GTK2. The xhelp file uses the gtkweb2kit - a different second API which is also included that level (last one to support the older API as well). This is an older version of the webkit than current - because all current ones use GTK3 - which is a V6 thought for us.

In the Linux distribution file there is a dependency noted for gtkweblib-devel - which is not exactly the same (we think). So perhaps someone familiar with the Linux build can take a look. 

In all cases, the code can be built to simply use the system browser instead. This loses the contents-in-a-different-frame facility, however.

Here's a link that somewhat explains the complex library, API and dependency situation https://lwn.net/Articles/730185/

Adam


Chris Prior
 

Hi
Thought I'd give this a try. 
However - will not start due to missing libzip.so.4
My system is Gentoo/KDE Plasma and my system has libzip.so.5
Any ideas whether the program can be made to work with a newer libzip?

Chris


Adam Richards
 

Chris, 
Not an expert - but the bottom of this link suggests something you could try. https://askubuntu.com/questions/950774/error-while-loading-shared-libraries-libzip-so-2
Adam


Chris Prior
 

Creating the soft link worked for libzip - but now there is a problem with a mixture of gtk2 and gtk3 files.
I tried to create the link for libwebkitgtk.so.4 as per the error message when running xtrkcad, but this brings up the mixed gtk2/3 issue.
As my system has gtk3 libraries, I am guessing my test is over until v6 arrives (although I am running 5.1 2a quite happily - but I think this was compiled from source).

Is the source for the beta available?

Chris


Adam Richards
 

Yes, as always - you can clone the sourceforge xtrkcad-fork using mercurial. The Beta 1.0 is tagged in the tree.

And yes, no GTK3 libs please - you can't symlink your way out of that! For that I would believe your distro/packager should allow a webkit2gtk 1.0 release to be installed -> which is actually v2.24, the last to support GTK2.

Adam


On Tue, Jun 2, 2020 at 9:36 AM Chris Prior <cmprior@...> wrote:
Creating the soft link worked for libzip - but now there is a problem with a mixture of gtk2 and gtk3 files.
I tried to create the link for libwebkitgtk.so.4 as per the error message when running xtrkcad, but this brings up the mixed gtk2/3 issue.
As my system has gtk3 libraries, I am guessing my test is over until v6 arrives (although I am running 5.1 2a quite happily - but I think this was compiled from source).

Is the source for the beta available?

Chris



--
Adam Richards


Alan Cox
 

On Sun, 31 May 2020 10:55:11 -0700
"Adam Richards" <@tynewydd> wrote:

Martin and I chatted a bit about this.

The check made for gtkwebkit-1.0 libraries in the Makefiles will pull up v2.24 which is the last GtkWebLib to support GTK2. So that is reasonable as we are on GTK2.
That has problems - the most obvious one being that it has a bunch of
known security holes until 2.28. On a machine with some kind of security
checking running, or on a hosting site/sharing service that runs scanning
checks you'll get a binary that is flagged up as hazardous to health,
blocked or deleted.

Alan


Chris Prior
 

I can see my current version was built without support for the webkit-gtk browser. I don't suppose there is a command line option to invoke xtrkcad that disables the browser?

Chris


Martin Fischer
 

No, this is a compile time option.

Regards,
Martin

Am 03.06.2020 um 16:28 schrieb Chris Prior:

I can see my current version was built without support for the webkit-gtk browser. I don't suppose there is a command line option to invoke xtrkcad that disables the browser?
Chris


gilles.laffite@...
 

Bonjour a tous,  Gilles laffite alias norma76 , packager openSUSE

Pour répondre à Martinmenow,   

Le rpm fournit par xtrkcad de la nouvelle Beta5.2 ne fonctionne pas directement sous opensuse 15.1. (problems fixe Library) (desktop LXQt)

Quant j'ai packagé la version 5.1.2a (dispos sur software.opensuse.org home:glaffite) soucis avec webkit.

Remplacement dans le spec avec libgtkhtml-4_0-0.fonctionnement ok. package 5.1.2a fonctionnel sous 15.1, 15.2, Tumblewed


Pour la version 5.2, il faut libzip.   je propose libzip-devel.Build opensuse me dit ok (found libzip)

Essayer en installant libzip- devel , et libgtkhtml-4_0-0 par (yast)

Webkit n'est pas obligation dans package 5.1.2a, et libwebkit2gtk fournit libwebkit2gtk3......

Je travaille actuellement sur la beta 5.2, j'ai également  des soucis. (l'interface ne fonctionne pas pourtant le build ok)

Voici mon spec:
#
# spec file for package xtrkcad version 5.2.0Beta 
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 Gilles laffite,France <gilles.laffite76@...>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
 
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
 
%define name xtrkcad
%define version 5.2.0Beta1.0
Name:    %{name}
Version: %{version}
Release: 0
License: GPL-2.0-or-later
Summary: XTrackCAD is a CAD program for designing model railroad layouts
#Summary(fr): XTrackCAD ou xtrkcad est un programme CAD de modélisme ferroviaire
Url:  http://www.xtrkcad.org
Group:  Productivity/Graphics/Other
Source: xtrkcad-source-%{version}.tar.bz2
Patch0: fix_desktop_file.patch
Patch1: fix_halibut.patch
Patch2: static_libraries.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: gtk2-devel
BuildRequires: cairo-devel
BuildRequires: libgtkhtml-4_0-0
BuildRequires: desktop-file-utils
BuildRequires: libzip-devel
BuildRequires: freeimage-devel
 
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
%description
XTrackCAD is a CAD program for designing model railroad layouts. You can easily create layout of any scale or size. Libraries for many brands of track and turnouts are included. Adding new components is easy with the built-in editor.
 
#%description -l fr
#XTrackCAD ou xtrkcad est un programme CAD de modélisme ferroviaire
 
%prep
ln -s xtrkcad-source-%{version} xtrkcad-%{version}
%setup -q -D
%patch0 -p1 -b .fix_desktop_file
%patch1 -p1 -b .fix_halibut
%patch2 -p1 -b .static_libraries
 
 
%build
%cmake \
    -DCMAKE_EXE_LINKER_FLAGS=-Wl,--as-needed -Wl,-z,now \
    -DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed \
    -DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed -Wl,-z,now
%make_jobs
 
%install
%cmake_install
 
%clean
rm -rf $RPM_BUILD_ROOT
 
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
 
%changelog

rpm build ok
essai

error terminal:
home/ # xtrkcad


 (xtrkcad:4467): Gtk-CRITICAL **: IA__gtk_window_resize: assertion 'width > 0' failed
The program 'xtrkcad' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 28234 error_code 11 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)


Bonsoir à tous..........




Dave Bullis
 

Please post your xtrkcad.rc file
Also run xtrkcad in a debugger (such as gdb) and set a breakpoint in gdk_x_error
Let us know what the traceback is

Thanks
Dave


Chris Prior
 

I have compiled the beta from source (Gentoo system)
I have the same error 

(xtrkcad:1492654): Gtk-CRITICAL **: 17:16:15.039: IA__gtk_window_resize: assertion 'width > 0' failed

The program 'xtrkcad' received an X Window System error.

This probably reflects a bug in the program.

The error was 'RenderBadPicture (invalid Picture parameter)'.

  (Details: serial 69597 error_code 141 request_code 138 minor_code 8)

  (Note to programmers: normally, X errors are reported asynchronously;

   that is, you will receive the error a while after causing it.

   To debug your program, run it with the --sync command line

   option to change this behavior. You can then get a meaningful

   backtrace from your debugger if you break on the gdk_x_error() function.)

Chris


Dave Bullis
 

The file you posted contains
#include <windows.h>
#include "mswlib.h"
 
0 ICON xtrkcad.ico

I'm looking for $HOME/.xtrkcad/xtrkcad.rc

Also the backtrace would be very usefull.

Dave


Chris Prior
 

I have just tried this again. I removed the .xtrkcad folder from my $HOME directory. Same error.
I ran with the --sync option and got the further information:
(xtrkcad:1671610): Gtk-CRITICAL **: 15:29:21.702: IA__gtk_window_resize: assertion 'width > 0' failed
The program 'xtrkcad' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 109430 error_code 11 request_code 53 minor_code 0)

I am running xtrkcad directly from the bin directory where I compiled the program as I have the older version installed in the usr/local/bin directory.
running gdb seems not to produce anything useful.


Adam Richards
 

Chris, 
Given your include <Dave says> has mswlib.h in it, and you are getting GTK messages, that's odd for a start.  

One assumes from the messages that the windows was being resized (maybe initially set) and the size requested was such that the memory allocation for buffers, etc, failed.  Then GTK gets upset because the window object is not set (zero/NULL).  What memory size was the application given?

Do any of the windows show at startup and this is later, or is this before the MainWindow is shown?

Adam


Chris Prior
 

Little bit of further information.
Having removed the previous $HOME/.xtrkcad directory, I note that having run the program afresh, only the ./xtrkcad directory was created. NO files have been placed there - there is no xtrkcad.rc in place.

Chris


Chris Prior
 

A splash screen starts with the program logo and then it disappears. I have a 2 monitor system with it configured as an extended desktop.
As regards the compilation details:
I cloned the repository with the Beta tag.
Then ran cmake from the source directory followed by make.
There were no compile errors or warnings.
Are there any cmake files that would help?
Also, is it possible the program stalls because I have not run 'make install' and perhaps something is not being set properly?
I didn't really want to overwrite the installed 5.1 2 version but I perhaps can if that would help.

Chris


Adam Richards
 

Yes - "make install" is required.  Make on its own compiles into the build directory but does not linkedit it together, AFAIK, and then move all the parts into the install directory.  I would make sure that CMAKE_INSTALL_DIRECTORY in the cmake is set to install to somewhere of your choosing - so you don't overwrite 5.1.2a. 

Rather than CMake, using CCMake before the "make install" (you can just do that as one step) would enable you to know and change what all the build settings you have are set to interactively. 

Adam