Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
476 stars 75 forks source link

Compiling on raspberry pi failed at Linking #1531

Closed Bersaelor closed 2 years ago

Bersaelor commented 2 years ago

Tonight I thought I try compiling for my Raspberry retro gaming station.

I have Raspberry Pi (64bit, Bullseye), installed all the dependencies, ran

cmake -DCMAKE_BUILD_TYPE=Release ..

successfully.

but then during make I get:

 24%] Building CXX object external/s25edit/CMakeFiles/s25edit.dir/CIO/CWindow.cpp.o
[ 24%] Linking CXX executable ../../bin/s25edit
/usr/bin/ld: ../../../external/dev-tools/lua/linux/lib/liblua52.a(lapi.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: ../../../external/dev-tools/lua/linux/lib/liblua52.a(lapi.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: ../../../external/dev-tools/lua/linux/lib/liblua52.a(lapi.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: ../../../external/dev-tools/lua/linux/lib/liblua52.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [external/s25edit/CMakeFiles/s25edit.dir/build.make:376: bin/s25edit] Error 1
make[1]: *** [CMakeFiles/Makefile2:1573: external/s25edit/CMakeFiles/s25edit.dir/all] Error 2
make: *** [Makefile:182: all] Error 2

I did see the note in the README about:

RTTR_TARGET_BOARD (ARM only) See the description in CMake-GUI/ccmake for details.

but I'm not sure which value I'm supposed to set here, also, no idea what CMake-GUI/ccmake and googling that didn't lead any good results.

Flamefire commented 2 years ago

ccmake comes with CMake and is the command line version of the GUI interface. It lists all set variables and their descriptions.

It tries to use the dev-tools lua library which isn't usable for the raspberry as it seems. Install lua for your device and reconfigure (deleting the build tree is easiest)

Bersaelor commented 2 years ago

ccmake comes with CMake and is the command line version of the GUI interface. It lists all set variables and their descriptions.

Never heard cmake has a GUI, TIL.

It tries to use the dev-tools lua library which isn't usable for the raspberry as it seems. Install lua for your device and reconfigure (deleting the build tree is easiest)

Alright, that did it, I just had to remove the lua folder from external/dev-tool.

Thank you for the cool project you got here, excited to see where it is going :) (Even dug out my old usb-cd-drive to copy the data&GFX from my old S2 disc, iTunes automatically ripped the songs so now I'm listening to them while working today :) )