Boost logo

Boost :

From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-04-13 21:42:39


It seems that I am unable to build/use boost threads when compiling
with gcc-4.2.0 on windows. I get errors:

   libs\thread\src\win32\thread.cpp:147: error: 'heap_delete' is not a
member of 'boost::detail'

and other (see below). Can someone advise me as to how I can get
boost_thread to build under gcc-4.2.0/32-bit XP machine wth boost
1.35.0.

Thanks,
Mat

$ bjam -j2 debug gcc-4.2.0 --without-mpi --without-python
threadapi=win32 libs/thread/build//boost_thread
warning: Graph library does not contain optional GraphML reader.
note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the
note: directories containing the Expat headers and libraries, respectively.
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(don't panic: this is a strictly optional feature).
...patience...
...found 676 targets...
...updating 3 targets...
gcc.compile.c++
bin.v2\libs\thread\build\gcc-4.2.0\debug\threading-multi\thread.o
libs\thread\src\win32\thread.cpp: In function 'void
boost::<unnamed>::run_thread_exit_callbacks()':
libs\thread\src\win32\thread.cpp:147: error: 'heap_delete' is not a
member of 'boost::detail'
libs\thread\src\win32\thread.cpp:149: error: 'heap_delete' is not a
member of 'boost::detail'
libs\thread\src\win32\thread.cpp:159: error: 'heap_delete' is not a
member of 'boost::detail'
libs\thread\src\win32\thread.cpp: At global scope:
libs\thread\src\win32\thread.cpp:170: error: no 'unsigned int
boost::thread::thread_start_function(void*)' member function declared
in class 'boost::thread'
libs\thread\src\win32\thread.cpp: In member function 'void
boost::thread::start_thread()':
libs\thread\src\win32\thread.cpp:194: error: ISO C++ forbids taking
the address of an unqualified or parenthesized non-static member
function to form a pointer to member function. Say
'&boost::thread::thread_start_function'
libs\thread\src\win32\thread.cpp:194: error: 'struct
boost::detail::thread_data_base' has no member named 'id'
libs\thread\src\win32\thread.cpp:194: error: '_beginthreadex' was not
declared in this scope
libs\thread\src\win32\thread.cpp:199: error: 'intrusive_ptr_add_ref'
was not declared in this scope
libs\thread\src\win32\thread.cpp:200: error: 'boost::detail::win32'
has not been declared
libs\thread\src\win32\thread.cpp: In constructor
'boost::<unnamed>::externally_launched_thread::externally_launched_thread()':
libs\thread\src\win32\thread.cpp:215: error: 'count' was not declared
in this scope
libs\thread\src\win32\thread.cpp:216: error: 'interruption_enabled'
was not declared in this scope
libs\thread\src\win32\thread.cpp: In function 'void
boost::<unnamed>::make_external_thread_data()':
libs\thread\src\win32\thread.cpp:225: error: 'heap_new' is not a
member of 'boost::detail'
libs\thread\src\win32\thread.cpp:225: error: expected
primary-expression before '>' token
libs\thread\src\win32\thread.cpp:225: error: expected
primary-expression before ')' token
libs\thread\src\win32\thread.cpp: In constructor
'boost::thread::thread(boost::detail::thread_move_t<boost::thread>)':
libs\thread\src\win32\thread.cpp:251: error: no match for 'operator='
in 'x. boost::detail::thread_move_t<T>::operator-> [with T =
boost::thread]()->boost::thread::thread_info = 0'
./boost/shared_ptr.hpp:194: note: candidates are:
boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const
boost::shared_ptr<T>&) [with T = boost::detail::thread_data_base]
libs\thread\src\win32\thread.cpp: In member function 'void
boost::thread::join()':
libs\thread\src\win32\thread.cpp:292: error: 'interruptible_wait' is
not a member of 'boost::this_thread'
libs\thread\src\win32\thread.cpp:292: error: 'boost::detail::timeout'
has not been declared
libs\thread\src\win32\thread.cpp:293: error: 'release_handle' was not
declared in this scope
libs\thread\src\win32\thread.cpp: In member function 'bool
boost::thread::timed_join(const boost::system_time&)':
libs\thread\src\win32\thread.cpp:302: error: 'interruptible_wait' is
not a member of 'boost::this_thread'
libs\thread\src\win32\thread.cpp:306: error: 'release_handle' was not
declared in this scope
libs\thread\src\win32\thread.cpp: In member function 'void
boost::thread::detach()':
libs\thread\src\win32\thread.cpp:313: error: 'release_handle' was not
declared in this scope
libs\thread\src\win32\thread.cpp: At global scope:
libs\thread\src\win32\thread.cpp:316: error: no 'void
boost::thread::release_handle()' member function declared in class
'boost::thread'
libs\thread\src\win32\thread.cpp: In member function 'void
boost::thread::release_handle()':
libs\thread\src\win32\thread.cpp:319: error: no match for 'operator='
in '((boost::thread*)this)->boost::thread::thread_info = 0'
./boost/shared_ptr.hpp:194: note: candidates are:
boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const
boost::shared_ptr<T>&) [with T = boost::detail::thread_data_base]
libs\thread\src\win32\thread.cpp: In member function 'void
boost::thread::interrupt()':
libs\thread\src\win32\thread.cpp:327: error: 'struct
boost::detail::thread_data_base' has no member named 'interrupt'
libs\thread\src\win32\thread.cpp: In member function 'bool
boost::thread::interruption_requested() const':
libs\thread\src\win32\thread.cpp:334: error: 'boost::detail::win32'
has not been declared
libs\thread\src\win32\thread.cpp:334: error: 'struct
boost::detail::thread_data_base' has no member named
'interruption_handle'
libs\thread\src\win32\thread.cpp: In static member function 'static
unsigned int boost::thread::hardware_concurrency()':
libs\thread\src\win32\thread.cpp:339: warning: missing braces around
initializer for '_SYSTEM_INFO::<anonymous union>'
libs\thread\src\win32\thread.cpp: At global scope:
libs\thread\src\win32\thread.cpp:344: error: 'native_handle_type' in
class 'boost::thread' does not name a type
libs\thread\src\win32\thread.cpp:360: error: 'timeout' is not a member
of 'boost::detail'
libs\thread\src\win32\thread.cpp:361: error: expected ',' or ';'
before '{' token
libs\thread\src\win32\thread.cpp:628: error: expected `}' at end of input
libs\thread\src\win32\thread.cpp:628: error: expected `}' at end of input
libs\thread\src\win32\thread.cpp:628: error: expected `}' at end of input
./boost/detail/shared_count.hpp: In constructor
'boost::detail::shared_count::shared_count(P, D) [with P =
boost::detail::thread_data_base*, D = bool]':
./boost/shared_ptr.hpp:177: instantiated from
'boost::shared_ptr<T>::shared_ptr(Y*, D) [with Y =
boost::detail::thread_data_base, D = bool, T =
boost::detail::thread_data_base]'
libs\thread\src\win32\thread.cpp:135: instantiated from here
./boost/detail/shared_count.hpp:115: error: 'd' cannot be used as a function
./boost/detail/sp_counted_impl.hpp: In member function 'void
boost::detail::sp_counted_impl_pd<P, D>::dispose() [with P =
boost::detail::thread_data_base*, D = bool]':
libs\thread\src\win32\thread.cpp:627: instantiated from here
./boost/detail/sp_counted_impl.hpp:144: error:
'((boost::detail::sp_counted_impl_pd<boost::detail::thread_data_base*,
bool>*)this)->boost::detail::sp_counted_impl_pd<boost::detail::thread_data_base*,
bool>::del' cannot be used as a function

    "/opt/gcc-4.2.0/bin/g++.exe" -ftemplate-depth-128 -O0 -fno-inline
-Wall -g -mthreads -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1
-I"." -c -o "bin.v2\libs\thread\build\gcc-4.2.0\debug\threading-multi\thread.o"
"libs\thread\src\win32\thread.cpp"

...failed gcc.compile.c++
bin.v2\libs\thread\build\gcc-4.2.0\debug\threading-multi\thread.o...
...skipped <pbin.v2\libs\thread\build\gcc-4.2.0\debug\threading-multi>boost_thread-gcc42-mt-d-1_35.lib
for lack of <pbin.v2\libs\thread\build\gcc-4.2.0\debug\threading-multi>thread.o...
...skipped <pbin.v2\libs\thread\build\gcc-4.2.0\debug\threading-multi>boost_thread-gcc42-mt-d-1_35.dll
for lack of <pbin.v2\libs\thread\build\gcc-4.2.0\debug\threading-multi>thread.o...
...failed updating 1 target...
...skipped 2 targets...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk