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?


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?

George Stocker
  • 57,289
  • 29
  • 176
  • 237
senioritta
  • 21
  • 1
  • 1
  • 2
  • Ubuntu 8.10 (that's what you're using, right?) is a bit on the old side. I believe it's going out of support at the end of the month. Would it be practical to upgrade to a newer version of Ubuntu, that would have a later version of Boost? (One of the things I find annoying about Ubuntu's package management system is that it leaves you at a particular version, which isn't upgraded until your Ubuntu is.) – David Thornley Apr 14 '10 at 15:01

1 Answers1

2

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!

Community
  • 1
  • 1
Mike Dinsdale
  • 1,491
  • 9
  • 8
  • 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 Apr 14 '10 at 12:51
  • Yes the configure is generated by GNU autoconf. there is a file called config.log and here are some lines that contain boost_iostreams: ***** lboost_iostreams-d -ldl >&5 /usr/bin/ld: cannot find -lboost_iostreams-d collect2: ld returned 1 exit status configure:20345: $? = 1 configure:20333: re-using the existing conftest.o configure:20339: g++ -o conftest -g -O2 -W -Wall -DSYS_PLUGIN_DIR='"${pkglibdir}/plugins"' -DUSER_PLUGIN_DIR='".dlvhex/plugins"' -L/lib conftest.o ********************* and I have the files libboost_iostreams-mt.[a|so] undr /usr/lib and thank u in advance Mike – senioritta Apr 17 '10 at 10:11
  • thank youuuuuuuuuuuuuuu very much Mike I just executed ./bjam --with-iostreams --layout=tagged variant=debug threading=single install and everything went ok really thank you very much – senioritta Apr 17 '10 at 15:23