to install cantera 2.1 on my macbook pro I am following the procedure from Bok Jik Lee recently posted on his blog: Installing Cantera 2.1 on OSx 10.9 Mavericks
Everything worked fine till now but I get an error when I come to point 9: "Install Cantera"
after changing the current location to the canters-2.1 folder I was typing
scons build prefix='/usr/local/opt/cantera' python_compiler='clang++ -stdlib=libc++ -mmacosx-version-min=10.7' sundials_include='/usr/local/opt/sundials/2.5.0/include' sundials_libdir='/usr/local/opt/sundials/2.5.0/lib'
the commands work until I get the following error:
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [build/lib/libcantera_shared.dylib] Error 1
scons: building terminated because of errors.
The last line before this error is the following:
build/src/clib/ctxml.os -Lbuild/lib -L/usr/local/opt/sundials/2.5.0/lib -L/usr/local/opt/sundials/2.5.0/lib -lgfortran -lsundials_cvodes -lsundials_ida -lsundials_nvecserial -framework Accelerate
So scons terminated... did I forget to install something? What can I do?
Cheers,
Matthias
P.s.: I am a pretty new mac user - so these are my first experiences using the terminal and all these commands...
This isnt a problem with
SCons
, rather the compiler cannot find thegfortran
library. Step 2 in the link you provided shows how to installgfortran
. Have you successfully completed this step?If so, where is it installed? It may be that the SCons build scripts arent correctly specifying the path to the
gfortran
lib. The library paths are passed to the compiler via the-L
compiler flags. So, if you know where the library is installed, make sure its path is correctly specified in the library path compiler flags. If the library path is not correct, or missing, you can either modify the SCons scripts yourself, or consider writing some sort of a bug-report on theCantera
support site.To modify the
SCons
build scripts yourself, you'll need to modify theLIBPATH
construction variable, as can be seen here.