Closed GoogleCodeExporter closed 9 years ago
It should not be necessary to specify any of those include or library paths.
Something is wrong with your compiler's setup if /usr/include isn't in the
compiler's built-in search path.
I'd be curious what output you get from the following command (from the Cantera
source directory):
clang++ -v -fshow-source-location include/cantera/base/ct_defs.h
And also, please provide the output from 'scons build' (as well as the
resulting config.log) you get when you try compiling without the custom values
for cxx_flags and cc_flags.
'pip install cantera' is not going to happen because Cantera isn't just a
Python module.
Original comment by yarmond
on 11 Sep 2012 at 8:18
Here is the output from 'clang++ -v -fshow-source-location
include/cantera/base/ct_defs.h'
Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.1.0
Thread model: posix
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode,
this behavior is deprecated
"/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-pch -disable-free -disable-llvm-verifier -main-file-name ct_defs.h -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 133.3 -v -resource-dir /usr/bin/../lib/clang/4.0 -fmodule-cache-path /var/folders/hp/q_sr95t17sbcg1szr1q50xy00000gn/T/clang-module-cache -fdeprecated-macro -fdebug-compilation-dir /Users/jarodmccormick/Desktop/cantera -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o include/cantera/base/ct_defs.h.gch -x c++-header include/cantera/base/ct_defs.h
clang -cc1 version 4.0 based upon LLVM 3.1svn default target
x86_64-apple-darwin12.1.0
ignoring nonexistent directory
"/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64"
ignoring nonexistent directory "/usr/include/c++/4.0.0"
ignoring nonexistent directory "/usr/include/c++/4.0.0/i686-apple-darwin8/"
ignoring nonexistent directory "/usr/include/c++/4.0.0/backward"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.2.1
/usr/include/c++/4.2.1/backward
/usr/local/include
/usr/bin/../lib/clang/4.0/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
Original comment by jarod.mc...@gmail.com
on 11 Sep 2012 at 9:44
And here is the config.log file without the extra cxx and cc flags.
scons build fails with the following output:
clang++ -o build/src/python/pycantera.os -c -Wall -fcolor-diagnostics
-Wno-deprecated-declarations -O3 -DNDEBUG -g -fPIC -fno-strict-aliasing
-fno-common -dynamic -DNDEBUG -g -O3 -arch x86_64 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX10.8.sdk/usr/include -Isrc
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include
-I/Library/Frameworks/EPD64.framework/Versions/7.3/include/python2.7
-I/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/n
umpy/core/include src/python/pycantera.cpp
In file included from src/python/pycantera.cpp:24:
In file included from src/clib/ct.h:7:
In file included from src/clib/clib_defs.h:7:
/usr/local/include/cantera/base/ct_defs.h:19:10: fatal error: 'cmath' file not
found
#include <cmath>
^
1 error generated.
scons: *** [build/src/python/pycantera.os] Error 1
scons: building terminated because of errors.
Original comment by jarod.mc...@gmail.com
on 11 Sep 2012 at 9:59
Attachments:
I think the issue is with some of the compiler flags that are being picked up
from the Python configuration variables "BASECFLAGS" and "OPT". Can you provide
the output of the command:
python -c 'from distutils.sysconfig import *; print get_config_var("BASECFLAGS"); print get_config_var("OPT")'
Whichever of these contains the "-isysroot ..." option is the one causing the
problem. Please try editing src/python/SConscript and changing on lines 11 and
12 from:
CPPFLAGS=((gcv('BASECFLAGS') or '').split() +
(gcv('OPT') or '').split()),
to:
CPPFLAGS=[]
And compiling again. Assuming that fixes the compilation errors, can you also
confirm that 'scons test' succeeds as well? If this works, it will require a
bit of testing to make sure that this change doesn't have any adverse effects
on other platforms.
Original comment by yarmond
on 12 Sep 2012 at 2:57
Fixed in r1901.
Original comment by yarmond
on 30 Oct 2012 at 3:53
Original issue reported on code.google.com by
jarod.mc...@gmail.com
on 11 Sep 2012 at 5:36