New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error #13
Comments
This is caused by the linker not finding SDL_mixer, it seams to happen when compiling on a 64bit platform, probably all it needs is a parameter to point it in the right direction. The problem appears to be that the way we force the compiler to 32bit causes auto discover in cmake not to work properly. The issue should go away when either compiling on a 32bit installation, or compiling to a 64bit file (however the code is not in a state where this can be done yet). @ApertureSecurity might be able to provide some info in regards to what environment he is compiling under. |
@VonKossa make sure that you have added |
Good day and salutations, I was able to compile this on a clean new system My history...
in file vim usr/lib/i386-linux-gnu/cmake/SDL2/sdl2-config.cmake
I had to comment out an include line in the code which is looking for #include <SDL_image.h> which I will fix now. |
@ApertureSecurity your history doesn't show you running |
Hi again! For the record i am running Gentoo, not a debian or debian like distro. |
Are you wanting to compile it or do you just want to play? I can compile it for you. Ideally , I can just release stable branches of the game. @AJenbo, I ran cmake ..;make from the build folder. That terminal used for vim on sdl cmake. |
Actually i want to compile it. My sdl2-config.cmake looks different than yours: set(prefix "/usr") |
I solved it. |
Hopfully we can get SDL2_mixerfind.cmake working for 32bit builds so that it won't be needed to edit the file :) |
It did compile and it did start, but that was about all. The game menu appeared but you are unable to choose anything with the keyboard and if you are lucky you might be able to proceed to the choose character menu if you by luck find the right pixel with the mouse. Then it segfaults. :) |
Can you launch it in terminal and give me output before it crashes please. Thank you for this. |
sure... just a moment. :) |
DUMMY: ShowCursor : 0 SND INIT ./diabdat.mpq SND INIT Main Menu Init menu3 X641 Y556 menu3 X635 Y567 menu3 X632 Y582 menu3 X598 Y554 menu3 X587 Y516 menu3 X433 Y438 menu3 X504 Y449 menu3 X513 Y457 menu3 X533 Y467 menu3 X569 Y492 menu3 X581 Y510 menu3 X617 Y535 menu3 X629 Y554 menu3 X630 Y572 menu3 X642 Y560 menu3 X580 Y567 menu3 X405 Y567 menu3 X311 Y546 menu3 X243 Y378 menu3 X253 Y306 menu3 X235 Y270 menu3 X270 Y303 menu3 X167 Y328 menu3 X138 Y325 menu3 X217 Y476 menu3 X159 Y493 menu3 X166 Y587 menu3 X175 Y565 menu3 X206 Y383 menu3 X411 Y315 menu3 X408 Y261 menu3 X322 Y247 menu3 X507 Y316 menu3 X552 Y360 menu3 X588 Y440 menu3 X598 Y486 menu3 X489 Y264 menu3 X538 Y329 menu3 X526 Y419 menu3 X533 Y476 menu3 X551 Y483 menu3 X590 Y492 menu3 X626 Y522 menu3 X636 Y546 menu3 X642 Y566 menu3 X637 Y581 menu3 X609 Y571 menu3 X647 Y558 menu3 X675 Y565 menu3 X637 Y566 menu3 X630 Y556 menu3 X571 Y485 menu3 X488 Y512 menu3 X522 Y558 menu3 X682 Y561 X 715 , Y 453 menu3 X635 Y568 menu3 X656 Y568 menu3 X644 Y563 menu3 X615 Y557 menu3 X676 Y557 X 660 , Y 555 X 730 , Y 567 |
well it was hard to find the correct spot to click on, lots of coordinates... . :( |
Sounds like you might be trying the 64bit branch? The menu is a bit of a work in progress atm, and 64bit crashes as soon as you start the game. The 32bit build should work ok, though the menu is also a bit unfinished. |
no actually not but i have also studied your progress in the 64-bit branch, great work! |
We are working on merging devilution 0.5 and then also most of the stuff in the 64-bit branch, so things should be more interesting in a weeks time :) |
@VonKossa as you might have notice we have merged the code and things should now be in a better state, though 64bit builds currently only gets you to the loading screen. How ever you can force the compiler to 32bit mode by providing FORCE32=1 before running CMake. Hope that helps. |
It did not work, the menu works as expected but if i try to start a game i am greeted with the message "out of hash space, aborted" Thanks for your help anyway. :) |
Single-player difficulty selection was implemented in a very hacky way. Documents what's going on there and fixes a memory leak. Memory leaks that this fixes looked like this: ``` Direct leak of 64 byte(s) in 1 object(s) allocated from: #0 0x7f435b789f17 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xb1f17) #1 0x5567766c62b8 in dvl::selgame_GameSelection_Select(int) ../SourceX/DiabloUI/selgame.cpp:163 #2 0x5567766d8ee8 in dvl::selhero_Load_Select(int) ../SourceX/DiabloUI/selhero.cpp:464 #3 0x5567766d6ed1 in dvl::selhero_List_Select(int) ../SourceX/DiabloUI/selhero.cpp:325 #4 0x556776692683 in dvl::UiFocusNavigationSelect() ../SourceX/DiabloUI/diabloui.cpp:396 #5 0x55677669158e in HandleMenuAction ../SourceX/DiabloUI/diabloui.cpp:223 #6 0x5567766917b9 in dvl::UiFocusNavigation(SDL_Event*) ../SourceX/DiabloUI/diabloui.cpp:277 #7 0x556776695dff in dvl::UiPollAndRender() ../SourceX/DiabloUI/diabloui.cpp:626 #8 0x5567766d94ef in UiSelHeroDialog ../SourceX/DiabloUI/selhero.cpp:512 diasurgical#9 0x5567766d997f in dvl::UiSelHeroSingDialog(int (*)(int (*)(dvl::_uiheroinfo*)), int (*)(dvl::_uiheroinfo*), int (*)(dvl::_uiheroinfo*), void (*)(unsigned int, dvl::_uidefaultstats*), int*, char (*) [16], int*) ../SourceX/DiabloUI/selhero.cpp:547 diasurgical#10 0x556776a44f45 in mainmenu_select_hero_dialog ../Source/mainmenu.cpp:98 diasurgical#11 0x5567765f9f15 in SNetInitializeProvider ../SourceX/storm/storm_net.cpp:102 diasurgical#12 0x556776c996b9 in multi_init_single ../Source/multi.cpp:826 diasurgical#13 0x556776c98b1e in NetInit ../Source/multi.cpp:770 diasurgical#14 0x5567767d0c0b in StartGame ../Source/diablo.cpp:375 diasurgical#15 0x556776a4493d in mainmenu_init_menu ../Source/mainmenu.cpp:45 diasurgical#16 0x556776a44c05 in mainmenu_single_player ../Source/mainmenu.cpp:61 diasurgical#17 0x556776a454a9 in mainmenu_loop ../Source/mainmenu.cpp:152 diasurgical#18 0x5567767d2892 in DiabloMain ../Source/diablo.cpp:602 diasurgical#19 0x5567766e3c69 in main ../SourceX/main.cpp:34 diasurgical#20 0x7f435a69ecb1 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x28cb1) ```
Single-player difficulty selection was implemented in a very hacky way. Documents what's going on there and fixes a memory leak. Memory leaks that this fixes looked like this: ``` Direct leak of 64 byte(s) in 1 object(s) allocated from: #0 0x7f435b789f17 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xb1f17) #1 0x5567766c62b8 in dvl::selgame_GameSelection_Select(int) ../SourceX/DiabloUI/selgame.cpp:163 #2 0x5567766d8ee8 in dvl::selhero_Load_Select(int) ../SourceX/DiabloUI/selhero.cpp:464 #3 0x5567766d6ed1 in dvl::selhero_List_Select(int) ../SourceX/DiabloUI/selhero.cpp:325 #4 0x556776692683 in dvl::UiFocusNavigationSelect() ../SourceX/DiabloUI/diabloui.cpp:396 #5 0x55677669158e in HandleMenuAction ../SourceX/DiabloUI/diabloui.cpp:223 #6 0x5567766917b9 in dvl::UiFocusNavigation(SDL_Event*) ../SourceX/DiabloUI/diabloui.cpp:277 #7 0x556776695dff in dvl::UiPollAndRender() ../SourceX/DiabloUI/diabloui.cpp:626 #8 0x5567766d94ef in UiSelHeroDialog ../SourceX/DiabloUI/selhero.cpp:512 #9 0x5567766d997f in dvl::UiSelHeroSingDialog(int (*)(int (*)(dvl::_uiheroinfo*)), int (*)(dvl::_uiheroinfo*), int (*)(dvl::_uiheroinfo*), void (*)(unsigned int, dvl::_uidefaultstats*), int*, char (*) [16], int*) ../SourceX/DiabloUI/selhero.cpp:547 #10 0x556776a44f45 in mainmenu_select_hero_dialog ../Source/mainmenu.cpp:98 #11 0x5567765f9f15 in SNetInitializeProvider ../SourceX/storm/storm_net.cpp:102 #12 0x556776c996b9 in multi_init_single ../Source/multi.cpp:826 #13 0x556776c98b1e in NetInit ../Source/multi.cpp:770 #14 0x5567767d0c0b in StartGame ../Source/diablo.cpp:375 #15 0x556776a4493d in mainmenu_init_menu ../Source/mainmenu.cpp:45 #16 0x556776a44c05 in mainmenu_single_player ../Source/mainmenu.cpp:61 #17 0x556776a454a9 in mainmenu_loop ../Source/mainmenu.cpp:152 #18 0x5567767d2892 in DiabloMain ../Source/diablo.cpp:602 #19 0x5567766e3c69 in main ../SourceX/main.cpp:34 #20 0x7f435a69ecb1 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x28cb1) ```
KP PvP item effects
When compiling devilutionX i get the following "undefined reference to" messages and then it fails the compilation.
[ 52%] Linking CXX executable devil-sanitize
CMakeFiles/devil-sanitize.dir/Stub/sound.cpp.o: In function
snd_init(void*)': sound.cpp:(.text+0x11c): undefined reference to
Mix_AllocateChannels'sound.cpp:(.text+0x186): undefined reference to
Mix_OpenAudio' CMakeFiles/devil-sanitize.dir/Stub/sound.cpp.o: In function
music_start(int)':sound.cpp:(.text+0x6bf): undefined reference to
Mix_LoadMUS_RW' sound.cpp:(.text+0x719): undefined reference to
Mix_PlayMusic'CMakeFiles/devil-sanitize.dir/Stub/sound.cpp.o: In function
LoadAndPlaySound(char*, int, int)': sound.cpp:(.text+0xad9): undefined reference to
Mix_LoadWAV_RW'sound.cpp:(.text+0xb34): undefined reference to
Mix_PlayChannelTimed' CMakeFiles/devil-sanitize.dir/Stub/sound.cpp.o: In function
music_stop()':sound.cpp:(.text+0xca1): undefined reference to
Mix_HaltMusic' sound.cpp:(.text+0xcc9): undefined reference to
Mix_HaltChannel'CMakeFiles/devil-sanitize.dir/Stub/sound.cpp.o: In function
snd_play_snd(TSnd*, int, int)': sound.cpp:(.text+0xdab): undefined reference to
Mix_PlayChannelTimed'CMakeFiles/devil-sanitize.dir/Stub/sound.cpp.o: In function
snd_stop_snd(TSnd*)': sound.cpp:(.text+0xe0c): undefined reference to
Mix_HaltMusic'CMakeFiles/devil-sanitize.dir/Stub/sound.cpp.o: In function
sound_file_load(char*)': sound.cpp:(.text+0x117a): undefined reference to
Mix_LoadWAV_RW'collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/devil-sanitize.dir/build.make:2463: devil-sanitize] Error 1
make[1]: *** [CMakeFiles/Makefile2:106: CMakeFiles/devil-sanitize.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
The text was updated successfully, but these errors were encountered: