sam-astro / Astro8-Computer

Custom 16-bit homebrew CPU, emulator, renderer, circuit, and language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot compile emulator on arch (and possibly others)

walksanatora opened this issue · comments

To Reproduce
Steps to reproduce the behavior:
1.git clone https://github.com/sam-astro/Astro8-Computer
2. cd Astro8-Computer/Astro8-Emulator/linux-build
4. cmake ..
5. make

[ 50%] Linking CXX executable astro8
/usr/bin/ld: CMakeFiles/astro8.dir/main.cpp.o: in function `destroy(SDL_Renderer*, SDL_Window*)':
main.cpp:(.text+0x14a3): undefined reference to `Mix_FreeChunk'
/usr/bin/ld: CMakeFiles/astro8.dir/main.cpp.o: in function `Update()':
main.cpp:(.text+0x20e5): undefined reference to `Mix_Playing'
/usr/bin/ld: main.cpp:(.text+0x2108): undefined reference to `Mix_Playing'
/usr/bin/ld: main.cpp:(.text+0x2145): undefined reference to `Mix_Playing'
/usr/bin/ld: main.cpp:(.text+0x2422): undefined reference to `Mix_Playing'
/usr/bin/ld: main.cpp:(.text+0x2452): undefined reference to `Mix_HaltChannel'
/usr/bin/ld: main.cpp:(.text+0x2489): undefined reference to `Mix_PlayChannel'
/usr/bin/ld: CMakeFiles/astro8.dir/main.cpp.o: in function `InitGraphics(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, int)':
main.cpp:(.text+0x3f3e): undefined reference to `Mix_OpenAudio'
/usr/bin/ld: main.cpp:(.text+0x3f68): undefined reference to `Mix_QuerySpec'
/usr/bin/ld: main.cpp:(.text+0x3f7a): undefined reference to `Mix_AllocateChannels'
/usr/bin/ld: main.cpp:(.text+0x400a): undefined reference to `Mix_LoadWAV'
/usr/bin/ld: main.cpp:(.text+0x40c1): undefined reference to `Mix_LoadWAV'
/usr/bin/ld: main.cpp:(.text+0x4180): undefined reference to `Mix_LoadWAV'
/usr/bin/ld: main.cpp:(.text+0x423f): undefined reference to `Mix_LoadWAV'
/usr/bin/ld: CMakeFiles/astro8.dir/main.cpp.o: in function `destroy(SDL_Renderer*, SDL_Window*)':
main.cpp:(.text+0x14e0): undefined reference to `Mix_Quit'
/usr/bin/ld: CMakeFiles/astro8.dir/main.cpp.o: in function `setupPlaybackSpeedEffect(Mix_Chunk const*, float const&, int, bool, bool)':
main.cpp:(.text+0x15d7): undefined reference to `Mix_RegisterEffect'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/astro8.dir/build.make:99: astro8] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/astro8.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Expected behavior
able to compile and use the Emulator from github build

Additional context
Yes i have SDL installed

extra/sdl2 2.26.2-1 [0B 4.43MiB] [Installed]
extra/sdl2_image 2.6.2-4 [0B 199.44KiB] [Installed]
extra/sdl2_mixer 2.6.2-2 [0B 393.83KiB] [Installed]
multilib/lib32-sdl2 2.26.2-1 [0B 2.21MiB] [Installed]

i do not have extra/sdl2_gfx or extra/sdl2_net or extra/sdl2_ttf installed
these errors look like sound errors though (which should be handled by mixer

I think this issue was fixed, at least in the dev branch. The problem was a lack of a required section in CMakeLists.txt to tell it where to look for SDL_mixer