Boost system library missing, compiling 1.9.8 on Ubuntu

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
stupac
Posts: 29
Joined: September 25th, 2005, 10:08 pm
Location: I stay in this place called 'rooms', there's a whole chain of 'em.

Boost system library missing, compiling 1.9.8 on Ubuntu

Post by stupac »

I should stop probably stop switching OSes so much; it seems every time I compile the dev version a new error I can't seem to overcome comes up. Perhaps with enough experience I'll be able to figure these out myself. But, I digress.

This time, scons can't seem to find the boost system library. I have libboost-system (v 1.42) package (and the dev package) installed. And I have tried scons --config=force.

Code: Select all

Checking for Boost system library... (cached) no
Client prerequisites are not met. wesnoth, cutter and exploder cannot be built.
Unit tests are disabled because their prerequisites are not met.
If any config checks fail, look in build/config.log for details
If a check fails spuriously due to caching, use --config=force to force its rerun
scons: done reading SConscript files.
scons: Building targets ...
error_action(["wesnoth"], [])
scons: *** [wesnoth] Target disabled because its prerequisites are not met
scons: building terminated because of errors.
build/config.log: http://pastebin.com/na43G42b
excerpt:

Code: Select all

scons: Configure: "build/sconf_temp/conftest_14.o" is up to date.
scons: Configure: The original builder output was:
  |g++ -o build/sconf_temp/conftest_14.o -c -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include -I/usr/include/SDL build/sconf_temp/conftest_14.cpp
  |
scons: Configure: Building "build/sconf_temp/conftest_14" failed in a previous run and all its sources are up to date.
scons: Configure: The original builder output was:
  |g++ -o build/sconf_temp/conftest_14 build/sconf_temp/conftest_14.o -L/usr/lib -lm -lboost_iostreams-mt -lSDL -lSDL_net -lboost_system-mt
  |
scons: Configure: (cached) no


file /home/stupac/Downloads/wesnoth-1.9.8/SConstruct,line 337:
	Configure(confdir = build/sconf_temp)
Any ideas? Thanks in advance!
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by Gambit »

What version of Ubuntu and what package in particular?
You want to install "libboost1.42-all-dev".
uncleshelby
Posts: 427
Joined: May 10th, 2011, 7:20 pm

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by uncleshelby »

The easiest way to get all dependencies on Ubuntu is "sudo apt-get build-dep wesnoth-1.8". This installs all the dependencies for Wesnoth 1.8 and (bonus!) 1.9.
Timshel
stupac
Posts: 29
Joined: September 25th, 2005, 10:08 pm
Location: I stay in this place called 'rooms', there's a whole chain of 'em.

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by stupac »

I have libboost1.42-all-dev installed and I'm running Ubuntu 11.04.
Image

Did the apt-get build-dep before trying to compile.
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by loonycyborg »

Code: Select all

g++ -o build/sconf_temp/conftest_14.o -c -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include -I/usr/include/SDL build/sconf_temp/conftest_14.cpp
g++ -o build/sconf_temp/conftest_14 build/sconf_temp/conftest_14.o -L/usr/lib -lm -lboost_iostreams-mt -lSDL -lSDL_net -lboost_system-mt
build/sconf_temp/conftest_14.o: In function `__static_initialization_and_destruction_0(int, int)':
conftest_14.cpp:(.text+0x49): undefined reference to `boost::system::generic_category()'
conftest_14.cpp:(.text+0x53): undefined reference to `boost::system::generic_category()'
conftest_14.cpp:(.text+0x5d): undefined reference to `boost::system::system_category()'
collect2: ld returned 1 exit status
This is the actual excerpt from your paste. It suggests that headers and library are from different versions of boost.
"meh." - zookeeper
stupac
Posts: 29
Joined: September 25th, 2005, 10:08 pm
Location: I stay in this place called 'rooms', there's a whole chain of 'em.

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by stupac »

Ah, that could be the issue. I wonder how I ended up with two different config.log's there. No matter, I think you are right. I just went and went to Synaptic and I had 1.42.0.1 versions of the boost libraries checked so I removed them, but that didn't solve it. I also had attempted to build version 1.47 boost libraries (from the boost official site). I had bootstrapped and installed them. I tried to remove them also using ./b2 --clean and it claimed to have removed the build targets.

Those should have been all the versions of boost libraries that ended up on the system. I should only have 1.42.0-4 versions now (from the Ubuntu repositories).

I tried scons --config=force but ended up with an identical output and config.log unfortunately. Is there a way to check that I don't have any lingering incorrect boost library versions clogging up the works?
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by loonycyborg »

Since compile flags include -I/usr/include, -L/usr/lib and -lboost_system-mt it's pretty much certain that ubuntu's boost packages are used. Though I don't know much about debian/ubuntu packaging and thus how different versions of boost could have mixed up.
./b2 install will install into /usr/local by default and could have been used only if there are -I/usr/local/include/... etc switches in command line. There are provisions in wesnoth's scons script to detect such installs but /usr installs take precedence ./b2 --clean will probably not undo an install.
"meh." - zookeeper
stupac
Posts: 29
Joined: September 25th, 2005, 10:08 pm
Location: I stay in this place called 'rooms', there's a whole chain of 'em.

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by stupac »

You are right. Here is what /usr/local/lib looks like:

Code: Select all

stupac@emerac:/usr/local/lib$ ls -la
total 26596
drwxr-xr-x  3 root root     4096 2011-08-23 10:58 .
drwxr-xr-x 10 root root     4096 2011-08-06 11:16 ..
-rw-r--r--  1 root root    88998 2011-08-23 10:28 libboost_chrono.a
lrwxrwxrwx  1 root root       25 2011-08-23 10:23 libboost_chrono.so -> libboost_chrono.so.1.47.0
-rwxr-xr-x  1 root root    35010 2011-08-23 10:23 libboost_chrono.so.1.47.0
-rw-r--r--  1 root root   116082 2011-08-23 10:28 libboost_date_time.a
lrwxrwxrwx  1 root root       28 2011-08-23 10:23 libboost_date_time.so -> libboost_date_time.so.1.47.0
-rwxr-xr-x  1 root root    86695 2011-08-23 10:23 libboost_date_time.so.1.47.0
-rw-r--r--  1 root root     1310 2011-08-23 10:26 libboost_exception.a
-rw-r--r--  1 root root   284118 2011-08-23 10:29 libboost_filesystem.a
lrwxrwxrwx  1 root root       29 2011-08-23 10:23 libboost_filesystem.so -> libboost_filesystem.so.1.47.0
-rwxr-xr-x  1 root root   160130 2011-08-23 10:23 libboost_filesystem.so.1.47.0
-rw-r--r--  1 root root   609662 2011-08-23 10:37 libboost_graph.a
lrwxrwxrwx  1 root root       24 2011-08-23 09:54 libboost_graph.so -> libboost_graph.so.1.47.0
-rwxr-xr-x  1 root root   423166 2011-08-23 09:54 libboost_graph.so.1.47.0
-rw-r--r--  1 root root   239008 2011-08-23 10:46 libboost_math_c99.a
-rw-r--r--  1 root root   233932 2011-08-23 10:47 libboost_math_c99f.a
lrwxrwxrwx  1 root root       28 2011-08-23 10:04 libboost_math_c99f.so -> libboost_math_c99f.so.1.47.0
-rwxr-xr-x  1 root root   145452 2011-08-23 10:04 libboost_math_c99f.so.1.47.0
-rw-r--r--  1 root root   242284 2011-08-23 10:48 libboost_math_c99l.a
lrwxrwxrwx  1 root root       28 2011-08-23 10:05 libboost_math_c99l.so -> libboost_math_c99l.so.1.47.0
-rwxr-xr-x  1 root root   144846 2011-08-23 10:05 libboost_math_c99l.so.1.47.0
lrwxrwxrwx  1 root root       27 2011-08-23 10:03 libboost_math_c99.so -> libboost_math_c99.so.1.47.0
-rwxr-xr-x  1 root root   146686 2011-08-23 10:03 libboost_math_c99.so.1.47.0
-rw-r--r--  1 root root  1580762 2011-08-23 10:40 libboost_math_tr1.a
-rw-r--r--  1 root root  1574732 2011-08-23 10:43 libboost_math_tr1f.a
lrwxrwxrwx  1 root root       28 2011-08-23 10:00 libboost_math_tr1f.so -> libboost_math_tr1f.so.1.47.0
-rwxr-xr-x  1 root root   346737 2011-08-23 10:00 libboost_math_tr1f.so.1.47.0
-rw-r--r--  1 root root  1579076 2011-08-23 10:45 libboost_math_tr1l.a
lrwxrwxrwx  1 root root       28 2011-08-23 10:02 libboost_math_tr1l.so -> libboost_math_tr1l.so.1.47.0
-rwxr-xr-x  1 root root   335602 2011-08-23 10:02 libboost_math_tr1l.so.1.47.0
lrwxrwxrwx  1 root root       27 2011-08-23 09:57 libboost_math_tr1.so -> libboost_math_tr1.so.1.47.0
-rwxr-xr-x  1 root root   331781 2011-08-23 09:57 libboost_math_tr1.so.1.47.0
-rw-r--r--  1 root root    97356 2011-08-23 10:53 libboost_prg_exec_monitor.a
lrwxrwxrwx  1 root root       35 2011-08-23 10:12 libboost_prg_exec_monitor.so -> libboost_prg_exec_monitor.so.1.47.0
-rwxr-xr-x  1 root root    83572 2011-08-23 10:12 libboost_prg_exec_monitor.so.1.47.0
-rw-r--r--  1 root root   879794 2011-08-23 10:50 libboost_program_options.a
lrwxrwxrwx  1 root root       34 2011-08-23 10:08 libboost_program_options.so -> libboost_program_options.so.1.47.0
-rwxr-xr-x  1 root root   527270 2011-08-23 10:08 libboost_program_options.so.1.47.0
-rw-r--r--  1 root root    12930 2011-08-23 10:50 libboost_random.a
lrwxrwxrwx  1 root root       25 2011-08-23 10:08 libboost_random.so -> libboost_random.so.1.47.0
-rwxr-xr-x  1 root root    17195 2011-08-23 10:08 libboost_random.so.1.47.0
-rw-r--r--  1 root root  2166394 2011-08-23 10:35 libboost_regex.a
lrwxrwxrwx  1 root root       24 2011-08-23 09:53 libboost_regex.so -> libboost_regex.so.1.47.0
-rwxr-xr-x  1 root root  1273738 2011-08-23 09:53 libboost_regex.so.1.47.0
-rw-r--r--  1 root root  1032766 2011-08-23 10:52 libboost_serialization.a
lrwxrwxrwx  1 root root       32 2011-08-23 10:10 libboost_serialization.so -> libboost_serialization.so.1.47.0
-rwxr-xr-x  1 root root   637868 2011-08-23 10:10 libboost_serialization.so.1.47.0
-rw-r--r--  1 root root   147468 2011-08-23 10:53 libboost_signals.a
lrwxrwxrwx  1 root root       26 2011-08-23 10:12 libboost_signals.so -> libboost_signals.so.1.47.0
-rwxr-xr-x  1 root root   104452 2011-08-23 10:12 libboost_signals.so.1.47.0
-rw-r--r--  1 root root    28462 2011-08-23 10:27 libboost_system.a
lrwxrwxrwx  1 root root       25 2011-08-23 10:23 libboost_system.so -> libboost_system.so.1.47.0
-rwxr-xr-x  1 root root    20216 2011-08-23 10:23 libboost_system.so.1.47.0
-rw-r--r--  1 root root  1588384 2011-08-23 10:26 libboost_test_exec_monitor.a
-rw-r--r--  1 root root   176500 2011-08-23 10:54 libboost_thread.a
lrwxrwxrwx  1 root root       25 2011-08-23 10:16 libboost_thread.so -> libboost_thread.so.1.47.0
-rwxr-xr-x  1 root root   138609 2011-08-23 10:16 libboost_thread.so.1.47.0
-rw-r--r--  1 root root  1742826 2011-08-23 10:53 libboost_unit_test_framework.a
lrwxrwxrwx  1 root root       38 2011-08-23 10:16 libboost_unit_test_framework.so -> libboost_unit_test_framework.so.1.47.0
-rwxr-xr-x  1 root root  1003972 2011-08-23 10:16 libboost_unit_test_framework.so.1.47.0
-rw-r--r--  1 root root  3466868 2011-08-23 10:58 libboost_wave.a
lrwxrwxrwx  1 root root       23 2011-08-23 10:23 libboost_wave.so -> libboost_wave.so.1.47.0
-rwxr-xr-x  1 root root  2072300 2011-08-23 10:23 libboost_wave.so.1.47.0
-rw-r--r--  1 root root   729762 2011-08-23 10:53 libboost_wserialization.a
lrwxrwxrwx  1 root root       33 2011-08-23 10:11 libboost_wserialization.so -> libboost_wserialization.so.1.47.0
-rwxr-xr-x  1 root root   475724 2011-08-23 10:11 libboost_wserialization.so.1.47.0
drwxrwsr-x  4 root staff    4096 2011-08-06 11:17 python2.7
Looks like all 1.47 files are being linked to. Before I screw this up more, I should ask: how do I fix this? I was thinking of just removing all the files and perhaps reinstalling the Ubuntu versions, but I don't want to mess things up more. I've been looking into removing boost, but I haven't been able to find any more documentation that to do ./b2 --clean.
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by loonycyborg »

It only ever installs headers into /usr/local/include/boost and libs into /usr/local/lib that all have names like libboost_*.so, so just deleting them will be enough.
"meh." - zookeeper
stupac
Posts: 29
Joined: September 25th, 2005, 10:08 pm
Location: I stay in this place called 'rooms', there's a whole chain of 'em.

Re: Boost system library missing, compiling 1.9.8 on Ubuntu

Post by stupac »

Loony Cyborg, you've once again saved the day. Thank you sir! I removed the libraries and headers and it's in the process of compiling now. I will try to get the installation right next time.

I greatly appreciate the help!

Cheers!
Post Reply