jcaiuwyo / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

build_thread_safe crashes compilation #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Compile Cantera.

What is the expected output? What do you see instead?
Instead of compiling correctly, it crashes.

What version of the product are you using? On what operating system?
cantera-2.1.1 on Ubuntu 14.04.

Please provide any additional information below.
After installing Cantera successfully, I tried to clean and recompile, this 
time setting build_thread_safe = true, but compilation fails for cti2ctml. When 
adding -lboost_system and compiling alone as follows, it works fine:

g++ -o build/bin/cti2ctml -pthread build/src/apps/cti2ctml.o -Lbuild/lib 
-L/usr/lib/x86_64-linux-gnu -lcantera -lsundials_cvodes -lsundials_ida 
-lsundials_nvecserial -lboost_thread -lboost_system

I'm aware a similar issue has been solved previously (Issue 177), but the newer 
version of Cantera seems to include the solution given and yet it doesn't work.

Compiled using simply scons build, I also attach configuration and error files. 

Thanks in advance, 

Eduardo.

Original issue reported on code.google.com by edug9...@gmail.com on 29 Aug 2014 at 9:24

Attachments:

GoogleCodeExporter commented 9 years ago
The set of boost libraries that need to be linked depends on the version of 
Boost. You can specify the libraries to use with the 'boost_thread_lib' option 
to scons, e.g.:

scons build boost_thread_lib=boost_thread,boost_system

Note that 'cxx_flags' is only passed when compiling the code, not when linking 
it. If you need to specify additional linker options, you can do that using the 
'debug_linker_flags' and 'no_debug_linker_flags' arguments.

Please post again to confirm if this solution works for you.

Original comment by yarmond on 29 Aug 2014 at 4:00

GoogleCodeExporter commented 9 years ago
Yes, that fixed it: I used 

scons build boost_thread_lib=boost_system

as you suggested, and everything went fine. Also, thanks for pointing out my 
misunderstanding of 'cxx_flags'.

Thanks a lot for your help,

Eduardo.

Original comment by edug9...@gmail.com on 31 Aug 2014 at 9:00

GoogleCodeExporter commented 9 years ago
In my case, (OSX 10.9 with boost from MacPorts), the build_thread_safe option 
only works when

boost_thread_lib=boost_thread-mt,boost_system-mt

is passed to scons.

Possibly a different problem, but might be worth a try.

Original comment by thetruet...@googlemail.com on 31 Aug 2014 at 9:26

GoogleCodeExporter commented 9 years ago

Original comment by yarmond on 1 Sep 2014 at 11:48