libretro / ecwolf

Libretro port of ECWolf
20 stars 21 forks source link

Fails to build on Linux #96

Open coreybruce opened 10 months ago

coreybruce commented 10 months ago

Hey I just wanted to report that it fails to build on Linux and I noticed the only instructions was on a website as well as being outdated.

[ 95%] Building CXX object src/CMakeFiles/engine.dir/wl_play.cpp.o
/mnt/Storage/projects/ecwolf/src/id_sd.cpp:45:17: note: ‘#pragma message: Not using customized SDL_mixer. Features will be disabled. https://bitbucket.org/ecwolf/sdl_mixer-for-ecwolf’
   45 | #pragma message "Not using customized SDL_mixer. Features will be disabled. https://bitbucket.org/ecwolf/sdl_mixer-for-ecwolf"
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 95%] Building CXX object src/CMakeFiles/engine.dir/wl_game.cpp.o
[ 96%] Building CXX object src/CMakeFiles/engine.dir/wl_main.cpp.o
[ 96%] Building CXX object src/CMakeFiles/engine.dir/sdlvideo.cpp.o
[ 97%] Building CXX object src/CMakeFiles/engine.dir/wl_text.cpp.o
[ 97%] Building CXX object src/CMakeFiles/engine.dir/wl_inter.cpp.o
[ 98%] Building CXX object src/CMakeFiles/engine.dir/wl_net.cpp.o
[ 99%] Building CXX object src/CMakeFiles/engine.dir/dosbox/dbopl.cpp.o
[ 99%] Building CXX object src/CMakeFiles/engine.dir/posix/i_main.cpp.o
[100%] Linking CXX executable ../ecwolf
/usr/bin/ld: CMakeFiles/engine.dir/sndinfo.cpp.o: in function `Mix_ChunkDeleter::Mix_ChunkDeleter(Mix_Chunk*)':
sndinfo.cpp:(.text+0x114): undefined reference to `Mix_FreeChunk'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `musicFinished()':
id_sd.cpp:(.text+0x6a): undefined reference to `Mix_HaltMusic'
/usr/bin/ld: id_sd.cpp:(.text+0x79): undefined reference to `Mix_FreeMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_UpdateMusicVolume(int)':
id_sd.cpp:(.text+0xe5): undefined reference to `Mix_VolumeMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_StopDigitized()':
id_sd.cpp:(.text+0x777): undefined reference to `Mix_HaltChannel'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_SetPosition(int, int, int)':
id_sd.cpp:(.text+0x80c): undefined reference to `Mix_SetPanning'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_PrepareSound(int)':
id_sd.cpp:(.text+0xcda): undefined reference to `Mix_LoadWAV_RW'
/usr/bin/ld: id_sd.cpp:(.text+0xd08): undefined reference to `Mix_LoadWAV_RW'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_PlayDigitized(SoundData const&, int, int, SoundChannel)':
id_sd.cpp:(.text+0xdf4): undefined reference to `Mix_GroupAvailable'
/usr/bin/ld: id_sd.cpp:(.text+0xe07): undefined reference to `Mix_GroupOldest'
/usr/bin/ld: id_sd.cpp:(.text+0xe1a): undefined reference to `Mix_GroupAvailable'
/usr/bin/ld: id_sd.cpp:(.text+0xe91): undefined reference to `Mix_Volume'
/usr/bin/ld: id_sd.cpp:(.text+0xea7): undefined reference to `Mix_PlayChannel'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SDL_StartSB()':
id_sd.cpp:(.text+0x1a08): undefined reference to `Mix_OpenAudio'
/usr/bin/ld: id_sd.cpp:(.text+0x1a39): undefined reference to `Mix_CloseAudio'
/usr/bin/ld: id_sd.cpp:(.text+0x1a64): undefined reference to `Mix_QuerySpec'
/usr/bin/ld: id_sd.cpp:(.text+0x1b14): undefined reference to `Mix_ReserveChannels'
/usr/bin/ld: id_sd.cpp:(.text+0x1b28): undefined reference to `Mix_GroupChannels'
/usr/bin/ld: id_sd.cpp:(.text+0x1be6): undefined reference to `Mix_SetPostMix'
/usr/bin/ld: id_sd.cpp:(.text+0x1bf5): undefined reference to `Mix_ChannelFinished'
/usr/bin/ld: id_sd.cpp:(.text+0x1c2a): undefined reference to `Mix_VolumeMusic'
/usr/bin/ld: id_sd.cpp:(.text+0x1c39): undefined reference to `Mix_HookMusicFinished'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_Startup()':
id_sd.cpp:(.text+0x1dad): undefined reference to `Mix_SetSoundFonts'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_MusicOff()':
id_sd.cpp:(.text+0x228e): undefined reference to `Mix_PlayingMusic'
/usr/bin/ld: id_sd.cpp:(.text+0x229d): undefined reference to `Mix_PauseMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_StartMusic(char const*)':
id_sd.cpp:(.text+0x23c1): undefined reference to `Mix_FreeMusic'
/usr/bin/ld: id_sd.cpp:(.text+0x24a9): undefined reference to `Mix_LoadMUS_RW'
/usr/bin/ld: id_sd.cpp:(.text+0x25ea): undefined reference to `Mix_PlayMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_ContinueMusic(char const*, int)':
id_sd.cpp:(.text+0x281b): undefined reference to `Mix_FreeMusic'
/usr/bin/ld: id_sd.cpp:(.text+0x290b): undefined reference to `Mix_LoadMUS_RW'
/usr/bin/ld: id_sd.cpp:(.text+0x2aea): undefined reference to `Mix_PausedMusic'
/usr/bin/ld: id_sd.cpp:(.text+0x2b0f): undefined reference to `Mix_ResumeMusic'
/usr/bin/ld: id_sd.cpp:(.text+0x2b31): undefined reference to `Mix_PlayMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_MusicPlaying()':
id_sd.cpp:(.text+0x2c2d): undefined reference to `Mix_PlayingMusic'
/usr/bin/ld: id_sd.cpp:(.text+0x2c36): undefined reference to `Mix_PausedMusic'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::SendAck(IPaddress, int)':
wl_net.cpp:(.text+0x3f6): undefined reference to `SDLNet_UDP_Send'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::StartHost(bool (*)(FString))':
wl_net.cpp:(.text+0x463): undefined reference to `SDLNet_UDP_Open'
/usr/bin/ld: wl_net.cpp:(.text+0x583): undefined reference to `SDLNet_UDP_Recv'
/usr/bin/ld: wl_net.cpp:(.text+0x88b): undefined reference to `SDLNet_UDP_Send'
/usr/bin/ld: wl_net.cpp:(.text+0x949): undefined reference to `SDLNet_UDP_Recv'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::StartJoin(bool (*)(FString))':
wl_net.cpp:(.text+0xa6f): undefined reference to `SDLNet_UDP_Open'
/usr/bin/ld: wl_net.cpp:(.text+0xbd5): undefined reference to `SDLNet_ResolveHost'
/usr/bin/ld: wl_net.cpp:(.text+0xcf4): undefined reference to `SDLNet_UDP_Send'
/usr/bin/ld: wl_net.cpp:(.text+0xd0d): undefined reference to `SDLNet_UDP_Recv'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::Shutdown()':
wl_net.cpp:(.text+0xf04): undefined reference to `SDLNet_FreePacket'
/usr/bin/ld: wl_net.cpp:(.text+0xf13): undefined reference to `SDLNet_UDP_Close'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::Init(bool (*)(FString))':
wl_net.cpp:(.text+0xf31): undefined reference to `SDLNet_Init'
/usr/bin/ld: wl_net.cpp:(.text+0xf3d): undefined reference to `SDLNet_GetError'
/usr/bin/ld: wl_net.cpp:(.text+0xf5e): undefined reference to `SDLNet_AllocPacket'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::PollControls()':
wl_net.cpp:(.text+0x135b): undefined reference to `SDLNet_UDP_Send'
/usr/bin/ld: wl_net.cpp:(.text+0x1721): undefined reference to `SDLNet_UDP_Recv'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/engine.dir/build.make:2263: ecwolf] Error 1
make[1]: *** [CMakeFiles/Makefile2:379: src/CMakeFiles/engine.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
nikola-godzilla commented 7 months ago

same issue building on Raspios, aarch64 (Raspberry Pi 4 Model B)

also success builded some cores for ludo: fceumm, gambatte, melonds, mgba, picodrive, prboom, snes9x etc. to be sure that there is no problems with pc and build tools for other cores

[ 96%] Building CXX object src/CMakeFiles/engine.dir/wl_main.cpp.o
[ 96%] Building CXX object src/CMakeFiles/engine.dir/sdlvideo.cpp.o
[ 97%] Building CXX object src/CMakeFiles/engine.dir/wl_text.cpp.o
[ 97%] Building CXX object src/CMakeFiles/engine.dir/wl_inter.cpp.o
[ 98%] Building CXX object src/CMakeFiles/engine.dir/wl_net.cpp.o
[ 99%] Building CXX object src/CMakeFiles/engine.dir/mame/fmopl.cpp.o
[ 99%] Building CXX object src/CMakeFiles/engine.dir/posix/i_main.cpp.o
[100%] Linking CXX executable ../ecwolf
/usr/bin/ld: CMakeFiles/engine.dir/sndinfo.cpp.o: in function `Mix_ChunkDeleter::Mix_ChunkDeleter(Mix_Chunk*)':
/home/user/src/ecwolf/src/sndinfo.cpp:56: undefined reference to `Mix_FreeChunk'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `musicFinished()':
/home/user/src/ecwolf/src/id_sd.cpp:137: undefined reference to `Mix_HaltMusic'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:138: undefined reference to `Mix_FreeMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_UpdateMusicVolume(int)':
/home/user/src/ecwolf/src/id_sd.cpp:149: undefined reference to `Mix_VolumeMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_StopDigitized()':
/home/user/src/ecwolf/src/id_sd.cpp:494: undefined reference to `Mix_HaltChannel'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_SetPosition(int, int, int)':
/home/user/src/ecwolf/src/id_sd.cpp:509: undefined reference to `Mix_SetPanning'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_PrepareSound(int)':
/home/user/src/ecwolf/src/id_sd.cpp:629: undefined reference to `Mix_LoadWAV_RW'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:632: undefined reference to `Mix_LoadWAV_RW'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_PlayDigitized(SoundData const&, int, int, SoundChannel)':
/home/user/src/ecwolf/src/id_sd.cpp:651: undefined reference to `Mix_GroupAvailable'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:652: undefined reference to `Mix_GroupOldest'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:654: undefined reference to `Mix_GroupAvailable'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:664: undefined reference to `Mix_Volume'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:665: undefined reference to `Mix_PlayChannel'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SDL_StartSB()':
/home/user/src/ecwolf/src/id_sd.cpp:1034: undefined reference to `Mix_OpenAudio'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1039: undefined reference to `Mix_CloseAudio'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1039: undefined reference to `Mix_CloseAudio'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1041: undefined reference to `Mix_QuerySpec'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1052: undefined reference to `Mix_ReserveChannels'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1053: undefined reference to `Mix_GroupChannels'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1067: undefined reference to `Mix_SetPostMix'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1068: undefined reference to `Mix_ChannelFinished'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1070: undefined reference to `Mix_VolumeMusic'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1073: undefined reference to `Mix_HookMusicFinished'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_Startup()':
/home/user/src/ecwolf/src/id_sd.cpp:1176: undefined reference to `Mix_SetSoundFonts'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_MusicOff()':
/home/user/src/ecwolf/src/id_sd.cpp:1450: undefined reference to `Mix_PlayingMusic'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1452: undefined reference to `Mix_PauseMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_StartMusic(char const*)':
/home/user/src/ecwolf/src/id_sd.cpp:1496: undefined reference to `Mix_FreeMusic'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1516: undefined reference to `Mix_LoadMUS_RW'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1547: undefined reference to `Mix_PlayMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_ContinueMusic(char const*, int)':
/home/user/src/ecwolf/src/id_sd.cpp:1581: undefined reference to `Mix_FreeMusic'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1602: undefined reference to `Mix_LoadMUS_RW'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1649: undefined reference to `Mix_PausedMusic'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1651: undefined reference to `Mix_ResumeMusic'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1657: undefined reference to `Mix_PlayMusic'
/usr/bin/ld: CMakeFiles/engine.dir/id_sd.cpp.o: in function `SD_MusicPlaying()':
/home/user/src/ecwolf/src/id_sd.cpp:1705: undefined reference to `Mix_PlayingMusic'
/usr/bin/ld: /home/user/src/ecwolf/src/id_sd.cpp:1705: undefined reference to `Mix_PausedMusic'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::SendAck(IPaddress, int)':
/home/user/src/ecwolf/src/wl_net.cpp:179: undefined reference to `SDLNet_UDP_Send'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::StartHost(bool (*)(FString))':
/home/user/src/ecwolf/src/wl_net.cpp:188: undefined reference to `SDLNet_UDP_Open'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:200: undefined reference to `SDLNet_UDP_Recv'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:254: undefined reference to `SDLNet_UDP_Send'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:261: undefined reference to `SDLNet_UDP_Recv'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::StartJoin(bool (*)(FString))':
/home/user/src/ecwolf/src/wl_net.cpp:285: undefined reference to `SDLNet_UDP_Open'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:298: undefined reference to `SDLNet_ResolveHost'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:316: undefined reference to `SDLNet_UDP_Send'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:320: undefined reference to `SDLNet_UDP_Recv'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::Shutdown()':
/home/user/src/ecwolf/src/wl_net.cpp:354: undefined reference to `SDLNet_FreePacket'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:355: undefined reference to `SDLNet_UDP_Close'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::Init(bool (*)(FString))':
/home/user/src/ecwolf/src/wl_net.cpp:364: undefined reference to `SDLNet_Init'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:366: undefined reference to `SDLNet_GetError'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:369: undefined reference to `SDLNet_AllocPacket'
/usr/bin/ld: CMakeFiles/engine.dir/wl_net.cpp.o: in function `Net::PollControls()':
/home/user/src/ecwolf/src/wl_net.cpp:435: undefined reference to `SDLNet_UDP_Send'
/usr/bin/ld: /home/user/src/ecwolf/src/wl_net.cpp:443: undefined reference to `SDLNet_UDP_Recv'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/engine.dir/build.make:2263: ecwolf] Error 1
make[1]: *** [CMakeFiles/Makefile2:379: src/CMakeFiles/engine.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
coreybruce commented 7 months ago

Yeah hopefully they resolve it, I compiled and used wolf3sdl instead

Sanaki commented 3 months ago

As of GCC 14, it fails before that even:

In file included from ../../src/wl_draw.h:4,
from ../../src/g_shared/a_deathcam.cpp:15:
../../src/tmemory.h: In member function ‘void TWeakPtr<Type>::Swap(const Self&)’:
../../src/tmemory.h:470:25: error: assignment of member ‘r’ in read-only object
470 |                 other.r = oldref;
|                 ~~~~~~~~^~~~~~~~
make: *** [Makefile:483: ../../src/g_shared/a_deathcam.o] Error 1