[boost ::threads] Different behaviour between packaged and compiled version.

My code (a very small piece of code) uses boost:threads; It performs perfectly with the Debian Sarge version of boost,but segfaults with the version I installed myself (using bjam "-sTOOLS=gcc"). The Boost version I installed is: 1_33_1; Debian Sarge version is 1_32_06. I tried to runs the tests from inside the compiled 1_33_1 version: it works perfectly; but when I copy, say tennis.cpp, in an other directory, and compile and link it with version 1_33_1 (the one I compiled), it segfaults. I think it's only a question of compiler options. ->My options (which makes the program crash): -DBOOST_HAS_THREADS -DBOOST_HAS_PTHREADS -D_REENTRANT What is false? This works with Debian installed version. ->what are the options used by bjam when compiling the tests? I need a personnal version of boost (not the debian one) because I want to use the property tree library... yours t.d. -- Thierry Dumont. Institut Camille Jordan -- Mathematiques-- Univ. Lyon I,43 Bd du 11 Novembre 1918, 69622 - Villeurbanne Cedex - France. Thierry.Dumont@maply.univ-lyon1.fr web: http://maply.univ-lyon1.fr/~tdumont

Thierry Dumont wrote:
->My options (which makes the program crash): -DBOOST_HAS_THREADS -DBOOST_HAS_PTHREADS -D_REENTRANT What is false? This works with Debian installed version.
->what are the options used by bjam when compiling the tests?
You should not need to set -DBOOST_HAS_THREADS, if Boost.Config isn't already defining that then there is a problem with your gcc-setup or command line. John.

Thierry Dumont a écrit :
bla...
I apologize for this question... I used the "new" includes and the "old" libraries. I act like a beginner. Thanks to R. Neuhauser. Yours t.d. -- Thierry Dumont. Institut Camille Jordan -- Mathematiques-- Univ. Lyon I,43 Bd du 11 Novembre 1918, 69622 - Villeurbanne Cedex - France. Thierry.Dumont@maply.univ-lyon1.fr web: http://maply.univ-lyon1.fr/~tdumont

# tdumont@math.univ-lyon1.fr / 2006-08-01 11:19:46 +0200:
My code (a very small piece of code) uses boost:threads; It performs perfectly with the Debian Sarge version of boost,but segfaults with the version I installed myself (using bjam "-sTOOLS=gcc"). The Boost version I installed is: 1_33_1; Debian Sarge version is 1_32_06.
I tried to runs the tests from inside the compiled 1_33_1 version: it works perfectly; but when I copy, say tennis.cpp, in an other directory, and compile and link it with version 1_33_1 (the one I compiled), it segfaults.
I think it's only a question of compiler options.
Looks so, the most probable culprit is a mismatch between the libraries and headers.
->My options (which makes the program crash): -DBOOST_HAS_THREADS -DBOOST_HAS_PTHREADS -D_REENTRANT What is false? This works with Debian installed version.
->what are the options used by bjam when compiling the tests?
I need a personnal version of boost (not the debian one) because I want to use the property tree library...
You'll need to feed gcc with the right -L and -I switches. "info gcc" will give you more information. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991
participants (3)
-
John Maddock
-
Roman Neuhauser
-
Thierry Dumont