Open coreybruce opened 3 years ago
Hi @coreybruce!
Are you currently building on master
branch? If yes, could you try building the develop
branch please?
Hey @Jammyjamjamman thanks for the reply, no sorry I was building from the current zipped stable, should I try cloning this and switching to the developer branch or try master first?
Oh sorry, jumped the gun a bit and forgot to ask if you were using git at all 😅.
I'd recommend trying to clone this repo + build the develop
branch. I think you'll get the same error as you posted above, if you try to build master
.
Some extra info about that error your getting:
The g++ compiler recently became more strict about declaring global vars only once. Featheryftp declared some global vars in a header. That header was then included in multiple files. So the vars were declared multiple times. g++ used to just ignore/ deal with this. But now you must only declare globals once and refer to them as extern
everywhere else. I patched this in the develop
branch, but it's still broken in master and release.
I got it to complete cmake after installing the dependencies needed and figured out it needed wxgtk2 not wxgtk3 (wxwidgets on debian/Ubuntu) might need to add the Arch dependencies as a couple of them are named differently and still don't know why Debian and Ubuntu based distros name packages so wierdly..
but I ran into this issue when I was building
[corey@corey-pi4 megaglest-source]$ make -j4
[ 0%] Building C object source/tools/glexemel/CMakeFiles/g2xml.dir/g2xml.c.o
[ 1%] Generating mg.tmp
[ 1%] Building C object source/tools/glexemel/CMakeFiles/xml2g.dir/xml2g.c.o
[ 1%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_acosf.cpp.o
[ 1%] Built target run
[ 2%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_acoshf.cpp.o
[ 2%] Linking C executable g2xml
[ 2%] Built target g2xml
[ 2%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_asinf.cpp.o
[ 3%] Linking C executable xml2g
[ 3%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_atan2f.cpp.o
[ 3%] Built target xml2g
[ 4%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_atanhf.cpp.o
[ 4%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_coshf.cpp.o
[ 4%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_exp2f.cpp.o
[ 5%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_expf.cpp.o
[ 5%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_fmodf.cpp.o
[ 6%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_gammaf_r.cpp.o
[ 6%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_hypotf.cpp.o
[ 6%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_j0f.cpp.o
[ 7%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_j1f.cpp.o
[ 7%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_jnf.cpp.o
[ 8%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_lgammaf_r.cpp.o
[ 8%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_log10f.cpp.o
[ 8%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_log2f.cpp.o
[ 9%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_logf.cpp.o
[ 9%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_powf.cpp.o
[ 10%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_rem_pio2f.cpp.o
[ 10%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_remainderf.cpp.o
[ 10%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_sinhf.cpp.o
[ 11%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/e_sqrtf.cpp.o
[ 11%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/k_cosf.cpp.o
[ 12%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/k_rem_pio2f.cpp.o
[ 12%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/k_sinf.cpp.o
[ 12%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/k_tanf.cpp.o
[ 13%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_asinhf.cpp.o
[ 13%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_atanf.cpp.o
[ 14%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_cbrtf.cpp.o
[ 14%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_ceilf.cpp.o
[ 14%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_copysignf.cpp.o
[ 15%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_cosf.cpp.o
[ 15%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_erff.cpp.o
[ 16%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_expm1f.cpp.o
[ 16%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_fabsf.cpp.o
[ 16%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_finitef.cpp.o
[ 17%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_floorf.cpp.o
[ 17%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_fpclassifyf.cpp.o
[ 17%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_frexpf.cpp.o
[ 18%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_ilogbf.cpp.o
[ 18%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_isinff.cpp.o
[ 19%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_isnanf.cpp.o
[ 19%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_ldexpf.cpp.o
[ 19%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_llrintf.cpp.o
[ 20%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_llroundf.cpp.o
[ 20%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_log1pf.cpp.o
[ 21%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_logbf.cpp.o
[ 21%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_lrintf.cpp.o
[ 21%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_lroundf.cpp.o
[ 22%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_modff.cpp.o
[ 22%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_nearbyintf.cpp.o
[ 23%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_nextafterf.cpp.o
[ 23%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_remquof.cpp.o
[ 23%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_rintf.cpp.o
[ 24%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_roundf.cpp.o
[ 24%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_scalblnf.cpp.o
[ 25%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_scalbnf.cpp.o
[ 25%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_signbitf.cpp.o
[ 25%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_sincosf.cpp.o
[ 26%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_sinf.cpp.o
[ 26%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_tanf.cpp.o
[ 27%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_tanhf.cpp.o
[ 27%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/s_truncf.cpp.o
[ 27%] Building CXX object source/shared_lib/sources/streflop/CMakeFiles/streflop.dir/libm/flt-32/w_expf.cpp.o
[ 28%] Linking CXX static library libstreflop.a
[ 28%] Built target streflop
[ 29%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/compression/compression_utils.cpp.o
[ 29%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/libircclient/src/libircclient.c.o
[ 30%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpAccount.c.o
[ 30%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpCmds.c.o
[ 30%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpLib.c.o
[ 31%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpMessages.c.o
[ 31%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpRuntime.c.o
[ 31%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpServer.c.o
[ 32%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpSession.c.o
[ 32%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpTargetPosix.c.o
[ 33%] Building C object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/feathery_ftp/ftpTargetWin32.c.o
[ 33%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/BMPReader.cpp.o
[ 33%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/FileReader.cpp.o
[ 34%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/ImageReaders.cpp.o
[ 34%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/JPGReader.cpp.o
[ 35%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/PNGReader.cpp.o
[ 35%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/TGAReader.cpp.o
[ 35%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/buffer.cpp.o
[ 36%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/camera.cpp.o
[ 36%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/context.cpp.o
[ 37%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/font.cpp.o
[ 37%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/font_manager.cpp.o
[ 37%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/font_text.cpp.o
/run/media/corey/47F22DEE70C10570/projects/megaglest-source/source/shared_lib/sources/graphics/font.cpp: In static member function ‘static void Shared::Graphics::Font::bidi_cvt(std::string&)’:
/run/media/corey/47F22DEE70C10570/projects/megaglest-source/source/shared_lib/sources/graphics/font.cpp:461:13: error: ‘reverse’ is not a member of ‘std’
461 | std::reverse(nonASCIIWordList.begin(),nonASCIIWordList.end());
| ^~~~~~~
/run/media/corey/47F22DEE70C10570/projects/megaglest-source/source/shared_lib/sources/graphics/font.cpp:476:12: error: ‘reverse’ is not a member of ‘std’
476 | std::reverse(nonASCIIWordList.begin(),nonASCIIWordList.end());
| ^~~~~~~
make[2]: *** [source/shared_lib/CMakeFiles/libmegaglest.dir/build.make:356: source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/font.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:209: source/shared_lib/CMakeFiles/libmegaglest.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Hm I don't know what's gone wrong here I'm afraid. Googling shows that function is in the header <algorithm>
. But I'm not sure why that's (apparently) missing.
Something that might help is, rather than building using cmake directly, is to use the scripts in mk/linux:
sudo ./setupBuildDeps.sh
./build-mg.sh
This will be an issue (the "multiple definition of") when compiling with GCC 10+, due to a change in GCC 10 to default to -fno-common
instead of -fcommon
. [1] To resolve this, you need to ensure you have -fcommon
set as part of your CFLAGS
and --allow-multiple-definition
as part of your LDFLAGS
. Alternative, it can be resolved by updating the respective files listed in the OP. I do not have an intimate knowledge of the codebase, so I am probably not the best person for that job.
You can see an example of what I did for Solus here [2]. In this example, you can see that as part of our packaging tooling, in our environment section I am effectively exporting our CFLAGS and LDFLAGS with the values mentioned above appended to the end.
[1] https://gcc.gnu.org/gcc-10/porting_to.html [2] https://dev.getsol.us/R2061:eb9a23e18fbb1cdddcba1aa76a197418a5609e52
Hi @JoshStrobl! Thanks for the help. This was already fixed in commit 5a35205 . @coreybruce tried building the develop branch (with the fix), but then seemed to run into a completely different error.
Actually, looking at that error again, I don't know why this error would happen. Because I don't think this code has been changed since the release, where it did build. Maybe a full rebuild would fix the problem (delete the folder mk/linux/build
and run mk/linux/build-mg.sh
again).
[ 37%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/font_manager.cpp.o [ 37%] Building CXX object source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/font_text.cpp.o /run/media/corey/47F22DEE70C10570/projects/megaglest-source/source/shared_lib/sources/graphics/font.cpp: In static member function ‘static void Shared::Graphics::Font::bidi_cvt(std::string&)’: /run/media/corey/47F22DEE70C10570/projects/megaglest-source/source/shared_lib/sources/graphics/font.cpp:461:13: error: ‘reverse’ is not a member of ‘std’ 461 | std::reverse(nonASCIIWordList.begin(),nonASCIIWordList.end()); | ^
~~ /run/media/corey/47F22DEE70C10570/projects/megaglest-source/source/shared_lib/sources/graphics/font.cpp:476:12: error: ‘reverse’ is not a member of ‘std’ 476 | std::reverse(nonASCIIWordList.begin(),nonASCIIWordList.end()); | ^~~ make[2]: [source/shared_lib/CMakeFiles/libmegaglest.dir/build.make:356: source/shared_lib/CMakeFiles/libmegaglest.dir/sources/graphics/font.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:209: source/shared_lib/CMakeFiles/libmegaglest.dir/all] Error 2 make: [Makefile:156: all] Error 2
I just ran into this problem too, on Manjaro.
As @Jammyjamjamman mentioned, it has to do with the algorithm include apparently. I added include <algorithm>
to platform_common.h
and it's working now.
I had first removed the build directory but that didn't help.
I just ran into this problem too, on Manjaro.
As @Jammyjamjamman mentioned, it has to do with the algorithm include apparently. I added
include <algorithm>
toplatform_common.h
and it's working now.
I'll have to reverse myself a little. It's not working now. I got a complete binary, but when it runs, the window is black, doesn't change, and it crashes in less than a minute with a lot of errors in the console.
I'm attaching the console output 20210703-errors.txt
Looks like some progress way made by smarter people than me :P
I got the binary to run properly. I had to install ftgl.
So.. yeah, looks like setupBuilddeps.sh needs updating.
Here's the output of pacman
when ftgl is installed (shows it's installed and up to date). If I remove ftgl, and run the pacman command again, it doesn't actually install ftgl, nor does it show that it will install it.
So really.. that seems more of a pacman bug.
Same thing with the libcurl-gnutls dependency. Not installed and pacman didn't install it.
Unsupported ManjaroLinux release.
Please report a bug at http://bugs.megaglest.org providing the following information:
--- snip ---
Git revision: 0e5d3a2d49b9e7355a57416891f14f5d7bc6068a
LSB support: 1
Distribution: ManjaroLinux
Release: 21.0.7
Codename: Ornara
Architecture: x86_64
--- snip ---
For now, please try this (which works with other ManjaroLinux releases) and report back how it works for you:
pacman -S --needed gcc-multilib cmake libcurl-gnutls sdl2 openal lua libjpeg-turbo libpng freetype2 wxgtk cppunit fribidi ftgl glew libogg libvorbis miniupnpc libircclient vlc libxml2 libx11 mesa glu
Thanks!
[andy@prometheus linux]$ sudo pacman -S --needed gcc-multilib cmake libcurl-gnutls sdl2 openal lua libjpeg-turbo libpng freetype2 wxgtk cppunit fribidi ftgl glew libogg libvorbis miniupnpc libircclient vlc libxml2 libx11 mesa glu
warning: gcc-11.1.0-1 is up to date -- skipping
warning: cmake-3.20.3-1 is up to date -- skipping
warning: sdl2-2.0.14-1 is up to date -- skipping
warning: openal-1.21.1-1 is up to date -- skipping
warning: libjpeg-turbo-2.1.0-1 is up to date -- skipping
warning: libpng-1.6.37-3 is up to date -- skipping
warning: freetype2-2.10.4-1 is up to date -- skipping
error: target not found: wxgtk
warning: cppunit-1.15.1-2 is up to date -- skipping
warning: fribidi-1.0.10-1 is up to date -- skipping
warning: ftgl-2.4.0-2 is up to date -- skipping
warning: glew-2.2.0-2 is up to date -- skipping
warning: libogg-1.3.5-1 is up to date -- skipping
warning: libvorbis-1.3.7-2 is up to date -- skipping
warning: miniupnpc-2.1.20191224-3 is up to date -- skipping
warning: vlc-3.0.14-1 is up to date -- skipping
warning: libxml2-2.9.10-9 is up to date -- skipping
warning: libx11-1.7.2-1 is up to date -- skipping
warning: mesa-21.1.2-1 is up to date -- skipping
warning: glu-9.0.1-2 is up to date -- skipping
[andy@prometheus linux]$ sudo pacman -Ru ftgl
checking dependencies...
Packages (1) ftgl-2.4.0-2
Total Removed Size: 2.16 MiB
:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
(1/1) removing ftgl [############################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[andy@prometheus linux]$ sudo pacman -S --needed gcc-multilib cmake libcurl-gnutls sdl2 openal lua libjpeg-turbo libpng freetype2 wxgtk cppunit fribidi ftgl glew libogg libvorbis miniupnpc libircclient vlc libxml2 libx11 mesa glu
warning: gcc-11.1.0-1 is up to date -- skipping
warning: cmake-3.20.3-1 is up to date -- skipping
warning: sdl2-2.0.14-1 is up to date -- skipping
warning: openal-1.21.1-1 is up to date -- skipping
warning: libjpeg-turbo-2.1.0-1 is up to date -- skipping
warning: libpng-1.6.37-3 is up to date -- skipping
warning: freetype2-2.10.4-1 is up to date -- skipping
error: target not found: wxgtk
warning: cppunit-1.15.1-2 is up to date -- skipping
warning: fribidi-1.0.10-1 is up to date -- skipping
warning: glew-2.2.0-2 is up to date -- skipping
warning: libogg-1.3.5-1 is up to date -- skipping
warning: libvorbis-1.3.7-2 is up to date -- skipping
warning: miniupnpc-2.1.20191224-3 is up to date -- skipping
warning: vlc-3.0.14-1 is up to date -- skipping
warning: libxml2-2.9.10-9 is up to date -- skipping
warning: libx11-1.7.2-1 is up to date -- skipping
warning: mesa-21.1.2-1 is up to date -- skipping
warning: glu-9.0.1-2 is up to date -- skipping
Nice catch @andy5995! I suspect the real problem is pacman fails to install the packages because it can't find wxgtk (and doesn't fail gracefully). wxgtk
should be wxgtk-common
.
@coreybruce I'd suggest running the command below. If it succeeds, then try a clean build (of development branch) again:
sudo pacman -S gcc-multilib cmake libcurl-gnutls sdl2 openal lua libjpeg-turbo libpng freetype2 wxgtk-common cppunit fribidi ftgl glew libogg libvorbis miniupnpc libircclient vlc libxml2 libx11 mesa glu
I've removed --needed
as well from that install command. Bit over the top but, should guarantee packages install :).
I will give it a try and get back to you 🙂
@Jammyjamjamman imo, cmake should exit with a fail code if it can't find ftgl.
Nice catch @andy5995! I suspect the real problem is pacman fails to install the packages because it can't find wxgtk (and doesn't fail gracefully).
wxgtk
should bewxgtk-common
.@coreybruce I'd suggest running the command below. If it succeeds, then try a clean build (of development branch) again:
sudo pacman -S gcc-multilib cmake libcurl-gnutls sdl2 openal lua libjpeg-turbo libpng freetype2 wxgtk-common cppunit fribidi ftgl glew libogg libvorbis miniupnpc libircclient vlc libxml2 libx11 mesa glu
I've removed
--needed
as well from that install command. Bit over the top but, should guarantee packages install :).
Installed all of those exept gcc-multilib as Manjaro arm64 does not have this package and only supports 64bit arm but I am still getting cmake errors sadly.
Thanks @coreybruce . Still the same error as before? If there's cmake errors, sounds like it's failing earlier.
If you haven't already suggest deleting the build/
folder and rebuilding again. But sounds like there's still other problems.
Related? FP lib for ARM64 blocks SpringRTS mobile: https://springrts.com/phpbb/viewtopic.php?t=26520
Hey guys I'll have to test it again and see if this is still an issue on Arm64 as I made this post 2 years ago 😛
Need a refresher as it has been a while so sorry if I make any mistakes :P but here is my log
also the instructions on building gave the wrong cd path
[corey@corey-pi4 ~]$ git clone https://github.com/MegaGlest/megaglest-source
Cloning into 'megaglest-source'...
remote: Enumerating objects: 66977, done.
remote: Counting objects: 100% (675/675), done.
remote: Compressing objects: 100% (598/598), done.
remote: Total 66977 (delta 146), reused 193 (delta 60), pack-reused 66302
Receiving objects: 100% (66977/66977), 47.74 MiB | 6.37 MiB/s, done.
Resolving deltas: 100% (51584/51584), done.
[corey@corey-pi4 ~]$ cd megaglest-source
[corey@corey-pi4 megaglest-source]$ mkdir build
[corey@corey-pi4 megaglest-source]$ cd build
[corey@corey-pi4 build]$ cmake ../../..
CMake Warning:
Ignoring extra path from command line:
"../../.."
CMake Error: The source directory "/home" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
[corey@corey-pi4 build]$ cmake ../
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SOURCE_DIR = /home/corey/megaglest-source
-- Build type for this compile will be: RelWithDebInfo
-- =====================================================================
-- Determining version number system type to use:
-- ** Trying 2 part versioning
-- Detected MegaGlest Version is [v3.13-dev]
-- Detected GNUC Compiler...
-- **AppImage compatiblity + nodata wanted. Adding flag "APPIMAGE_NODATA".
-- *NOTE: Checking for max SSE LEVEL [1]
-- Max SSE desired: [1]
-- Performing Test HAS_SSE3_EXTENSIONS
-- Performing Test HAS_SSE3_EXTENSIONS - Failed
-- Performing Test HAS_SSE2_EXTENSIONS
-- Performing Test HAS_SSE2_EXTENSIONS - Failed
-- Performing Test HAS_SSE_EXTENSIONS
-- Performing Test HAS_SSE_EXTENSIONS - Failed
-- Performing Test HAS_X87_SUPPORT
-- Performing Test HAS_X87_SUPPORT - Failed
-- *NOTE: using SOFT emulation for STREFLOP.
-- Performing Test HAS_GCC_BACKTRACE
-- Performing Test HAS_GCC_BACKTRACE - Success
-- Found GCC backtrace lib, will support backtraces
-- *NOTE: Apply fix for: libpthread.so.0: error adding symbols: DSO missing from command line
-- Found Git: /usr/bin/git (found version "2.39.2")
-- Found GIT and using GIT version stamping...
-- Using GIT revision stamp: [5867.7470d92] CMD [`cd '/home/corey/megaglest-source' && git rev-list HEAD --count`.`cd '/home/corey/megaglest-source' && git log -1 --format=%h --abbrev=7`]
-- *NOTE: Custom Data Install Path is [/usr/local/share/megaglest/]
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O3 -O2 -g -DNDEBUG -g -O3 -DGITVERSION="\"`cd "/home/corey/megaglest-source" && git rev-list HEAD --count`.`cd "/home/corey/megaglest-source" && git log -1 --format=%h --abbrev=7`\"" -DCUSTOM_DATA_INSTALL_PATH=/usr/local/share/megaglest/
-- **NOTE: MG_CMAKE_INSTALL_PREFIX is [/usr/local]
-- **Found game source code.
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0")
-- Checking for one of the modules 'streflop-soft'
-- Checking for one of the modules 'streflop'
-- Search for Library STREFLOP result = libs: include dirs:
-- Will try to build MegaGlest shared library
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.0.8")
-- Found CURL: /usr/lib/libcurl.so (found version "7.88.1")
-- curl-config: /usr/bin/curl-config, #2 RET = 1, using CURL dynamic libs: -lcurl
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found SDL2: /usr/lib/libSDL2main.a;/usr/lib/libSDL2.so
CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:315 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
source/shared_lib/CMakeLists.txt:119 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found OpenGL: /usr/lib/libOpenGL.so
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenAL: /usr/lib/libopenal.so
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (Lua) does
not match the name of the calling package (LUA). This can lead to problems
in calling code that expects `find_package` result variables (e.g.,
`_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
mk/cmake/Modules/FindLUA.cmake:191 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
source/shared_lib/CMakeLists.txt:150 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Lua: /usr/lib/liblua5.4.so;/usr/lib/libm.so (found version "5.4.4")
-- Found JPEG: /usr/lib/libjpeg.so (found version "80")
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.13")
-- Found PNG: /usr/lib/libpng.so (found version "1.6.39")
-- **NOTE: FontConfig support was detected and enabled.
-- Found Freetype: /usr/lib/libfreetype.so (found version "2.13.0")
CMake Error at mk/cmake/Modules/FindFTGL.cmake:53 (MESSAGE):
Could not find FTGL libraries
Call Stack (most recent call first):
source/shared_lib/CMakeLists.txt:192 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/home/corey/megaglest-source/build/CMakeFiles/CMakeOutput.log".
See also "/home/corey/megaglest-source/build/CMakeFiles/CMakeError.log".
Sounds like the buildinstructions are lacking this at the start:
cd mk/linux
The cmake error there indicates ftgl is missing. If you're still using manjaro:
pacman -S ftgl
but if you want to make sure you've installed all the deps, it might be simpler to run:
cd mk/linux
sudo ./setupBuildDeps.sh
Related? FP lib for ARM64 blocks SpringRTS mobile
The game does build on arm64. A couple of our headless servers are actually running on an ampere cpu servers.
Sounds like the buildinstructions are lacking this at the start:
cd mk/linux
The cmake error there indicates ftgl is missing. If you're still using manjaro:
pacman -S ftgl
but if you want to make sure you've installed all the deps, it might be simpler to run:
cd mk/linux sudo ./setupBuildDeps.sh
Related? FP lib for ARM64 blocks SpringRTS mobile
The game does build on arm64. A couple of our headless servers are actually running on an ampere cpu servers.
Ahh right I see tho it seems like the script says Manjaro Arm is a unsupported distro. I think it's better to have a auto script and manual compiling instructions. :smiley:
[corey@corey-pi4 linux]$ sudo ./setupBuildDeps.sh
We have detected the following system:
[ Manjaro-ARM ] [ 23.02 ] [ n/a ] [ aarch64 ]
On supported systems, we will now install build dependencies.
Unsupported Linux distribution.
Please report a bug at http://bugs.megaglest.org providing the following information:
--- snip ---
Git revision: 7470d924fbb2cd439d598409106b48ea2c0dae8e
LSB support: 1
Distribution: Manjaro-ARM
Release: 23.02
Codename: n/a
Architecture: aarch64
--- snip ---
For now, you may want to take a look at the build hints on the MegaGlest wiki at:
https://docs.megaglest.org/MG/Linux_Compiling
If you can come up with something which works for you, please report back to us, too. Thanks!
There are manual instructions (in the link given in the log of the script error you gave above, perhaps not the best place):
If your distribution is not supported or you prefer to install yourself: This is the current dependency list - where packages are available, the package names may start with lib and usually have -dev(el) towards the end:
gcc gcc-c++ cmake sdl2 alut GL GLU vorbis x11 lua jpeg png curl ircclient glew ftgl fribidi cppunit vlc miniupnpc
Additionally for map editor and model viewer:
wxgtk xml2
Unfortunately, it's not really possible to give more detailed instructions than that because the way package management works across different linux distros is very fragmented. pacman -Ss <search-regex>
(replacing <search-regex>
with e.g. ftgl
) can helping find packages in manjaro repos.
However, I think it's a bug that the setupbuilddeps script doesnt support your manjaro distro. I think the install command for arm and x86_64 manjaro is the same.
There are manual instructions (in the link given in the log of the script error you gave above, perhaps not the best place):
If your distribution is not supported or you prefer to install yourself: This is the current dependency list - where packages are available, the package names may start with lib and usually have -dev(el) towards the end: gcc gcc-c++ cmake sdl2 alut GL GLU vorbis x11 lua jpeg png curl ircclient glew ftgl fribidi cppunit vlc miniupnpc Additionally for map editor and model viewer: wxgtk xml2
Unfortunately, it's not really possible to give more detailed instructions than that because the way package management works across different linux distros is very fragmented.
pacman -Ss <search-regex>
(replacing<search-regex>
with e.g.ftgl
) can helping find packages in manjaro repos.However, I think it's a bug that the setupbuilddeps script doesnt support your manjaro distro. I think the install command for arm and x86_64 manjaro is the same.
Yeah I think those manual build instructions need to be updated because when I tried it for example the cd command was wrong and I ran into a build issue, they would be exactly the same across Linux distros on x64 and Arm64 :)
The best thing you could do for people who do use the manual instructions is add the Arch packages needed, it's all the same but some on Ubuntu have weird and different names compared to other distros.
Yeah that might be the only issue on the build script but I am happy to test it after it has been fixed and report any other build bugs for you if you like :+1:
I looked at https://docs.megaglest.org/MG/Linux_Compiling and cd mk/linux
command I mentioned actually is in the build instructions already.
I've pushed a fix for the setupBuildDeps.sh script, if you're up to try it again. Also feel free to augment the build docs if you think there's extra additional info that can be provided.
Hi there I tried to build the game from source using the build instructions from the website but ran into this issue.
I am building on Manjaro Arm64
So I looked at the Arch pkgbuild file as a reference and tried their cmake instructions but ran into some issues so this is the cmake argument I used to get it working in the root build folder instead of build in /mx/linux/build
I got cmake to work but when I tried to build I ran into this issue