newbie boost thread build under Linux help
I had such success with Boost under Windows, that I'm now trying to get it up and running under Linux. This is not a happy experience. I got it to work, but this can't be the way it's supposed to be done: I'm using boost_1_30_0. I installed the bjam RPM (boost_jam_3.1.4-1.i386.rpm). bjam "-sTOOLS=gcc" from a bash command line. I had all sorts of very strange error messages, so I set about upgrading my Linux environment. I boostrapped the gcc 3.3 compiler (I had 2.6 something). Same error messages. I upgraded libstdc++ to libstdc++-v3.0.97-gcc-3.1.x.tar.gz (I'm seeing the gcc version mismatch as I type this, but it is the latest libstdc++). The "merging into an existing compiler" instructions seemed really complicated so I installed it and re-bootstrapped the compiler. Got a more sensible error message: Unknown compiler version please run the configure tests and report the results. (from gnu.hpp) I hacked gnu.hpp to allow the 3.3 compiler. The error message changed to being unable to find the std:: headers (first one was <utility> from select_stdlib.hpp). I seem to have at least four versions: /usr/include/g++-2/utility /usr/include/g++-3/utility /usr/include/g++-v3/utility (judging by the dates, this seems the correct one) /usr/local/include/c++/utility Obviously, none of these are in the compiler's include path. bjam "-sTOOLS=gcc" "-sGCC_INCLUDE_DIRECTORY=/usr/include/g++-v3" Wasn't helpful: "bits/c++config.h" can't be found. That's in /usr/include/g++-v3/i686-pc-linux-gnu. However, there doesn't seem to be a way to specify more than one include directory (neither multiple "-s" nor delimited paths in a single "-s" worked). So I copied everything from i686-pc-linux-gnu/bits to ../../bits. It built. This can't be normal. How is this process supposed to work? Thanks, - Mark
Mark Sizer
I hacked gnu.hpp to allow the 3.3 compiler. The error message changed to being unable to find the std:: headers (first one was <utility> from select_stdlib.hpp). I seem to have at least four versions: /usr/include/g++-2/utility /usr/include/g++-3/utility /usr/include/g++-v3/utility (judging by the dates, this seems the correct one) /usr/local/include/c++/utility
Obviously, none of these are in the compiler's include path.
bjam "-sTOOLS=gcc" "-sGCC_INCLUDE_DIRECTORY=/usr/include/g++-v3"
Wasn't helpful: "bits/c++config.h" can't be found. That's in /usr/include/g++-v3/i686-pc-linux-gnu. However, there doesn't seem to be a way to specify more than one include directory (neither multiple "-s" nor delimited paths in a single "-s" worked).
So I copied everything from i686-pc-linux-gnu/bits to ../../bits. It built.
This can't be normal. How is this process supposed to work?
This, unfortunately, is not really a Boost question. The problem is with your GCC installation. I'm not an expert on what it takes to do it right, but I have done it successfully many times. When installing on a system which has another existing GCC installation, IIRC, you *must* use --prefix=... to arrange for it to be installed somewhere other than the default place. I suggest you take further questions to a GCC list. HTH, -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams
-
Mark Sizer