Problem to compile source code with openSuSE 15.0

Get help for specific problems
User avatar
Posts: 2
Joined: 13 Jan 2019

M158m15

hello community,
to compile the souce code of FreeFileSync was not possible for me. What did I make wrong ? What does not work with SuSE 15.0 ? First I did download the newest version of FFS 10.9. Then I did extract it to my download directory.
 srv15:/home/han/Downloads/FreeFileSync/Source # cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.0"
Then I tried to compile it. But it does not work at all. Does anybody know what I made wrong ?
srv15:/home/han/Downloads/FreeFileSync/Source # ll
insgesamt 2432
-rw-r--r-- 1 han users    7834 17. Feb 11:51 Bugs.txt
-rwxr-xr-x 1 han users  109264 10. Feb 10:33 Changelog.txt
drwxr-xr-x 4 han users    4096 10. Feb 10:33 FreeFileSync
-rw-r--r-- 1 han users 2302331  2. Mär 19:22 FreeFileSync_10.9_Source.zip
-rwxr-xr-x 1 han users   41834 10. Feb 10:33 License.txt
drwxr-xr-x 2 han users    4096 10. Feb 10:33 wx+
drwxr-xr-x 3 han users    4096 10. Feb 10:33 xBRZ
drwxr-xr-x 2 han users    4096 10. Feb 10:33 zen
drwxr-xr-x 3 han users    4096 10. Feb 10:33 zenXml
srv15:/home/han/Downloads/FreeFileSync/Source #
try with "make"
srv15:/home/han/Downloads/FreeFileSync/Source/FreeFileSync/Source # make
mkdir -p /tmp/FreeFileSync_x86_64_Make/ffs/src/base/
g++ -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -DLIBSSH2_OPENSSL -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread `pkg-config --cflags openssl` `pkg-config --cflags libcurl` `pkg-config --cflags libssh2` `pkg-config --cflags gtk+-2.0` -isystem/usr/include/gtk-2.0 -c base/algorithm.cpp -o /tmp/FreeFileSync_x86_64_Make/ffs/src/base/algorithm.cpp.o
/bin/sh: wx-config: Kommando nicht gefunden.
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openssl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libssh2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssh2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libssh2' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
cc1plus: warning: /usr/include/gtk-2.0: Datei oder Verzeichnis nicht gefunden [-Wmissing-include-dirs]
In file included from base/algorithm.h:13:0,
                 from base/algorithm.cpp:7:
base/process_xml.h:10:10: fatal error: wx/gdicmn.h: Datei oder Verzeichnis nicht gefunden
 #include <wx/gdicmn.h>
          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:124: /tmp/FreeFileSync_x86_64_Make/ffs/src/base/algorithm.cpp.o] Fehler 1
srv15:/home/han/Downloads/FreeFileSync/Source/FreeFileSync/Source #
Posts: 306
Joined: 7 Jan 2018

bgstack15

The obvious errors I see include
/bin/sh: wx-config: Kommando nicht gefunden.
No package 'openssl' found
No package 'libcurl' found
And the similar ones.
To compile something from source code, you need to provide the development headers of the dependencies. Obviously here, the dependencies include openssl and libcurl. I don't know how openSuSE names their packages, and distrowatch doesn't list the development packages (link) so you will want to check for openssl-dev or openssl-devel (or possibly even libssl-dev) in your package manager. wx-config comes from a wxGTK-devel package or similar.

For my complete buildrequires on Fedora:
BuildRequires: boost-devel
BuildRequires: compat-wxGTK3-gtk2-devel
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: ImageMagick
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(zlib)
BuildRequires: libcurl-devel %{min_libcurl}
BuildRequires: libssh2-devel %{min_libssh2}
BuildRequires: wxGTK-devel
BuildRequires: %{scl_buildreq}
BuildRequires: openssl-%{name}-devel %{min_openssl}
BuildRequires: openssl-devel
Source: my own Centos/Fedora rpm spec
I confess I don't quite understand the pkgconfig() components. I think basically it is an attribute of whichever is the development header package of the named package, i.e., the zlib-devel rpm has an attribute: "Provides: pkgconfig(zlib)." The names in Fedora are fairly straightforward and this should get you on your way to finding the right packages in openSuSE.

wx-config acts similar to pkgconf --libs, and I'm pretty sure is included in Fedora's wxGTK-devel.

Ah-ha! I found an openSUSE rpm spec file which should be incredibly useful here, albeit it was for FreeFileSync 10.7 so you'll need to add the openssl-dev and libssh2-dev and libcurl-dev.
User avatar
Posts: 2
Joined: 13 Jan 2019

M158m15

hello bgstack15
thank you so much for your help.
I did follow your suggest and downloaded from the suse repositories the FFS rpm file.
the installation of this rpm-file on my opensuse 15.0 was successful.
just for fun -- the compilation of the source code is still not working, but the amount of errors
did decrease enormous.
srv15:/home/han/Downloads/FreeFileSync/Source/FreeFileSync/Source # make
mkdir -p /tmp/FreeFileSync_x86_64_Make/ffs/src/base/
g++ -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -DLIBSSH2_OPENSSL -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread `pkg-config --cflags openssl` `pkg-config --cflags libcurl` `pkg-config --cflags libssh2` `pkg-config --cflags gtk+-2.0` -isystem/usr/include/gtk-2.0 -c base/algorithm.cpp -o /tmp/FreeFileSync_x86_64_Make/ffs/src/base/algorithm.cpp.o
In file included from base/../fs/abstract.h:13:0,
                 from base/structures.h:14,
                 from base/file_hierarchy.h:19,
                 from base/algorithm.h:11,
                 from base/algorithm.cpp:7:
../../zen/serialize.h:35:45: error: ‘byte’ is not a member of ‘std’
     using value_type     = std::vector<std::byte>::value_type;
                                             ^~~~
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:124: /tmp/FreeFileSync_x86_64_Make/ffs/src/base/algorithm.cpp.o] Fehler 1
best regards
M158m15
Posts: 306
Joined: 7 Jan 2018

bgstack15

I had a vaguely similar issue on Devuan regarding the "(something) is not a member of `std`" error. I think it has something to do with the way that distro packaged the C++ standard libraries. Check out https://stackoverflow.com/a/52570365/3569534.
Relevant bits, in case the link dies:

Add #include <cstddef> into serialize.h and ring_buffer.h
cd ../../zen/
grep -q -F '<cstddef>' serialize.h || sed -i '1s/^/#include <cstddef>\n/' serialize.h
grep -q -F '<cstddef>' ring_buffer.h || sed -i '1s/^/#include <cstddef>\n/' ring_buffer.h