Ubuntu 14.04 Build Fail

Problems building or running the engine, queries about how to use features etc.
Post Reply
face_gcc
Gnoblar
Posts: 1
Joined: Wed Jun 04, 2014 8:48 pm

Ubuntu 14.04 Build Fail

Post by face_gcc »

Hi,

Attempting to build ogre module on ubuntu 14.04 but receive the following error at 97% completion:
CMakeFiles/SampleBrowser.dir/src/SampleBrowser.cpp.o: In function `thread_exception':
/usr/include/boost/thread/exceptions.hpp:51: undefined reference to `boost::system::system_category()'
CMakeFiles/SampleBrowser.dir/src/SampleBrowser.cpp.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()'
It seems like a boost header file doesn't have a reference to a different file in the boost library but checking /usr/include/boost/thread/exceptions.hpp it did have a #include <boost/system/error_code.hpp> where boost::system::system_category() is indeed defined as an inline function. I am using libboost1.54-dev-all. It only seems to fail when trying to build Sample/Browser and Ogrexmlparser. If anyone has come across this or any problem similar when compiling with the boost library please help.
levan
Halfling
Posts: 41
Joined: Sun Oct 27, 2013 11:57 pm
x 1

Re: Ubuntu 14.04 Build Fail

Post by levan »

I have absolutely the same problem. Just upgraded to the ubuntu 14.04 and cant build the project. However the old projects which were build on previous ubuntu 12 are working fine. So with Ogre itself it everything ok something is wrong with linking boost properly. I changed things in liner files to add -lboost_system, gave directory were boost is installed in my cmake file before starting project but nothing works. I am using Qt creator.
levan
Halfling
Posts: 41
Joined: Sun Oct 27, 2013 11:57 pm
x 1

Re: Ubuntu 14.04 Build Fail

Post by levan »

To whoever will have same problem in the future.
There is some kind of a bug for ubuntu 14.04 and new versions of boost.
The fix is provided by it did not work for me. https://bugs.launchpad.net/blitzortung- ... ug/1404048

What I did is following. First erased all the lboost libraries that I had on my system:
find which version of boost I have: dpkg -S /usr/include/boost/version.hpp and remove it: sudo apt-get autoremove package
(version can be retrieved also like this: cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION")
Also delete everything from /usr/local/lib/libboost* and /usr/local/include/boost

Download version 1.50 of boost. http://www.boost.org/users/history/version_1_50_0.html
anzip and install it:
./bootstrap.sh
./b2 install

Add version 1.50 to the CMakeLists.txt file of the ogre project

Build project eithther with cmake -i or from the IDE I used QT creator.

find linker file that is located in /CMakeFiles/OgreApp.dir folder open it and add command -lboost_system

Then
make

Errors like usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()' will appear during the process

There will be only three subsequent lines. Open the file usr/include/boost/system/error_code.hpp and comment out these three lines //

then back to the project folder, make, make install, and it should work.
User avatar
kulik
Gremlin
Posts: 183
Joined: Sun May 01, 2005 2:00 pm
x 23
Contact:

Re: Ubuntu 14.04 Build Fail

Post by kulik »

Or just link to boost_system. This is not a bug AFAIK, this is a change in boost > 1.50.
mpreisler on IRC | CEGUI team member, CEGUI Unified Editor developer, OISB founder
levan
Halfling
Posts: 41
Joined: Sun Oct 27, 2013 11:57 pm
x 1

Re: Ubuntu 14.04 Build Fail

Post by levan »

kulik wrote:Or just link to boost_system. This is not a bug AFAIK, this is a change in boost > 1.50.


Only link to boost_system is not working with ubuntu 14.04 with ubuntu 12 it needed only link. However with 14.04 You have to comment out these lines from the one of the boost files that are giving errors.
Post Reply