FreeOrion

Forums for the FreeOrion project
It is currently Sun Nov 19, 2017 3:20 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Jul 09, 2017 9:43 am 
Offline
Space Floater
User avatar

Joined: Tue Dec 09, 2014 11:46 pm
Posts: 29
Before trying to build FreeOrion from the repository, I built gcc 5.4; seemed to work correctly. Then I built Boost 1.64; that seemed to work correctly too. (I built it with gcc 4.9.2, not 5.4, if that matters.)

So then I tried building FreeOrion, and got weird errors. It seems like it’s not finding certain Boost libraries. Not sure which ones, though; the error messages are rather cryptic and lacking in details.

First, I tell it where to find my custom builds:
$ export BOOST_ROOT=/misc/boost_1_64_0
$ export CC=/misc/gcc54/usr/local/bin/gcc
$ export CXX=/misc/gcc54/usr/local/bin/g++

Create a separate build directory:
$ pwd
/misc/fo/repo/freeorion
$ cd ..
$ mkdir fo-build
$ cd fo-build

Record the output:
$ script -f ../cmake-run

Run cmake:
$ cmake ../freeorion

Full output is below. Summarizing:

It sees the correct compiler. Omitting some lines:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /misc/gcc54/usr/local/bin/gcc -- works
-- Check for working CXX compiler: /misc/gcc54/usr/local/bin/g++ -- works

It had some trouble with pthread but seemed to find it eventually:
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread - found

Then I get this, repeated 12 times:
CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)

Followed by other messages about Boost, but this seems to be where it went off the rails.

Anyone know what’s going on here? I looked at various files and was not enlightened.

Full output:
-- Setting build type to 'Release' as none was specified.
-- Build type CMAKE_BUILD_TYPE set to Release
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /misc/gcc54/usr/local/bin/gcc
-- Check for working C compiler: /misc/gcc54/usr/local/bin/gcc -- 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: /misc/gcc54/usr/local/bin/g++
-- Check for working CXX compiler: /misc/gcc54/usr/local/bin/g++ -- 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
-- 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 PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.9", minimum required is "2.7")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.9", minimum required is "2.7")
CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:153 (find_package)


CMake Error at /usr/share/cmake-3.6/Modules/FindBoost.cmake:1772 (message):
Unable to find the requested Boost libraries.

Boost version: 1.64.0

Boost include path: /misc/boost_1_64_0/include

Could not find the following Boost libraries:

boost_python

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:153 (find_package)


-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.6.3")
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found SDL: /usr/lib/x86_64-linux-gnu/libSDL2.so (found version "2.0.5")
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so
-- Found Ogg: /usr/lib/x86_64-linux-gnu/libogg.so
-- Found Vorbis: /usr/lib/x86_64-linux-gnu/libvorbis.so
CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
GG/CMakeLists.txt:95 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
GG/CMakeLists.txt:95 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
GG/CMakeLists.txt:95 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
GG/CMakeLists.txt:95 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
GG/CMakeLists.txt:95 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
GG/CMakeLists.txt:95 (find_package)


CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106400
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
GG/CMakeLists.txt:95 (find_package)


-- Boost version: 1.64.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- regex
-- signals
-- system
-- thread
-- log
-- Found GLEW: /usr/include
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.2.50")
-- Could NOT find cppcheck (missing: CPPCHECK_EXECUTABLE)
-- Could NOT find pycodestyle (missing: PYCODESTYLE_EXECUTABLE)
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.8")
-- Configuring incomplete, errors occurred!
See also "/misc/fo/repo/fo-build/CMakeFiles/CMakeOutput.log".
See also "/misc/fo/repo/fo-build/CMakeFiles/CMakeError.log".


Top
 Profile  
 
PostPosted: Sun Jul 09, 2017 12:03 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 198
Here are some suggestions, and questions for next time.
Suggestions
    1. Recompile the boost libraries with gcc 5.4. One of the changes in gcc 5.0 was a major ABI change to support C++11. FreeOrion compiled with gcc 5.4 may link with boost libraries compiled with 4.9.2, but it will crash.

    2. Find, install, and compile if necessary boost python
    Tualha wrote:
    Could not find the following Boost libraries:

    boost_python

    3. Install cppcheck and pycodestyle
    Tualha wrote:
    -- Could NOT find cppcheck (missing: CPPCHECK_EXECUTABLE)
    -- Could NOT find pycodestyle (missing: PYCODESTYLE_EXECUTABLE)
Questions for next time
What distro are you using?
Next time could you post "/misc/fo/repo/fo-build/CMakeFiles/CMakeError.log" as well?


Top
 Profile  
 
PostPosted: Sun Jul 09, 2017 12:19 pm 
Offline
Space Floater
User avatar

Joined: Tue Dec 09, 2014 11:46 pm
Posts: 29
LGM-Doyle wrote:
1. Recompile the boost libraries with gcc 5.4. One of the changes in gcc 5.0 was a major ABI change to support C++11. FreeOrion compiled with gcc 5.4 may link with boost libraries compiled with 4.9.2, but it will crash.

Aha! Not sure if that’s behind this problem, but it sounds necessary, anyway.

Quote:
2. Find, install, and compile if necessary boost python

Isn’t that part of Boost? It seems to be there. Perhaps CMake can’t see it because of issue #1.

Quote:
3. Install cppcheck and pycodestyle

Will do.

Quote:
What distro are you using?

Debian 8, “jessie”. Debian is rather notorious for outdated versions. The next release just hit stable and I plan to install it eventually, but that can be disruptive, so I was hoping I could get this working by building things myself.

Quote:
Next time could you post "/misc/fo/repo/fo-build/CMakeFiles/CMakeError.log" as well?

Will do. Thanks for all the input. :)


Top
 Profile  
 
PostPosted: Sun Jul 09, 2017 2:47 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 341
Quote:
Imported targets not available for Boost version 106400

Sounds like FindBoost.cmake is not updated for 1.64
You might try also setting Boost_ADDITIONAL_VERSION to 1.64.0, personally I just update the script (source), but might not be suitable resolution for everyone.

(Some previous related discussion on PR #1385)

_________________
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.


Top
 Profile  
 
PostPosted: Sun Jul 09, 2017 3:47 pm 
Offline
Space Floater
User avatar

Joined: Tue Dec 09, 2014 11:46 pm
Posts: 29
dbenage-cx wrote:
Quote:
Imported targets not available for Boost version 106400

Sounds like FindBoost.cmake is not updated for 1.64
You might try also setting Boost_ADDITIONAL_VERSION to 1.64.0, personally I just update the script (source), but might not be suitable resolution for everyone.

(Some previous related discussion on PR #1385)

Hmm, good thoughts. I have to rebuild Boost anyway, so maybe I’ll just use the version that CMake knows about. Thanks :)


Top
 Profile  
 
PostPosted: Sun Jul 09, 2017 5:24 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4374
Also, I seem to recall that last time I built boost for FO, which was a fair while back, that I had to go out of my way to get it to build the particular types of libraries that FO needed (I think I needed to specify -mt for multi threaded libraries). That's not seeming like a super likely candidate here, but perhaps just enough of a possibility to be worth mentioning.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Sun Jul 09, 2017 5:51 pm 
Offline
Space Floater
User avatar

Joined: Tue Dec 09, 2014 11:46 pm
Posts: 29
Dilvish wrote:
Also, I seem to recall that last time I built boost for FO, which was a fair while back, that I had to go out of my way to get it to build the particular types of libraries that FO needed (I think I needed to specify -mt for multi threaded libraries). That's not seeming like a super likely candidate here, but perhaps just enough of a possibility to be worth mentioning.

Yes, worth mentioning. It could be a factor. Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group