tags:

views:

449

answers:

2

I am trying to compile a package on ubuntu 8.1

when executing this command: ./configure I get the follwoing error:

checking for Boost headers version >= 103700... no configure: error: cannot find Boost headers version >= 103700

knowing that I installed needed boost packages using these command:

$ apt-get install libboost-dev libboost-graph-dev libboost-iostreams-dev

Can anybody help please?

+1  A: 

It could be that the version of boost that you're getting from the Ubuntu repository is too old (it's suggested here that the highest version for 8.10 is 1.35; it looks like your configure script is asking for 1.37). You might need to build from source; there's some more info in the answers to the question I linked to which will hopefully help.

UPDATE:

From your new error, it sounds like configure now can't find the boost_iostreams library. On my system it's /usr/lib/libboost_iostreams-mt.[a|so] - do you have those files (possibly in a different directory depending on where you installed boost)?

You can also try running ldconfig in case there's a missing symlink (from, say, libboost_iostreams-mt.so.1.37.0 to libboost_iostreams-mt.so).

Is this configure one generated by GNU autoconf? If it is, there should be a file called config.log in the same directory which contains a list of all the commands configure tried to run when looking for things. If there's anything in there about boost_iostreams could you post it?

One totally random guess: some examples I've found on the web link to boost_iostreams without the multi-threading suffix -mt - but I don't have those on my machine at all. Maybe your configure script is running into the same problem?

UPDATE 2

The configure script seems to be looking for a single-threaded debug build of the boost iostreams library, which won't be produced by default when building from source on linux. Also, the default on linux is not to name the libraries based on the build configuration (so the libs you found in /usr/lib might not be the ones you installed from source unless you overrode this). This stuff isn't really explained on the boost website, I only found out by looking in the Jamroot file (bjam --help works too)! Anyway, to get a library with the right build configuration, and named correctly, I need to go into the root of the boost source tree and run:

sudo bjam --with-iostreams --layout=tagged variant=debug threading=single install

For me this puts the libraries (libboost_iostreams-d.a and the shared versions) into /usr/local/lib where ld will find them by default, so this should be fine. If you need them to go somewhere else you can use the --prefix=... option to bjam eg. if you want them in /usr/lib you can do --prefix=/usr. If the package you're building needs more boost libraries you can remove the --with-iostreams and then they'll all be built (or replace iostream with the name of each other library you need).

A side note: I had to install the libbz2-dev package to get boost iostreams to build - it's easy to miss the error here if you build all of boost as there's so much output!

Mike Dinsdale
thank you. Now it works but i get another error when running ./configure:checking boost/iostreams/device/file_descriptor.hpp usability... yeschecking boost/iostreams/device/file_descriptor.hpp presence... yeschecking for boost/iostreams/device/file_descriptor.hpp... yeschecking for the Boost iostreams library... noconfigure: error: cannot not find the flags to link with Boost iostreamsany ideas please?
senioritta
senioritta
thank youuuuuuuuuuuuuuu very much MikeI just executed ./bjam --with-iostreams --layout=tagged variant=debug threading=single install and everything went okreally thank you very much
senioritta
No problem, glad to help!
Mike Dinsdale
A: 

thank you. Now it works but i get another error when running ./configure: checking boost/iostreams/device/file_descriptor.hpp usability... yes checking boost/iostreams/device/file_descriptor.hpp presence... yes checking for boost/iostreams/device/file_descriptor.hpp... yes checking for the Boost iostreams library... no configure: error: cannot not find the flags to link with Boost iostreams any ideas please?

senioritta
This really should be an edit to the original question. SO works better that way. Since answers are in changeable and partly random order, there's no way to have a conversation with them, unlike many other web forums.
David Thornley