ely
ely

Reputation: 77424

Skipped <dir> for lack of ... error while trying to install Boost 1.49 on Ubuntu 11.04

While trying to install Boost 1.49, I keep getting a persistent issue when I reach the stage where I use the bjam script. For reference, I am following the install instructions linked here, but I've also referenced the boost.org install page too. The procedures are essentially identical and both give the same issue.

I downloaded the tar file into the directory where I keep all of the software that I install: /home/ely/Software/Boost/boost_1_49_0/

I want the Boost stuff to install into the directory /usr/include/boost_1_49/ so I use the following commands:

 $ ./bootstrap.sh --prefix=/usr/include/boost_1_49 --libdir=/usr/include/boost_1_49/lib
 $ ./bjam variant=release link=shared install

The first command takes a bit of time, but seems to succeed and yields no errors. The second command takes much longer and then consistently outputs stuff like this:

 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/stdexcept for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/iomanip for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/new for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/fstream for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/set for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/locale for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/string for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/limits for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/complex for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/queue for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/stack for lack of /usr/include/boost_1_49/include/boost...
 ...skipped <p/usr/include/boost_1_49/include/boost>tr1/tr1/unordered_set for lack of /usr/include/boost_1_49/include/boost...

And at the bottom of all these skips, it always says:

 ...failed updating 28 targets...
 ...skipped 9778 targets...

I have repeatedly checked the generated project file, project-config.jam and it lists the correct path names for the variables prefix, exec-prefix, libdir, and includedir, so I don't think that the .jam file is the issue.

I also thought maybe it was a permissions issue with creating folders in /usr/include. So I chmoded /usr/include/boost_1_49 to 777, tried the commands again, and get the same result.

Does anyone have an idea about how to fix this problem, and ultimately how to get Boost installed so that the files can be found in /usr/include/boost_1_49/?

Added

If I just directly put the tar file into the directory I want, /usr/include.boost_1_49, then the install process finishes successfully without all of the skips, and it tells me the following:

 The Boost C++ Libraries were successfully built!

 The following directory should be added to compiler include paths:

     /usr/include/boost_1_49

 The following directory should be added to linker library paths:

     /usr/include/boost_1_49/stage/lib

But even after adding these to the appropriate .conf files that I use, and issuing sudo ldconfig to refresh the paths, I get errors when trying to include Boost things. For example, if I try to include the file boost/math/distributions.hpp, then I get the error:

/usr/include/boost_1_49/boost/math/distributions.hpp:25: fatal error: boost/math/distributions/geometric.hpp: No such file or directory

I manually verified that the geometric.hpp file is located in the correct place, it just cannot see it. I'm guessing that all of the #include <boost...> lines in distributions.hpp are not correctly identifying the version in /usr/include/boost_1_49, but I have no clue why they aren't or how to change it so they are.

Upvotes: 2

Views: 2549

Answers (1)

Romeo Ahohe
Romeo Ahohe

Reputation: 21

I was having the same issue until I realize the username I was using to run the bjam command did not have permission to write to the /usr/include directory.

You need to run the bjam command as:

sudo ./bjam --your-options--

Upvotes: 2

Related Questions