Hello,
I am trying to install boost for the first time as part of rose compiler
installation. Here is what I did on a Linux machine:
downloaded, extracted boost 1.47.0
./bootstrap.sh --prefix=/home/usmda/rose/
boost/install2 --with-python-version=2.7
./bjam install -sGCC=gcc-4.4 -sGXX=g++-4.4
--prefix=/home/usmda/rose/boost/install2
Default gcc version is 4.7.1 [/usr/bin/g(cc|++)] on this machine so I
specify the gcc 4.4 [/usr/bin/g(cc|++)-4.4] for 2 reasons:
1) I need to use gcc 4.4 to compile rose compiler as well.
2) I read that gcc 4.7.1 disables boost threading support so that's why I
want to use gcc 4.4 but specifying -sGCC and -sGXX didn't help as still I
guess it uses gcc-4.7.1 (as shown in log below).*
*
Build fail for 4 targets. Here is the build message...
...
In file included from ./boost/thread/detail/platform.hpp:17:0,
from ./boost/thread/detail/config.hpp:20,
from libs/thread/src/pthread/thread.cpp:8:
./boost/config/requires_threads.hpp:29:4: error: #error "Threading support
unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
In file included from ./boost/thread/pthread/mutex.hpp:14:0,
from ./boost/thread/mutex.hpp:16,
from ./boost/thread/pthread/thread_data.hpp:12,
from ./boost/thread/thread.hpp:17,
from libs/thread/src/pthread/thread.cpp:10:
./boost/thread/xtime.hpp:23:5: error: expected identifier before numeric
constant
./boost/thread/xtime.hpp:23:5: error: expected ‘}’ before numeric constant
./boost/thread/xtime.hpp:23:5: error: expected unqualified-id before
numeric constant
./boost/thread/xtime.hpp:46:14: error: expected type-specifier before
‘system_time’
In file included from ./boost/thread/pthread/mutex.hpp:14:0,
from ./boost/thread/mutex.hpp:16,
from ./boost/thread/pthread/thread_data.hpp:12,
from ./boost/thread/thread.hpp:17,
from libs/thread/src/pthread/thread.cpp:10:
./boost/thread/xtime.hpp: In function ‘int xtime_get(xtime*, int)’:
./boost/thread/xtime.hpp:73:40: error: ‘get_system_time’ was not declared
in this scope
./boost/thread/xtime.hpp:73:40: note: suggested alternative:
In file included from ./boost/thread/locks.hpp:12:0,
from ./boost/thread/pthread/mutex.hpp:12,
from ./boost/thread/mutex.hpp:16,
from ./boost/thread/pthread/thread_data.hpp:12,
from ./boost/thread/thread.hpp:17,
from libs/thread/src/pthread/thread.cpp:10:
./boost/thread/thread_time.hpp:19:24: note: ‘boost::get_system_time’
In file included from ./boost/thread/pthread/mutex.hpp:14:0,
from ./boost/thread/mutex.hpp:16,
from ./boost/thread/pthread/thread_data.hpp:12,
from ./boost/thread/thread.hpp:17,
from libs/thread/src/pthread/thread.cpp:10:
./boost/thread/xtime.hpp: At global scope:
./boost/thread/xtime.hpp:88:1: error: expected declaration before ‘}’ token
"g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall
-pthread -Wno-long-long -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_LIB=1
-DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o
"bin.v2/libs/thread/build/gcc-4.7.1/release/link-static/threading-multi/pthread/thread.o"
"libs/thread/src/pthread/thread.cpp"
...failed gcc.compile.c++
bin.v2/libs/thread/build/gcc-4.7.1/release/link-static/threading-multi/pthread/thread.o...
gcc.compile.c++
bin.v2/libs/thread/build/gcc-4.7.1/release/link-static/threading-multi/pthread/once.o
In file included from ./boost/thread/detail/platform.hpp:17:0,
from ./boost/thread/once.hpp:12,
from libs/thread/src/pthread/once.cpp:7:
./boost/config/requires_threads.hpp:29:4: error: #error "Threading support
unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
"g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall
-pthread -Wno-long-long -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_LIB=1
-DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o
"bin.v2/libs/thread/build/gcc-4.7.1/release/link-static/threading-multi/pthread/once.o"
"libs/thread/src/pthread/once.cpp"
...failed gcc.compile.c++
bin.v2/libs/thread/build/gcc-4.7.1/release/link-static/threading-multi/pthread/once.o...
...skipped
libboost_thread.a for lack
of
AMDG On 09/12/2012 06:50 AM, Usman Dastgeer wrote:
I am trying to install boost for the first time as part of rose compiler installation. Here is what I did on a Linux machine:
downloaded, extracted boost 1.47.0 ./bootstrap.sh --prefix=/home/usmda/rose/ boost/install2 --with-python-version=2.7 ./bjam install -sGCC=gcc-4.4 -sGXX=g++-4.4 --prefix=/home/usmda/rose/boost/install2
Default gcc version is 4.7.1 [/usr/bin/g(cc|++)] on this machine so I specify the gcc 4.4 [/usr/bin/g(cc|++)-4.4] for 2 reasons: 1) I need to use gcc 4.4 to compile rose compiler as well. 2) I read that gcc 4.7.1 disables boost threading support so that's why I want to use gcc 4.4 but specifying -sGCC and -sGXX didn't help as still I guess it uses gcc-4.7.1 (as shown in log below).* *
Why would you expect this to do anything? After you run bootstrap.sh, there should be a project-config.jam. Edit it to change the line that say using gcc ; to using gcc : : g++-4.4 ; In Christ, Steven Watanabe
participants (2)
-
Steven Watanabe
-
Usman Dastgeer