Compiled it but cant't start game

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
o01eg
Programmer
Posts: 2004
Joined: Sat Dec 10, 2011 5:46 am

Re: Compiled it but cant't start game

#16 Post by o01eg »

Suddenly you got mismatched boost and python libraries.
/usr/lib64/libboost_python39.so /usr/lib64/libpython3.6m.so
Where did you get /usr/lib64/libpython3.6m.so if you say you have python 3.9.2?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

o01eg
Programmer
Posts: 2004
Joined: Sat Dec 10, 2011 5:46 am

Re: Compiled it but cant't start game

#17 Post by o01eg »

drkosy wrote: Mon Apr 05, 2021 6:57 pm cmake runs smoothly, but while compiling two errors occur:
Which commit do you use and what cmake shows you?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Compiled it but cant't start game

#18 Post by drkosy »

Where did you get /usr/lib64/libpython3.6m.so if you say you have python 3.9.2?
Recently checked my packages. There are two versions of python availible on my system: python 3.9 and python 3.6 with is quite common for compatibility. Therefore there is libpython3.9 as well as libpython3.6 availible on my system. Don't know why it chooses the wrong version of libpython...

I use git checkout v0.4.10.1 to change to the stable brand.
CMake gives me:

Code: Select all

Setting build type to 'Release' as none was specified.
Build type CMAKE_BUILD_TYPE set to Release
CCache version: 4.2
CCache configured for linux: /usr/bin/ccache
The C compiler identification is GNU 10.2.1
The CXX compiler identification is GNU 10.2.1
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: /usr/lib64/ccache/cc - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Use CCache for Unix Makefiles called with: ccache program /usr/bin/ccache 4.2
Performing Test NOT_GNU_CXX_BUG_94190
Performing Test NOT_GNU_CXX_BUG_94190 - Success
Looking for pthread.h
Looking for pthread.h - found
Performing Test CMAKE_HAVE_LIBC_PTHREAD
Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
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 PythonInterp: /usr/bin/python3 (found suitable version "3.9.2", minimum required is "3.5") 
Found PythonLibs: /usr/lib64/libpython3.6m.so (found suitable version "3.6.13", minimum required is "3.5") 
CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:228 (find_package)


Boost version: 1.73.0
Found the following Boost libraries:
  filesystem
  iostreams
  locale
  log
  log_setup
  serialization
  system
  thread
  regex
  date_time
  chrono
  atomic
CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:240 (find_package)


Boost version: 1.73.0
Found the following Boost libraries:
  python39
Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
Found SDL: /usr/lib64/libSDL2.so (found version "2.0.14") 
Found Freetype: /usr/lib64/libfreetype.so (found version "2.10.4") 
CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:293 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib64/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib64/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib64/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:248 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

Found OpenGL: /usr/lib64/libOpenGL.so   
Found OpenAL: /usr/lib64/libopenal.so  
Found Ogg: /usr/lib64/libogg.so  
Found Vorbis: /usr/lib64/libvorbis.so   
CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  GG/CMakeLists.txt:79 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  GG/CMakeLists.txt:79 (find_package)


CMake Warning at cmake/FindBoost.cmake:911 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  cmake/FindBoost.cmake:1033 (_Boost_COMPONENT_DEPENDENCIES)
  cmake/FindBoost.cmake:1723 (_Boost_MISSING_DEPENDENCIES)
  GG/CMakeLists.txt:79 (find_package)


Boost version: 1.73.0
Found the following Boost libraries:
  filesystem
  regex
  system
Found GLEW: /usr/include (found version "2.1.0") 
Found PNG: /usr/lib64/libpng.so (found version "1.6.37") 
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (cppcheck)
  does not match the name of the calling package (CPPCheck).  This can lead
  to problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindCPPCheck.cmake:12 (find_package_handle_standard_args)
  check/CMakeLists.txt:1 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

Found cppcheck: /usr/bin/cppcheck (found version "2.3") 
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args`
  (pycodestyle) does not match the name of the calling package (PyCodestyle).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindPyCodestyle.cmake:11 (find_package_handle_standard_args)
  check/CMakeLists.txt:2 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

Found pycodestyle: /usr/bin/pycodestyle (found version "2.6.0") 
Found Doxygen: /usr/bin/doxygen (found version "1.8.20") found components: doxygen dot 
Configuring done
The two specific warnings about "PyCodestyle" and "CPPCheck" I can get rid by renaming them to all lower case and change the name in the "ceck -> CmakeLists.txt"

As you see, it says: "Found PythonLibs: /usr/lib64/libpython3.6m.so (found suitable version "3.6.13", minimum required is "3.5") " Is there any way to force cmake to use libpython3.9?

Edit: I fiddled around a bit and changed the minimum python-version to 3.7, I got: "Could NOT find PythonLibs: Found unsuitable version "3.6.13", but required
is at least "3.7" (found /usr/lib64/libpython3.6m.so)"

So I checked files and found:
"/usr/lib64/libpython3.6m.so.1.0" for python 3.6
"/usr/lib64/libpython3.9.so.1.0" (without m) for python 3.9.
Maybe they just changed the naming, maybe it's another package, but there is definitly no /usr/lib64/libpython3.9m.so.1.0 (with m) in fedora 33 for python 3.9.
Want some fresh experience? Try Kosymod

o01eg
Programmer
Posts: 2004
Joined: Sat Dec 10, 2011 5:46 am

Re: Compiled it but cant't start game

#19 Post by o01eg »

Could you try install python3-devel-3.9.0-1.fc33.x86_64.rpm ?

Also could you show result of ?

Code: Select all

rpm -qf /usr/lib64/libpython3.6m.so
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

o01eg
Programmer
Posts: 2004
Joined: Sat Dec 10, 2011 5:46 am

Re: Compiled it but cant't start game

#20 Post by o01eg »

I've tried to reproduce it in a fresh docker fedora:33 image:

Code: Select all

# dnf install -y cmake ccache python3-devel gcc-c++ git boost-devel zlib-devel SDL2-devel freetype-devel openal-devel libogg-devel libvorbis-devel  glew-devel
# cmake -DENABLE_TESTING=On ../freeorion
# grep -Rni python CMakeCache.txt 
89://Boost python39 library (debug)
90:Boost_PYTHON39_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libboost_python39.so
92://Boost python39 library (release)
93:Boost_PYTHON39_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libboost_python39.so
485://Python style guide checker
489:PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3
492:PYTHON_INCLUDE_DIR:PATH=/usr/include/python3.9
495:PYTHON_LIBRARY:FILEPATH=/usr/lib64/libpython3.9.so
498:PYTHON_LIBRARY_DEBUG:FILEPATH=PYTHON_LIBRARY_DEBUG-NOTFOUND
583://ADVANCED property for variable: Boost_PYTHON39_LIBRARY_DEBUG
584:Boost_PYTHON39_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
585://ADVANCED property for variable: Boost_PYTHON39_LIBRARY_RELEASE
586:Boost_PYTHON39_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
809://Details about finding PythonInterp
810:FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[/usr/bin/python3][v3.9.2(3.5)]
811://Details about finding PythonLibs
812:FIND_PACKAGE_MESSAGE_DETAILS_PythonLibs:INTERNAL=[/usr/lib64/libpython3.9.so][/usr/include/python3.9][v3.9.2(3.5)]
869://ADVANCED property for variable: PYTHON_EXECUTABLE
870:PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1
871://ADVANCED property for variable: PYTHON_INCLUDE_DIR
872:PYTHON_INCLUDE_DIR-ADVANCED:INTERNAL=1
873://ADVANCED property for variable: PYTHON_LIBRARY
874:PYTHON_LIBRARY-ADVANCED:INTERNAL=1
875://ADVANCED property for variable: PYTHON_LIBRARY_DEBUG
876:PYTHON_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
899:_Boost_COMPONENTS_SEARCHED:INTERNAL=atomic;chrono;date_time;filesystem;iostreams;locale;log;log_setup;python39;regex;serialization;system;thread

# rpm -qf /usr/lib64/libpython3.6m.so
error: file /usr/lib64/libpython3.6m.so: No such file or directory
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Compiled it but cant't start game

#21 Post by drkosy »

Also could you show result of ?
Here you go:

Code: Select all

~# rpm -qf /usr/lib64/libpython3.6m.so
python3.6-3.6.13-1.fc33.x86_64
Could you try install python3-devel-3.9.0-1.fc33.x86_64.rpm ?
After installing that cmake find the right python-libs

Code: Select all

Found PythonInterp: /usr/bin/python3 (found suitable version "3.9.2", minimum required is "3.5") 
Found PythonLibs: /usr/lib64/libpython3.9.so (found suitable version "3.9.2", minimum required is "3.5") 
I finally made it to compile it without errors :D
Many thanks for your help :!:
Want some fresh experience? Try Kosymod

Post Reply