Closed lgbaldoni closed 3 years ago
I reached a solution on completing a build under OpenSUSE Tumbleweed DockerHub container, which uses CMake and latest wxWidgets:
xhost +local:root
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix opensuse/tumbleweed bash
# Install needed dependencies
zypper install git-core cmake gcc-c++ zlib-devel libcryptopp-devel \
glibc-locale wxWidgets-3_2-devel xorg-x11-fonts-core xorg-x11-fonts
mkdir app; cd app
# Create a folder and clone amule
git clone https://github.com/amule-project/amule.git
# Go into amule folder and build
cd amule
cmake . -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build -j`nproc`
cmake --install build
/usr/local/bin/amule
Another solution would not use CMake and would install the proposed wxWidgets version:
xhost +local:root
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix opensuse/tumbleweed bash
# Install needed dependencies
zypper install git-core cmake gcc-c++ zlib-devel libcryptopp-devel autoconf \
automake libtool diffutils libupnp-devel wget glibc-locale wxGTK-devel \
xorg-x11-fonts-core xorg-x11-fonts
mkdir app; cd app
# Clone GeoIP
git clone https://github.com/maxmind/geoip-api-c.git
cd geoip-api-c
# Build GeoIP
./bootstrap
./configure
make -j`nproc`
make install
cd ..
# Download wxGTK 2.8
wget https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxGTK-2.8.12.tar.gz
tar xvzf wxGTK-2.8.12.tar.gz
cd wxGTK-2.8.12/
export CFLAGS=-std=c99 CXXFLAGS=-std=c++98
./configure --prefix=/usr --with-gtk --enable-unicode --disable-compat24 --enable-optimise
make -j`nproc`
make install
ldconfig
cd ..
# Create a folder and clone amule
git clone https://github.com/amule-project/amule.git
# Go into amule folder and build
cd amule
./autogen.sh
./configure --disable-debug --enable-geoip --enable-optimize --with-wxversion=2.8.12
make -j`nproc`
make install
/usr/local/bin/amule
xhost
and docker
lines above.sudo
if you are not root for the needed commands.Not really. We have 2 problems here:
First:
-DAVIF_DLL __GD__
There is just a -D missing. Or more precise, AVIF_DLL is too much, and occupies the -D of GD. You just don't catch this, as you don't enable cas, so it can't fail.
Second:
undefined reference to `wxTheAssertHandler'
As wx-detection is just in rewriting process, it no surprise that it fails. Plus you are using wx-3.2 with cmake and 2.8 with autotools. Hopefully my fix will also detect what has change for usage with 3.2.
Btw. is it really a solution to run it in docker or mix system and selfcompiled libs with all the hustle of keeping all LD_PATH and stuff clean for the system at all? I mean, if you would suggest static linking, it would work, but this solution has so much potential to mess the system of unexperienced users, that I would call it negligent sabotage.
First:
-DAVIF_DLL __GD__
There is just a -D missing. Or more precise, AVIF_DLL is too much, and occupies the -D of GD. You just don't catch this, as you don't enable cas, so it can't fail.
Sorry, I'm passing -DBUILD_CAS=ON to cmake. Are you saying I shouldn't?
Or just add the -D here ?
Second:
undefined reference to `wxTheAssertHandler'
As wx-detection is just in rewriting process, it no surprise that it fails. Plus you are using wx-3.2 with cmake and 2.8 with autotools. Hopefully my fix will also detect what has change for usage with 3.2.
I'm pretty sure I'm using 3.0 for both autotools and cmake.
The log shows cmake detecting it as 3.0.5 and wx-config --version
as 3.0.3, but I believe that's the only inconsistency.
Btw. is it really a solution to run it in docker or mix system and selfcompiled libs
Docker or static libs is not acceptable for inclusion as rpm package. At least on OBS.
Sorry, I'm passing -DBUILD_CAS=ON to cmake. Are you saying I shouldn't?
Nope, if you want cas you surely should, sisco didn't, so he can't compare.
I'm pretty sure I'm using 3.0 for both autotools and cmake
Again this wasn't meant as answer to you post. Your catch is correct, and the fix will come.
Btw. is it really a solution to run it in docker or mix system and selfcompiled libs
Docker or static libs is not acceptable for inclusion as rpm package. At least on OBS.
I know, just wanted to make sure everyone get's that. docker/flat/snap is the new fancy thing that enables users to adjust their system to satisfy a broken pieces needs. Does it work? Sure. Is his a solution? Hell no.
Hello @lgbaldoni , as stated in the comments on the solution part, using Docker is not needed, just remove the Docker lines. I had to use Docker just for testing purposes that the solution works under a simulated OpenSuse environment as I currently use Ubuntu 😀.
I think the problem is different from the one described in https://github.com/amule-project/amule/issues/261.
First of all, autotools builds correctly using the same dependencies. I have a build failure due to a seemingly badly passed definition to the compiler on openSUSE Tumbleweed (the rolling release):
And a linking error at the end with openSUSE Leap (the stable release), partial snippet:
Full build logs here.