SLADE icon indicating copy to clipboard operation
SLADE copied to clipboard

Slade won't build on RPM Linux Distributions

Open Zombie-Ryushu opened this issue 5 years ago • 25 comments

Slade won't build on RPM Linux Distributions. Problems range from being unable to locate wxWidgets, to having multiple linking issues.

Zombie-Ryushu avatar Apr 17 '19 00:04 Zombie-Ryushu

multiple linking issues

On Arch too

axredneck avatar Apr 17 '19 12:04 axredneck

Are you building from master branch?

SteelT1 avatar Apr 17 '19 14:04 SteelT1

Yes, i did (slade-git package from AUR) before bug #1039 appeared and made things even worse.

axredneck avatar Apr 17 '19 16:04 axredneck

p.s. "Stable" branch builds and links ok for me.

axredneck avatar Apr 17 '19 16:04 axredneck

I am unable to build neither 3.1.4 or git master.

Here is an example when trying to build on Mageia Cauldron x86_64 using gcc 8.3.1. http://kekepower.com/slade.log.html

Here is when trying to build with Clang 8.0. http://kekepower.com/slade/build.0.20190419083701.log

This helped a little with Stable 3.1.4: sed -i 's|external \${ZLIB_LIBRARY}|external \${ZLIB_LIBRARY} \${wxWidgets_LIBRARIES} \${CURL_LIBRARIES}|' src/External/CMakeLists.txt

And this is the same, but for git master: sed -i 's|external \${ZLIB_LIBRARY}|external \${ZLIB_LIBRARY} \${wxWidgets_LIBRARIES} \${CURL_LIBRARIES}|' thirdparty/CMakeLists.txt

kekePower avatar Apr 19 '19 08:04 kekePower

Seems like ${SLADE_HEADERS} doesn't get exported or something in https://github.com/sirjuddington/SLADE/blob/050f761b641295ebe9365e38d54a6ac972b1f268/thirdparty/CMakeLists.txt#L31

Still failed, but my build got a little further with this change:

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index caee43dc..973d5bfe 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -183,6 +183,7 @@ target_link_libraries(slade
        ${FREETYPE_LIBRARIES}
        ${GLEW_LIBRARY}
        ${CURL_LIBRARIES}
+       ${SLADE_HEADERS}
 )

 if (WX_GTK3)

kekePower avatar Apr 19 '19 09:04 kekePower

Compiles and links for me now. Arch Linux. @Zombie-Ryushu does it compile for you?

axredneck avatar Apr 28 '19 16:04 axredneck

I have not tried yet.

Zombie-Ryushu avatar Apr 28 '19 22:04 Zombie-Ryushu

Git master from April 26. Same issues with under-linking.

kekePower avatar Apr 30 '19 18:04 kekePower

Is this issue fixed now? I have been able to build it fine on linux for a while

sirjuddington avatar Jun 04 '19 03:06 sirjuddington

No it isn't.

Zombie-Ryushu avatar Jun 04 '19 03:06 Zombie-Ryushu

What branch are you building and what errors are you getting?

sirjuddington avatar Jun 04 '19 03:06 sirjuddington

I personally have not built the package recently. I am working with kekePower which is a distribution maintainer for Mageia Linux (he has the ability to commit directly to the distro and I do not.)

Since he has not told me what if anything has changed, I can only assume that it is the same build errors as listed above.

The Target Distribution is Mageia Linux 6.

Zombie-Ryushu avatar Jun 04 '19 04:06 Zombie-Ryushu

First a correction. The Target Distribution is Mageia Linux 7. This is what I get from the latest git master cloned 5 minutes ago.

cmake -G"Unix Makefiles" \
        -DNO_WEBVIEW=ON \
        -DWX_GTK3=OFF \
        -DCL_WX_CONFIG=/usr/bin/wx-config
[ 32%] Linking CXX shared library libexternal.so
cd /home/stig/Downloads/mgarepo/slade/SOURCES/SLADE/build/src/external && /usr/bin/cmake -E cmake_link_script CMakeFiles/external.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -O3 -ffast-math -march=sandybridge -mtune=sandybridge -O3 -DNDEBUG  -shared -Wl,-soname,libexternal.so -o libexternal.so CMakeFiles/external.dir/dumb/core/atexit.o CMakeFiles/external.dir/dumb/core/duhlen.o CMakeFiles/external.dir/dumb/core/duhtag.o CMakeFiles/external.dir/dumb/core/dumbfile.o CMakeFiles/external.dir/dumb/core/loadduh.o CMakeFiles/external.dir/dumb/core/makeduh.o CMakeFiles/external.dir/dumb/core/rawsig.o CMakeFiles/external.dir/dumb/core/readduh.o CMakeFiles/external.dir/dumb/core/register.o CMakeFiles/external.dir/dumb/core/rendduh.o CMakeFiles/external.dir/dumb/core/rendsig.o CMakeFiles/external.dir/dumb/core/unload.o CMakeFiles/external.dir/dumb/helpers/barray.o CMakeFiles/external.dir/dumb/helpers/clickrem.o CMakeFiles/external.dir/dumb/helpers/fir_resampler.o CMakeFiles/external.dir/dumb/helpers/lpc.o CMakeFiles/external.dir/dumb/helpers/memfile.o CMakeFiles/external.dir/dumb/helpers/resample.o CMakeFiles/external.dir/dumb/helpers/resampler.o CMakeFiles/external.dir/dumb/helpers/riff.o CMakeFiles/external.dir/dumb/helpers/sampbuf.o CMakeFiles/external.dir/dumb/helpers/silence.o CMakeFiles/external.dir/dumb/helpers/stdfile.o CMakeFiles/external.dir/dumb/helpers/tarray.o CMakeFiles/external.dir/dumb/it/itload.o CMakeFiles/external.dir/dumb/it/itload2.o CMakeFiles/external.dir/dumb/it/itmisc.o CMakeFiles/external.dir/dumb/it/itorder.o CMakeFiles/external.dir/dumb/it/itread.o CMakeFiles/external.dir/dumb/it/itread2.o CMakeFiles/external.dir/dumb/it/itrender.o CMakeFiles/external.dir/dumb/it/itunload.o CMakeFiles/external.dir/dumb/it/load669.o CMakeFiles/external.dir/dumb/it/load6692.o CMakeFiles/external.dir/dumb/it/loadamf.o CMakeFiles/external.dir/dumb/it/loadamf2.o CMakeFiles/external.dir/dumb/it/loadany.o CMakeFiles/external.dir/dumb/it/loadany2.o CMakeFiles/external.dir/dumb/it/loadasy.o CMakeFiles/external.dir/dumb/it/loadasy2.o CMakeFiles/external.dir/dumb/it/loadmod.o CMakeFiles/external.dir/dumb/it/loadmod2.o CMakeFiles/external.dir/dumb/it/loadmtm.o CMakeFiles/external.dir/dumb/it/loadmtm2.o CMakeFiles/external.dir/dumb/it/loadokt.o CMakeFiles/external.dir/dumb/it/loadokt2.o CMakeFiles/external.dir/dumb/it/loadoldpsm.o CMakeFiles/external.dir/dumb/it/loadoldpsm2.o CMakeFiles/external.dir/dumb/it/loadpsm.o CMakeFiles/external.dir/dumb/it/loadpsm2.o CMakeFiles/external.dir/dumb/it/loadptm.o CMakeFiles/external.dir/dumb/it/loadptm2.o CMakeFiles/external.dir/dumb/it/loadriff.o CMakeFiles/external.dir/dumb/it/loadriff2.o CMakeFiles/external.dir/dumb/it/loads3m.o CMakeFiles/external.dir/dumb/it/loads3m2.o CMakeFiles/external.dir/dumb/it/loadstm.o CMakeFiles/external.dir/dumb/it/loadstm2.o CMakeFiles/external.dir/dumb/it/loadxm.o CMakeFiles/external.dir/dumb/it/loadxm2.o CMakeFiles/external.dir/dumb/it/ptmeffect.o CMakeFiles/external.dir/dumb/it/read669.o CMakeFiles/external.dir/dumb/it/read6692.o CMakeFiles/external.dir/dumb/it/readam.o CMakeFiles/external.dir/dumb/it/readamf.o CMakeFiles/external.dir/dumb/it/readamf2.o CMakeFiles/external.dir/dumb/it/readany.o CMakeFiles/external.dir/dumb/it/readany2.o CMakeFiles/external.dir/dumb/it/readasy.o CMakeFiles/external.dir/dumb/it/readdsmf.o CMakeFiles/external.dir/dumb/it/readmod.o CMakeFiles/external.dir/dumb/it/readmod2.o CMakeFiles/external.dir/dumb/it/readmtm.o CMakeFiles/external.dir/dumb/it/readokt.o CMakeFiles/external.dir/dumb/it/readokt2.o CMakeFiles/external.dir/dumb/it/readoldpsm.o CMakeFiles/external.dir/dumb/it/readpsm.o CMakeFiles/external.dir/dumb/it/readptm.o CMakeFiles/external.dir/dumb/it/readriff.o CMakeFiles/external.dir/dumb/it/reads3m.o CMakeFiles/external.dir/dumb/it/reads3m2.o CMakeFiles/external.dir/dumb/it/readstm.o CMakeFiles/external.dir/dumb/it/readstm2.o CMakeFiles/external.dir/dumb/it/readxm.o CMakeFiles/external.dir/dumb/it/readxm2.o CMakeFiles/external.dir/dumb/it/xmeffect.o CMakeFiles/external.dir/email/wxEmailMessage.o CMakeFiles/external.dir/email/wxEmailMessageID.o CMakeFiles/external.dir/email/wxMailer.o CMakeFiles/external.dir/fmt/format.o CMakeFiles/external.dir/fmt/posix.o CMakeFiles/external.dir/lua/lapi.o CMakeFiles/external.dir/lua/lauxlib.o CMakeFiles/external.dir/lua/lbaselib.o CMakeFiles/external.dir/lua/lbitlib.o CMakeFiles/external.dir/lua/lcode.o CMakeFiles/external.dir/lua/lcorolib.o CMakeFiles/external.dir/lua/lctype.o CMakeFiles/external.dir/lua/ldblib.o CMakeFiles/external.dir/lua/ldebug.o CMakeFiles/external.dir/lua/ldo.o CMakeFiles/external.dir/lua/ldump.o CMakeFiles/external.dir/lua/lfunc.o CMakeFiles/external.dir/lua/lgc.o CMakeFiles/external.dir/lua/linit.o CMakeFiles/external.dir/lua/liolib.o CMakeFiles/external.dir/lua/llex.o CMakeFiles/external.dir/lua/lmathlib.o CMakeFiles/external.dir/lua/lmem.o CMakeFiles/external.dir/lua/loadlib.o CMakeFiles/external.dir/lua/lobject.o CMakeFiles/external.dir/lua/lopcodes.o CMakeFiles/external.dir/lua/loslib.o CMakeFiles/external.dir/lua/lparser.o CMakeFiles/external.dir/lua/lstate.o CMakeFiles/external.dir/lua/lstring.o CMakeFiles/external.dir/lua/lstrlib.o CMakeFiles/external.dir/lua/ltable.o CMakeFiles/external.dir/lua/ltablib.o CMakeFiles/external.dir/lua/ltm.o CMakeFiles/external.dir/lua/lua.o CMakeFiles/external.dir/lua/luac.o CMakeFiles/external.dir/lua/lundump.o CMakeFiles/external.dir/lua/lutf8lib.o CMakeFiles/external.dir/lua/lvm.o CMakeFiles/external.dir/lua/lzio.o CMakeFiles/external.dir/lzma/C/LzmaDec.o CMakeFiles/external.dir/mus2mid/mus2mid.o CMakeFiles/external.dir/zreaders/files.o CMakeFiles/external.dir/zreaders/i_music.o CMakeFiles/external.dir/zreaders/m_alloc.o CMakeFiles/external.dir/zreaders/music_hmi_midiout.o CMakeFiles/external.dir/zreaders/music_midistream.o CMakeFiles/external.dir/zreaders/music_mus_midiout.o CMakeFiles/external.dir/zreaders/music_smf_midiout.o CMakeFiles/external.dir/zreaders/music_xmi_midiout.o -lz
/usr/bin/ld: CMakeFiles/external.dir/lua/luac.o: in function `main':
/home/stig/Downloads/mgarepo/slade/SOURCES/SLADE/thirdparty/lua/luac.c:193: multiple definition of `main'; CMakeFiles/external.dir/lua/lua.o:/home/stig/Downloads/mgarepo/slade/SOURCES/SLADE/thirdparty/lua/lua.c:596: first defined here
/usr/bin/ld: CMakeFiles/external.dir/lua/loslib.o: in function `os_tmpname':
/home/stig/Downloads/mgarepo/slade/SOURCES/SLADE/thirdparty/lua/loslib.c:169: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
collect2: error: ld returned 1 exit status
make[2]: *** [src/external/CMakeFiles/external.dir/build.make:2113: src/external/libexternal.so] Error 1
make[2]: Leaving directory '/share/home/stig/monster/Downloads/mgarepo/slade/SOURCES/SLADE/build'
make[1]: *** [CMakeFiles/Makefile2:349: src/external/CMakeFiles/external.dir/all] Error 2
make[1]: Leaving directory '/share/home/stig/monster/Downloads/mgarepo/slade/SOURCES/SLADE/build'
make: *** [Makefile:133: all] Error 2
make: Leaving directory '/share/home/stig/monster/Downloads/mgarepo/slade/SOURCES/SLADE/build'

kekePower avatar Jun 04 '19 06:06 kekePower

Problems range from being unable to locate wxWidgets, to having multiple linking issues.

I can't even run cmake on Gentoo.

-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- cotire 1.7.9 loaded.
-- wx-config used is: /usr/bin/wx-config
-- wxWidgets version is: 3.0.4
-- gtk version is: 3
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES) (Required is at
  least version "3.0.4")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindwxWidgets.cmake:990 (find_package_handle_standard_args)
  src/CMakeLists.txt:66 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jakob/SLADE/CMakeFiles/CMakeOutput.log".
See also "/home/jakob/SLADE/CMakeFiles/CMakeError.log".

TsarFox avatar Aug 26 '19 18:08 TsarFox

Some troubles. ALT Linux, Platform 9. x86-64. Git master branch.

Arbars avatar Sep 05 '19 19:09 Arbars

Rosa succeeded.

https://abf.rosalinux.ru/import/slade/diff/6a37b...1a265

https://abf.rosalinux.ru/import/slade

Zombie-Ryushu avatar Sep 05 '19 21:09 Zombie-Ryushu

I've been able to build 3.1.8 on Mageia Cauldron today.

Here are the options I use

%cmake \
  -DUSE_WEBKIT_STARTPAGE:BOOL=ON \
  -DUSE_WX_EXCEPTION_HANDLER=0 \
  -DWX_GTK3=ON \
  -DNO_WEBVIEW=ON \
  -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-config-%{wx_ver}

The last line is crucial and every build has failed without it. I've successfully built it against wxWidgets 3.0.x and 3.1.x.

in addition to these patches, some from ROSA and some I made. Patch 1. https://svnweb.mageia.org/packages/cauldron/slade/current/SOURCES/basepk3.diff?revision=1464037&view=co&pathrev=1464040 Patch 2. https://svnweb.mageia.org/packages/cauldron/slade/current/SOURCES/slade-cmakelists.patch?revision=1464037&view=co&pathrev=1464040 Patch 3. https://svnweb.mageia.org/packages/cauldron/slade/current/SOURCES/set-external-static.patch?revision=1464037&view=co&pathrev=1464040

kekePower avatar Dec 02 '19 17:12 kekePower

Problems range from being unable to locate wxWidgets, to having multiple linking issues.

I can't even run cmake on Gentoo.

-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- cotire 1.7.9 loaded.
-- wx-config used is: /usr/bin/wx-config
-- wxWidgets version is: 3.0.4
-- gtk version is: 3
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES) (Required is at
  least version "3.0.4")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindwxWidgets.cmake:990 (find_package_handle_standard_args)
  src/CMakeLists.txt:66 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jakob/SLADE/CMakeFiles/CMakeOutput.log".
See also "/home/jakob/SLADE/CMakeFiles/CMakeError.log".

im having this same issue rn on Ubuntu 19.04. not sure what file im supposed to edit like the above person...

kay-luhb avatar Dec 22 '19 03:12 kay-luhb

@kay-luhb

The one thing that made the whole difference was this option.

$ cmake -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-3.0

kekePower avatar Dec 22 '19 10:12 kekePower

Rosa has a patch on this.

Zombie-Ryushu avatar Dec 22 '19 13:12 Zombie-Ryushu

i still cant build this. it does this:

CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- run `pk3` target to build slade.pk3
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.13)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    wxWidgets_CONFIG_EXECUTABLE


-- Build files have been written to: /home/kaleb/Downloads/SLADE-master/dist


and then if i do "make" afterwards it only makes a pk3 file and nothing else... if only DRD would update slade on their PPA. its still at 3.1.7. and flathub wants to download 600MB which i dont wanna do with my data limit, so building from source is my only option

kay-luhb avatar Dec 22 '19 20:12 kay-luhb

Does not work for me either. I get the following error:

❯ cmake .. -DwxWidgets_CONFIG_EXECUTABLE=usr/bin/wx-config
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- cotire 1.7.9 loaded.
-- wx-config used is: /usr/bin/wx-config
-- wxWidgets version is: 3.0.4
-- gtk version is: 3
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS) (Required is at least version "3.0.4")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindwxWidgets.cmake:1008 (find_package_handle_standard_args)
  src/CMakeLists.txt:62 (find_package)


-- Configuring incomplete, errors occurred!

System information:

System:    Kernel: 5.8.18-200.fc32.x86_64 x86_64 bits: 64 Desktop: KDE Plasma 5.18.5 Distro: Fedora release 32 (Thirty Two) 
Machine:   Type: Desktop Mobo: ASUSTeK model: EX-A320M-GAMING v: Rev X.0x serial: <filter> UEFI: American Megatrends v: 4023 
           date: 08/20/2018 
CPU:       Info: 8-Core model: AMD Ryzen 7 2700X bits: 64 type: MT MCP L2 cache: 4096 KiB 
           Speed: 2062 MHz min/max: 2200/3700 MHz Core speeds (MHz): 1: 2078 2: 2213 3: 2070 4: 2061 5: 4100 6: 4127 7: 2069 
           8: 2071 9: 4121 10: 4117 11: 2391 12: 2450 13: 2282 14: 2168 15: 2761 16: 2751 

ghost avatar Nov 16 '20 00:11 ghost

@Holsterbau Try this and see if it helps.

cmake -DwxWidgets_LIBRARIES=/usr/lib(64) -DwxWidgets_INCLUDE_DIRS=/usr/include

kekePower avatar Nov 16 '20 06:11 kekePower

@kekePower Thanks for the help. Your suggestion does make progress on the cmake, but now I get the following error on invoking make:

make[2]: *** [src/CMakeFiles/slade.dir/build.make:2842: src/CMakeFiles/slade.dir/Scripting/Lua.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:323: src/CMakeFiles/slade.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

Full log: https://pastebin.com/xiugpPMU

ghost avatar Nov 16 '20 15:11 ghost