Boost logo

Boost Users :

From: David M Garza (David.M.Garza_at_[hidden])
Date: 2005-12-06 16:52:47


When I added -DBOOST_SP_USE_PTHREADS smart_ptr_test ran, like John
Maddock found already. I assume the following output is correct:

UDT with value 999888777 being destroyed
UDT with value 111222333 being destroyed
OK
UDT with value 54321 being destroyed
UDT with value 333 being destroyed
UDT with value 222 being destroyed
UDT with value 111 being destroyed
UDT with value 333222111 being destroyed
No errors detected.

For what it's worth, it worked with both -O0 and -O2.

Adding "-D_REENTRANT -pthread " to my original g++ command line, on the
other hand, did not change the original behavior.

Combining Peter's and Ben's suggested flags works.

David

Ben Hutchings wrote:
> David M Garza wrote:
>
>
>>I tried building smart_ptr_test.cpp using the following command:
>>
>>g++ -I /users4/dgarza/boost_1_33_0/ -O0 -o smart_ptr_test smart_ptr_test.cpp
>>
>>just to make sure I had control of the optimization level.
>>
>
> This command line is wrong. You must use both the -pthread and
> -D_REENTRANT options when building multithreaded programs with g++ on
> IA64. Regrettably Boost.Build did not include -D_REENTRANT in this case
> prior to version 1.33.1, since it is implied by -pthread on most
> architectures (so much for portability of GCC!). This error may or may
> not be responsible for the failures.
>
> Ben.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net