diasurgical / devilutionX

Diablo build for modern operating systems
Other
8.1k stars 796 forks source link

Couldn't compile devilutionX 1.2.1 under Ubuntu Linux 20.04 #2080

Closed stakek26 closed 3 years ago

stakek26 commented 3 years ago

Ubuntu Linux 20.04 focal

I try to compile devilutionX by myself, but the build is interrupted by 44 - 47%. At the same time, devilutionX 1.1.0 builds without any problems.

Logs from terminal:

$ cmake ../devilutionX-1.2.1/ -DCMAKE_BUILD_TYPE=Release -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE
-- Found sodium: /usr/lib/x86_64-linux-gnu/libsodium.a (found version "1.0.18") -- Found SDL2_ttf: /usr/lib/x86_64-linux-gnu/libSDL2_ttf.so
-- Found SDL2: /usr/lib/x86_64-linux-gnu/libSDL2.so
-- Found SDL2_mixer: /usr/lib/x86_64-linux-gnu/libSDL2_mixer.so
-- Configuring done -- Generating done -- Build files have been written to: /home/stake/03-games/diablo/11/build

$ make -j 8 Scanning dependencies of target Radon Scanning dependencies of target smacker Scanning dependencies of target PKWare Scanning dependencies of target SourceS Scanning dependencies of target StormLib [ 1%] Building CXX object CMakeFiles/Radon.dir/3rdParty/Radon/Radon/source/Named.cpp.o [ 2%] Building C object CMakeFiles/smacker.dir/3rdParty/libsmacker/smk_hufftree.c.o [ 3%] Building CXX object CMakeFiles/Radon.dir/3rdParty/Radon/Radon/source/Key.cpp.o [ 3%] Building CXX object CMakeFiles/PKWare.dir/3rdParty/PKWare/explode.cpp.o [ 3%] Building C object CMakeFiles/smacker.dir/3rdParty/libsmacker/smk_bitstream.c.o [ 4%] Building CXX object CMakeFiles/SourceS.dir/SourceS/paths.cpp.o [ 4%] Building CXX object CMakeFiles/Radon.dir/3rdParty/Radon/Radon/source/File.cpp.o [ 5%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/FileStream.cpp.o [ 7%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SBaseCommon.cpp.o [ 7%] Building C object CMakeFiles/smacker.dir/3rdParty/libsmacker/smacker.c.o [ 8%] Building CXX object CMakeFiles/PKWare.dir/3rdParty/PKWare/implode.cpp.o [ 9%] Linking CXX static library libPKWare.a [ 10%] Linking C static library libsmacker.a [ 10%] Built target PKWare [ 11%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SBaseSubTypes.cpp.o [ 11%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SBaseFileTable.cpp.o [ 12%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SCompression.cpp.o [ 12%] Built target smacker [ 12%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SFileExtractFile.cpp.o [ 13%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SFileFindFile.cpp.o [ 14%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SFileGetFileInfo.cpp.o [ 14%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SFileOpenArchive.cpp.o [ 14%] Building CXX object CMakeFiles/Radon.dir/3rdParty/Radon/Radon/source/Section.cpp.o [ 15%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SFileOpenFileEx.cpp.o [ 16%] Building CXX object CMakeFiles/StormLib.dir/3rdParty/StormLib/src/SFileReadFile.cpp.o [ 16%] Linking CXX static library libStormLib.a [ 17%] Linking CXX static library libRadon.a [ 17%] Built target StormLib [ 17%] Built target Radon [ 17%] Linking CXX static library libSourceS.a [ 17%] Built target SourceS Scanning dependencies of target devilution [ 18%] Building CXX object CMakeFiles/devilution.dir/Source/codec.cpp.o [ 19%] Building CXX object CMakeFiles/devilution.dir/Source/debug.cpp.o [ 19%] Building CXX object CMakeFiles/devilution.dir/Source/cursor.cpp.o [ 20%] Building CXX object CMakeFiles/devilution.dir/Source/control.cpp.o [ 22%] Building CXX object CMakeFiles/devilution.dir/Source/appfat.cpp.o [ 22%] Building CXX object CMakeFiles/devilution.dir/Source/capture.cpp.o [ 22%] Building CXX object CMakeFiles/devilution.dir/Source/automap.cpp.o [ 23%] Building CXX object CMakeFiles/devilution.dir/Source/dead.cpp.o [ 23%] Building CXX object CMakeFiles/devilution.dir/Source/diablo.cpp.o [ 24%] Building CXX object CMakeFiles/devilution.dir/Source/doom.cpp.o [ 24%] Building CXX object CMakeFiles/devilution.dir/Source/drlg_l2.cpp.o [ 25%] Building CXX object CMakeFiles/devilution.dir/Source/drlg_l1.cpp.o [ 26%] Building CXX object CMakeFiles/devilution.dir/Source/drlg_l3.cpp.o [ 27%] Building CXX object CMakeFiles/devilution.dir/Source/drlg_l4.cpp.o [ 28%] Building CXX object CMakeFiles/devilution.dir/Source/dthread.cpp.o [ 28%] Building CXX object CMakeFiles/devilution.dir/Source/effects.cpp.o [ 29%] Building CXX object CMakeFiles/devilution.dir/Source/encrypt.cpp.o [ 30%] Building CXX object CMakeFiles/devilution.dir/Source/error.cpp.o [ 30%] Building CXX object CMakeFiles/devilution.dir/Source/engine.cpp.o [ 31%] Building CXX object CMakeFiles/devilution.dir/Source/gamemenu.cpp.o [ 32%] Building CXX object CMakeFiles/devilution.dir/Source/gendung.cpp.o [ 32%] Building CXX object CMakeFiles/devilution.dir/Source/gmenu.cpp.o [ 33%] Building CXX object CMakeFiles/devilution.dir/Source/help.cpp.o [ 34%] Building CXX object CMakeFiles/devilution.dir/Source/init.cpp.o [ 34%] Building CXX object CMakeFiles/devilution.dir/Source/interfac.cpp.o [ 35%] Building CXX object CMakeFiles/devilution.dir/Source/inv.cpp.o [ 36%] Building CXX object CMakeFiles/devilution.dir/Source/itemdat.cpp.o [ 37%] Building CXX object CMakeFiles/devilution.dir/Source/lighting.cpp.o [ 37%] Building CXX object CMakeFiles/devilution.dir/Source/items.cpp.o [ 38%] Building CXX object CMakeFiles/devilution.dir/Source/loadsave.cpp.o [ 38%] Building CXX object CMakeFiles/devilution.dir/Source/mainmenu.cpp.o [ 39%] Building CXX object CMakeFiles/devilution.dir/Source/minitext.cpp.o [ 39%] Building CXX object CMakeFiles/devilution.dir/Source/missiles.cpp.o [ 40%] Building CXX object CMakeFiles/devilution.dir/Source/misdat.cpp.o [ 41%] Building CXX object CMakeFiles/devilution.dir/Source/monstdat.cpp.o [ 42%] Building CXX object CMakeFiles/devilution.dir/Source/monster.cpp.o [ 42%] Building CXX object CMakeFiles/devilution.dir/Source/movie.cpp.o [ 43%] Building CXX object CMakeFiles/devilution.dir/Source/mpqapi.cpp.o [ 44%] Building CXX object CMakeFiles/devilution.dir/Source/msg.cpp.o [ 44%] Building CXX object CMakeFiles/devilution.dir/Source/multi.cpp.o [ 45%] Building CXX object CMakeFiles/devilution.dir/Source/nthread.cpp.o [ 46%] Building CXX object CMakeFiles/devilution.dir/Source/objdat.cpp.o [ 46%] Building CXX object CMakeFiles/devilution.dir/Source/objects.cpp.o [ 47%] Building CXX object CMakeFiles/devilution.dir/Source/pack.cpp.o

/home/stake/03-games/diablo/11/devilutionX-1.2.1/Source/multi.cpp: In function ‘dvl::BOOL dvl::NetInit(dvl::BOOL, dvl::BOOL*)’: /home/stake/03-games/diablo/11/devilutionX-1.2.1/Source/multi.cpp:742:54: error: expected primary-expression before ‘;’ token 742 | sgGameInitInfo.versionMajor = PROJECT_VERSION_MAJOR; | ^ /home/stake/03-games/diablo/11/devilutionX-1.2.1/Source/multi.cpp:743:54: error: expected primary-expression before ‘;’ token 743 | sgGameInitInfo.versionMinor = PROJECT_VERSION_MINOR; | ^ /home/stake/03-games/diablo/11/devilutionX-1.2.1/Source/multi.cpp:744:54: error: expected primary-expression before ‘;’ token 744 | sgGameInitInfo.versionPatch = PROJECT_VERSION_PATCH; | ^ make[2]: [CMakeFiles/devilution.dir/build.make:570: CMakeFiles/devilution.dir/Source/multi.cpp.o] Ошибка 1 make[2]: Ожидание завершения заданий… make[1]: [CMakeFiles/Makefile2:223: CMakeFiles/devilution.dir/all] Ошибка 2 make: [Makefile:152: all] Ошибка 2

AJenbo commented 3 years ago

If you do not use git to manage the code you need to provide the version manually: https://github.com/diasurgical/devilutionX/blob/master/docs/building.md#building-from-source

stakek26 commented 3 years ago

Thank you very much, everything works fine.