Linking failed libfreeorioncommon.so

Questions, problems and discussion about compiling FreeOrion.
Message
Author
User avatar
Dilvish
AI Lead, Programmer
Posts: 4683
Joined: Sat Sep 22, 2012 6:25 pm

Re: Linking failed libfreeorioncommon.so

#46 Post by Dilvish » Tue May 26, 2015 10:36 pm

marcOSX wrote:
Dilvish wrote:Could you save me a bit of time, and let me know what specifically was not up to date?
I will try to explain what I remember. First of all, I was doing that in a pretty vanilla install of trusty, as I had not set yet a complete development environment....Then when compiling freeorion, I got diffrent pauses and had to install different libs. Each one I identified in the logs but the message I mostly remember is "pthreads not found" because I realized that I had quite some crucial libs missing....
Sounds like you had overlooked installing build-essential, which includes libc, which in turn provides pthreads.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

marcOSX
Space Squid
Posts: 55
Joined: Sat May 31, 2014 5:20 pm

Re: Linking failed libfreeorioncommon.so

#47 Post by marcOSX » Wed May 27, 2015 8:20 am

Dilvish wrote:Sounds like you had overlooked installing build-essential, which includes libc, which in turn provides pthreads.
Exactly. Many things are not installed by default in Ubuntu. Now I have a functional built environment with libs up-to-date, and the new unbuntu release is out...

User avatar
adesst
Space Floater
Posts: 18
Joined: Tue May 05, 2015 10:38 am

Re: Linking failed libfreeorioncommon.so

#48 Post by adesst » Sat Jun 06, 2015 6:51 am

I compiled the recent git pull

Code: Select all

commit e06ec0f75c7bb3ff434cd185e225f890d940bb33
Merge: 8bfa7ee da1426e
Author: adesanto asman <adesantoasman@gmail.com>
Date:   Sat Jun 6 12:21:31 2015 +0700

    Merge branch 'master' of github.com:freeorion/freeorion

commit da1426eb10db4a829e96ca2c2501c20dfd321b0c
Merge: 0a569ed def14a0
Author: Dilvish-fo <dilvish.fo@gmail.com>
Date:   Fri Jun 5 20:55:54 2015 -0700

    Merge pull request #97 from Deepsloth/master
    
    Added the Maintenance Ship as an alternative to the Sentry.
Got an error

Code: Select all

make -f CMakeFiles/freeorioncommon.dir/build.make CMakeFiles/freeorioncommon.dir/build
make[2]: Entering directory `/opt/c++/freeorion'
/usr/bin/cmake -E cmake_progress_report /opt/c++/freeorion/CMakeFiles 
[  0%] Building CXX object CMakeFiles/freeorioncommon.dir/combat/CombatEvent.cpp.o
/usr/libexec/icecc/bin/c++   -DBOOST_ALL_DYN_LINK -DENABLE_BINRELOC -DFREEORION_BUILD_COMMON -DFREEORION_LINUX -Wno-deprecated -Wall -Wno-parentheses -O3 -DNDEBUG -fPIC -I/opt/c++/boost_1_58_0 -I/opt/c++/freeorion -I/opt/c++/freeorion/GG    -fvisibility=hidden -o CMakeFiles/freeorioncommon.dir/combat/CombatEvent.cpp.o -c /opt/c++/freeorion/combat/CombatEvent.cpp
In file included from /opt/c++/freeorion/combat/../util/Serialize.ipp:21:0,
                 from /opt/c++/freeorion/combat/CombatEvent.cpp:7:
/opt/c++/boost_1_58_0/boost/serialization/deque.hpp: In function ‘void boost::serialization::load(Archive&, std::deque<U, Allocator>&, unsigned int)’:
/opt/c++/boost_1_58_0/boost/serialization/deque.hpp:48:11: error: ‘library_version_type’ in namespace ‘boost::archive’ does not name a type
     const boost::archive::library_version_type library_version(
           ^
/opt/c++/boost_1_58_0/boost/serialization/deque.hpp:55:8: error: ‘library_version_type’ is not a member of ‘boost::archive’
     if(boost::archive::library_version_type(3) < library_version){
        ^
/opt/c++/boost_1_58_0/boost/serialization/deque.hpp:55:50: error: ‘library_version’ was not declared in this scope
     if(boost::archive::library_version_type(3) < library_version){
                                                  ^
In file included from /opt/c++/boost_1_58_0/boost/system/system_error.hpp:14:0,
                 from /opt/c++/boost_1_58_0/boost/thread/exceptions.hpp:22,
                 from /opt/c++/boost_1_58_0/boost/thread/pthread/mutex.hpp:14,
                 from /opt/c++/boost_1_58_0/boost/thread/mutex.hpp:16,
                 from /opt/c++/freeorion/combat/../universe/EnableTemporaryFromThis.h:8,
                 from /opt/c++/freeorion/combat/../universe/TemporaryPtr.h:5,
                 from /opt/c++/freeorion/combat/../universe/ObjectMap.h:15,
                 from /opt/c++/freeorion/combat/../universe/Universe.h:6,
                 from /opt/c++/freeorion/combat/CombatEvent.cpp:9:
/opt/c++/boost_1_58_0/boost/system/error_code.hpp: At global scope:
/opt/c++/boost_1_58_0/boost/system/error_code.hpp:221:36: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable]
     static const error_category &  posix_category = generic_category();
                                    ^
/opt/c++/boost_1_58_0/boost/system/error_code.hpp:222:36: warning: ‘boost::system::errno_ecat’ defined but not used [-Wunused-variable]
     static const error_category &  errno_ecat     = generic_category();
                                    ^
/opt/c++/boost_1_58_0/boost/system/error_code.hpp:223:36: warning: ‘boost::system::native_ecat’ defined but not used [-Wunused-variable]
     static const error_category &  native_ecat    = system_category();
                                    ^
make[2]: *** [CMakeFiles/freeorioncommon.dir/combat/CombatEvent.cpp.o] Error 1
make[2]: Leaving directory `/opt/c++/freeorion'
make[1]: *** [CMakeFiles/freeorioncommon.dir/all] Error 2
make[1]: Leaving directory `/opt/c++/freeorion'
make: *** [all] Error 2
And fixed the error with

Code: Select all

diff --git a/util/Serialize.ipp b/util/Serialize.ipp
index d41086a..c42a30d 100644
--- a/util/Serialize.ipp
+++ b/util/Serialize.ipp
@@ -4,6 +4,9 @@
 
 #include <boost/static_assert.hpp>
 #include <boost/detail/endian.hpp>
+#include <boost/version.hpp>
+
My OS is,

Code: Select all

[adesanto@localhost freeorion]$ uname -a
Linux localhost.localdomain 3.14.8-100.fc19.x86_64 #1 SMP Mon Jun 16 21:53:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Boost version is 105800

Anyone could confirm the same issue?

User avatar
Dilvish
AI Lead, Programmer
Posts: 4683
Joined: Sat Sep 22, 2012 6:25 pm

Re: Linking failed libfreeorioncommon.so

#49 Post by Dilvish » Sat Jun 06, 2015 3:07 pm

adesst wrote:Anyone could confirm the same issue?
No need, it is clear. When you made the include workaround described earlier in this thread, you overlooked including version.hpp, which is where the BOOST_VERSION variable is set. At that time you instead set that variable when invoking cmake, which you perhaps overlooked this time. I've now committed the 1.58 workarounds to Process.h and Serialiaze.ipp from earlier in this thread, and added this boost/version.hpp include
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply