Ezzz-dev / Nostalrius

Nostalrius is a 7.7 Tibia Clone Project based on The Forgotten Server 1.2 and CipSoft files.
99 stars 67 forks source link

compilation error ubuntu #56

Open antonioaraujo664 opened 4 years ago

antonioaraujo664 commented 4 years ago

antoniojun@ubuntu:~/Nostalrius-master/cmake$ cmake .. -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.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 -- cotire 1.7.6 loaded. -- Performing Test COMPILER_KNOWS_CXX11 -- Performing Test COMPILER_KNOWS_CXX11 - Success -- Performing Test COMPILER_KNOWS_STDLIB -- Performing Test COMPILER_KNOWS_STDLIB - Failed -- Found GMP: /usr/include/x86_64-linux-gnu
-- Found PugiXML: /usr/include
-- Could NOT find LuaJIT (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) -- MySQL Include dir: /usr/include/mysql library dir: /usr/lib/x86_64-linux-gnu -- MySQL client libraries: mysqlclient -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "") -- Boost version: 1.65.1 -- Found the following Boost libraries: -- system -- filesystem -- CXX target tfs cotired without unity build. -- Configuring done CMake Error at CMakeLists.txt:41 (add_executable): Cannot find source file:

/home/antoniojun/Nostalrius-master/src/weapons.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

CMake Error: CMake can not determine linker language for target: tfs CMake Error: Cannot determine link language for target "tfs". -- Generating done -- Build files have been written to: /home/antoniojun/Nostalrius-master/cmake antoniojun@ubuntu:~/Nostalrius-master/cmake$ make Scanning dependencies of target tfs make[2]: No rule to make target 'CMakeFiles/tfs.dir/build'. Stop. CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/tfs.dir/all' failed make[1]: [CMakeFiles/tfs.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 antoniojun@ubuntu:~/Nostalrius-master/cmake$

guaixara commented 4 years ago

me too, they abandoned and gave no support anymore =(

MasterChenSensei commented 3 years ago

antoniojun@ubuntu:~/Nostalrius-master/cmake$ cmake .. -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.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 -- cotire 1.7.6 loaded. -- Performing Test COMPILER_KNOWS_CXX11 -- Performing Test COMPILER_KNOWS_CXX11 - Success -- Performing Test COMPILER_KNOWS_STDLIB -- Performing Test COMPILER_KNOWS_STDLIB - Failed -- Found GMP: /usr/include/x86_64-linux-gnu -- Found PugiXML: /usr/include -- Could NOT find LuaJIT (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) -- MySQL Include dir: /usr/include/mysql library dir: /usr/lib/x86_64-linux-gnu -- MySQL client libraries: mysqlclient -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "") -- Boost version: 1.65.1 -- Found the following Boost libraries: -- system -- filesystem -- CXX target tfs cotired without unity build. -- Configuring done CMake Error at CMakeLists.txt:41 (add_executable): Cannot find source file:

/home/antoniojun/Nostalrius-master/src/weapons.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

CMake Error: CMake can not determine linker language for target: tfs CMake Error: Cannot determine link language for target "tfs". -- Generating done -- Build files have been written to: /home/antoniojun/Nostalrius-master/cmake antoniojun@ubuntu:~/Nostalrius-master/cmake$ make Scanning dependencies of target tfs make[2]: No rule to make target 'CMakeFiles/tfs.dir/build'. Stop. CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/tfs.dir/all' failed make[1]: [CMakeFiles/tfs.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 antoniojun@ubuntu:~/Nostalrius-master/cmake$

Go into src folder, open up CMakeLists.txt and remove this line: ${CMAKE_CURRENT_LIST_DIR}/weapons.cpp then save and close the file.

Then in order to be able to compile it successfully (although with some errors), you gotta do this:

Can't say for certain but it seems the issue to be related to GCC 8+, consider removing the "werror" flag from the cmakelists files and try to compile once more.

taken from here: https://github.com/TwistedScorpio/Nostalrius/issues/34#issuecomment-472133805