NewMac/Cantera
From charlesreid1
Installation Process
What follows are the notes from the rather convoluted process of installing Cantera on my new Snow Leopard MacBook Pro. The Installing Cantera page has better notes, but this procedure may help get you un-stuck if you've already started the installation process and are seeing similar errors.
Using preconfig included here: Cantera Preconfig
Ran make... successful
Ran make install... unsuccessful
$ make install /usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/include/cantera cp -r -f build/include/cantera /Users/charles/pkg/cantera/1.8.0/include /usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/lib rm -fR /Users/charles/pkg/cantera/1.8.0/lib/* ( for ilib in /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/*.a ; do \ /usr/bin/install -c -c -m 644 ${ilib} /Users/charles/pkg/cantera/1.8.0/lib ; \ done ) ranlib /Users/charles/pkg/cantera/1.8.0/lib/*.a cd Cantera/clib/src; make install /usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/lib /usr/bin/install -c -c -m 644 /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libclib.a /Users/charles/pkg/cantera/1.8.0/lib install: /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libclib.a: No such file or directory make[1]: *** [install] Error 71 make: *** [clib-install] Error 2
Next step: realized I didn't have numpy or scipy
(Ran "from numpy import *" and got an error)
Downloaded numpy and scipy source
Used the following install process:
$ cd /path/to/numpy/source
$ python setup.py build
$ python setup.py install --prefix=/Users/charles/pkg/numpy-1.5.0
$ /path/to/scipy/source
$ python setup.py build
$ python setup.py install --prefix=/Users/charles/pkg/scipy-0.9.0
make still worked...
make install still didn't work...
next, did this:
cd Cantera/clib/src make
Now the error is different:
$ make install /usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/include/cantera cp -r -f build/include/cantera /Users/charles/pkg/cantera/1.8.0/include /usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/lib rm -fR /Users/charles/pkg/cantera/1.8.0/lib/* ( for ilib in /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/*.a ; do \ /usr/bin/install -c -c -m 644 ${ilib} /Users/charles/pkg/cantera/1.8.0/lib ; \ done ) ranlib /Users/charles/pkg/cantera/1.8.0/lib/*.a cd Cantera/clib/src; make install /usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/lib /usr/bin/install -c -c -m 644 /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libclib.a /Users/charles/pkg/cantera/1.8.0/lib ranlib /Users/charles/pkg/cantera/1.8.0/lib/libclib.a /usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/data ( for iddd in data/inputs/*.xml ; do \ /usr/bin/install -c -c -m 644 ${iddd} /Users/charles/pkg/cantera/1.8.0/data ; done ) ( for iddd in data/inputs/*.cti ; do \ /usr/bin/install -c -c -m 644 ${iddd} /Users/charles/pkg/cantera/1.8.0/data ; done ) /usr/bin/install -c -c -m 644 build/include/cantera/*.mod /Users/charles/pkg/cantera/1.8.0/include/cantera install: build/include/cantera/*.mod: No such file or directory make: *** [f90-modules-install] Error 71
Noticed in the Makefile that clib SHOULD have been built... but the target was named something specific. So maybe this thing is being left out because I'm not running "make all".
Did a "make -j2 all" and got a python error related to "import_array"
Did a quick check to see if scipy worked...
$ python >> from scipy import * No module named scipy
Well, that would explain it. I opened a new window, and PYTHONPATH was set correctly to include scipy as well as numpy.
But then I ran "make -j2 all" and it still failed on libclib.a.
Ran "make -j2 all" again to gather the errors together and I'm getting this:
building 'Cantera._cantera' extension creating build/temp.macosx-10.6-intel-2.7 creating build/temp.macosx-10.6-intel-2.7/src g++ -DNDEBUG -g -O3 -O3 -Wall -fPIC -I../../build/include -Isrc -I../clib/src -I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/pycantera.cpp -o build/temp.macosx-10.6-intel-2.7/src/pycantera.o g++ -c fct.cpp -I../../src/base -I../../src/thermo -I../../src/kinetics -I../../src/transport -I../../src/numerics -I../../src/oneD -I../../src/zeroD -I../../src/equil -I../../src/converters -O3 -Wall src/pycantera.cpp:26:31: error: numpy/arrayobject.h: No such file or directory In file included from src/pycantera.cpp:56: src/ctphase_methods.cpp: In function ‘PyObject* phase_getarray(PyObject*, PyObject*)’: src/ctphase_methods.cpp:126: error: ‘PyArrayObject’ was not declared in this scope src/ctphase_methods.cpp:126: error: ‘x’ was not declared in this scope src/ctphase_methods.cpp:132: error: ‘npy_intp’ was not declared in this scope src/ctphase_methods.cpp:132: error: expected `;' before ‘nnn’ src/ctphase_methods.cpp:133: error: expected primary-expression before ‘)’ token src/ctphase_methods.cpp:133: error: expected `;' before ‘PyArray_SimpleNew’ src/ctphase_methods.cpp:157: error: ‘npy_intp’ was not declared in this scope src/ctphase_methods.cpp:157: error: expected `;' before ‘nnn’ src/ctphase_methods.cpp:158: error: expected primary-expression before ‘)’ token src/ctphase_methods.cpp:158: error: expected `;' before ‘PyArray_SimpleNew’ src/ctphase_methods.cpp:173: error: ‘PyArray_Return’ was not declared in this scope src/ctphase_methods.cpp: In function ‘PyObject* phase_setarray(PyObject*, PyObject*)’: src/ctphase_methods.cpp:260: error: ‘PyArrayObject’ was not declared in this scope src/ctphase_methods.cpp:260: error: ‘a’ was not declared in this scope src/ctphase_methods.cpp:260: error: expected primary-expression before ‘)’ token src/ctphase_methods.cpp:261: error: expected `;' before ‘PyArray_ContiguousFromObject’ In file included from src/pycantera.cpp:57: src/ctthermo_methods.cpp: In function ‘PyObject* thermo_getarray(PyObject*, PyObject*)’: src/ctthermo_methods.cpp:198: error: ‘npy_intp’ was not declared in this scope src/ctthermo_methods.cpp:198: error: expected `;' before ‘nnn’ src/ctthermo_methods.cpp:199: error: ‘PyArrayObject’ was not declared in this scope src/ctthermo_methods.cpp:199: error: ‘x’ was not declared in this scope src/ctthermo_methods.cpp:200: error: expected primary-expression before ‘)’ token src/ctthermo_methods.cpp:200: error: expected `;' before ‘PyArray_SimpleNew’ src/ctthermo_methods.cpp:228: error: ‘PyArray_Return’ was not declared in this scope src/ctthermo_methods.cpp:192: warning: unused variable ‘xlen’ In file included from src/pycantera.cpp:58: src/ctkinetics_methods.cpp: In function ‘PyObject* kin_getarray(PyObject*, PyObject*)’: src/ctkinetics_methods.cpp:172: error: ‘npy_intp’ was not declared in this scope src/ctkinetics_methods.cpp:172: error: expected `;' before ‘nix’ src/ctkinetics_methods.cpp:173: error: ‘PyArrayObject’ was not declared in this scope src/ctkinetics_methods.cpp:173: error: ‘x’ was not declared in this scope src/ctkinetics_methods.cpp:173: error: expected primary-expression before ‘)’ token src/ctkinetics_methods.cpp:173: error: expected `;' before ‘PyArray_SimpleNew’ src/ctkinetics_methods.cpp:238: error: ‘PyArray_Return’ was not declared in this scope In file included from src/pycantera.cpp:59: src/cttransport_methods.cpp: In function ‘PyObject* py_setParameters(PyObject*, PyObject*)’: src/cttransport_methods.cpp:40: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:40: error: ‘a’ was not declared in this scope src/cttransport_methods.cpp:40: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:41: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/cttransport_methods.cpp: In function ‘PyObject* py_thermalDiffCoeffs(PyObject*, PyObject*)’: src/cttransport_methods.cpp:74: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:74: error: expected `;' before ‘nidt’ src/cttransport_methods.cpp:75: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:75: error: ‘dt’ was not declared in this scope src/cttransport_methods.cpp:76: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:76: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:83: error: ‘PyArray_Return’ was not declared in this scope src/cttransport_methods.cpp: In function ‘PyObject* py_binaryDiffCoeffs(PyObject*, PyObject*)’: src/cttransport_methods.cpp:92: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:92: error: expected `;' before ‘idim’ src/cttransport_methods.cpp:93: error: ‘idim’ was not declared in this scope src/cttransport_methods.cpp:95: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:95: error: ‘d’ was not declared in this scope src/cttransport_methods.cpp:95: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:95: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:104: error: ‘PyArray_Return’ was not declared in this scope src/cttransport_methods.cpp: In function ‘PyObject* py_mixDiffCoeffs(PyObject*, PyObject*)’: src/cttransport_methods.cpp:113: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:113: error: expected `;' before ‘nid’ src/cttransport_methods.cpp:114: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:114: error: ‘d’ was not declared in this scope src/cttransport_methods.cpp:114: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:114: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:120: error: ‘PyArray_Return’ was not declared in this scope src/cttransport_methods.cpp: In function ‘PyObject* py_multiDiffCoeffs(PyObject*, PyObject*)’: src/cttransport_methods.cpp:130: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:130: error: expected `;' before ‘idim’ src/cttransport_methods.cpp:131: error: ‘idim’ was not declared in this scope src/cttransport_methods.cpp:133: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:133: error: ‘d’ was not declared in this scope src/cttransport_methods.cpp:133: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:133: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:142: error: ‘PyArray_Return’ was not declared in this scope src/cttransport_methods.cpp: In function ‘PyObject* py_getMolarFluxes(PyObject*, PyObject*)’: src/cttransport_methods.cpp:153: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:153: error: ‘state1array’ was not declared in this scope src/cttransport_methods.cpp:153: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:153: error: expected `;' before ‘state1’ src/cttransport_methods.cpp:154: error: ‘state2array’ was not declared in this scope src/cttransport_methods.cpp:154: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:154: error: expected `;' before ‘state2’ src/cttransport_methods.cpp:158: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:158: error: expected `;' before ‘nid’ src/cttransport_methods.cpp:159: error: ‘f’ was not declared in this scope src/cttransport_methods.cpp:159: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:159: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:166: error: ‘PyArray_Return’ was not declared in this scope In file included from src/pycantera.cpp:60: src/ctxml_methods.cpp: In function ‘PyObject* py_ctml_getFloatArray(PyObject*, PyObject*)’: src/ctxml_methods.cpp:229: error: ‘npy_intp’ was not declared in this scope src/ctxml_methods.cpp:229: error: expected `;' before ‘nia’ src/ctxml_methods.cpp:230: error: ‘PyArrayObject’ was not declared in this scope src/ctxml_methods.cpp:230: error: ‘a’ was not declared in this scope src/ctxml_methods.cpp:231: error: expected primary-expression before ‘)’ token src/ctxml_methods.cpp:231: error: expected `;' before ‘PyArray_SimpleNew’ src/ctxml_methods.cpp:239: error: ‘PyArray_Return’ was not declared in this scope In file included from src/pycantera.cpp:62: src/ctsurf_methods.cpp: In function ‘PyObject* py_surf_setcoverages(PyObject*, PyObject*)’: src/ctsurf_methods.cpp:34: error: ‘PyArrayObject’ was not declared in this scope src/ctsurf_methods.cpp:34: error: expected primary-expression before ‘double’ src/ctsurf_methods.cpp:34: error: expected `)' before ‘double’ src/ctsurf_methods.cpp: In function ‘PyObject* py_surf_setconcentrations(PyObject*, PyObject*)’: src/ctsurf_methods.cpp:47: error: ‘PyArrayObject’ was not declared in this scope src/ctsurf_methods.cpp:47: error: expected primary-expression before ‘double’ src/ctsurf_methods.cpp:47: error: expected `)' before ‘double’ src/ctsurf_methods.cpp: In function ‘PyObject* py_surf_getcoverages(PyObject*, PyObject*)’: src/ctsurf_methods.cpp:57: error: ‘PyArrayObject’ was not declared in this scope src/ctsurf_methods.cpp:57: error: ‘cov’ was not declared in this scope src/ctsurf_methods.cpp:62: error: ‘npy_intp’ was not declared in this scope src/ctsurf_methods.cpp:62: error: expected `;' before ‘nnsp’ src/ctsurf_methods.cpp:63: error: expected primary-expression before ‘)’ token src/ctsurf_methods.cpp:63: error: expected `;' before ‘PyArray_SimpleNew’ src/ctsurf_methods.cpp:67: error: expected primary-expression before ‘double’ src/ctsurf_methods.cpp:67: error: expected `)' before ‘double’ src/ctsurf_methods.cpp:60: warning: unused variable ‘nsp’ src/ctsurf_methods.cpp: In function ‘PyObject* py_surf_getconcentrations(PyObject*, PyObject*)’: src/ctsurf_methods.cpp:77: error: ‘PyArrayObject’ was not declared in this scope src/ctsurf_methods.cpp:77: error: ‘c’ was not declared in this scope src/ctsurf_methods.cpp:82: error: ‘npy_intp’ was not declared in this scope src/ctsurf_methods.cpp:82: error: expected `;' before ‘nnsp’ src/ctsurf_methods.cpp:83: error: expected primary-expression before ‘)’ token src/ctsurf_methods.cpp:83: error: expected `;' before ‘PyArray_SimpleNew’ src/ctsurf_methods.cpp:87: error: expected primary-expression before ‘double’ src/ctsurf_methods.cpp:87: error: expected `)' before ‘double’ src/ctsurf_methods.cpp:80: warning: unused variable ‘nsp’ In file included from src/pycantera.cpp:64: src/ctrpath_methods.cpp: In function ‘PyObject* py_rdiag_findMajor(PyObject*, PyObject*)’: src/ctrpath_methods.cpp:230: error: ‘PyArrayObject’ was not declared in this scope src/ctrpath_methods.cpp:230: error: ‘aa’ was not declared in this scope src/ctrpath_methods.cpp:230: error: expected primary-expression before ‘)’ token src/ctrpath_methods.cpp:230: error: expected `;' before ‘a’ In file included from src/pycantera.cpp:65: src/ctreactor_methods.cpp: In function ‘PyObject* py_flowdev_setParameters(PyObject*, PyObject*)’: src/ctreactor_methods.cpp:321: error: ‘PyArrayObject’ was not declared in this scope src/ctreactor_methods.cpp:321: error: ‘ca’ was not declared in this scope src/ctreactor_methods.cpp:321: error: expected primary-expression before ‘)’ token src/ctreactor_methods.cpp:322: error: expected `;' before ‘PyArray_ContiguousFromObject’ In file included from src/pycantera.cpp:66: src/ctfunc_methods.cpp: In function ‘PyObject* py_func_new(PyObject*, PyObject*)’: src/ctfunc_methods.cpp:9: error: ‘PyArrayObject’ was not declared in this scope src/ctfunc_methods.cpp:9: error: ‘coeffs’ was not declared in this scope src/ctfunc_methods.cpp:9: error: expected primary-expression before ‘)’ token src/ctfunc_methods.cpp:9: error: expected `;' before ‘c’ In file included from src/pycantera.cpp:67: src/ctonedim_methods.cpp: In function ‘PyObject* py_domain_setupGrid(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:230: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:230: error: ‘grid_array’ was not declared in this scope src/ctonedim_methods.cpp:230: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:231: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp: In function ‘PyObject* py_stflow_setFixedTempProfile(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:548: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:548: error: ‘pos_array’ was not declared in this scope src/ctonedim_methods.cpp:548: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:549: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp:554: error: ‘temp_array’ was not declared in this scope src/ctonedim_methods.cpp:554: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:555: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp: In function ‘PyObject* py_sim1D_new(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:621: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:621: error: ‘domains_array’ was not declared in this scope src/ctonedim_methods.cpp:621: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:622: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp: In function ‘PyObject* py_sim1D_setProfile(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:686: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:686: error: ‘pos_array’ was not declared in this scope src/ctonedim_methods.cpp:686: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:687: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp:692: error: ‘v_array’ was not declared in this scope src/ctonedim_methods.cpp:692: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:693: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp: In function ‘PyObject* py_sim1D_setTimeStep(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:753: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:753: error: ‘nsteps_array’ was not declared in this scope src/ctonedim_methods.cpp:753: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:754: error: expected `;' before ‘PyArray_ContiguousFromObject’ In file included from src/pycantera.cpp:68: src/ctmultiphase_methods.cpp: In function ‘PyObject* py_mix_setMoles(PyObject*, PyObject*)’: src/ctmultiphase_methods.cpp:308: error: ‘PyArrayObject’ was not declared in this scope src/ctmultiphase_methods.cpp:308: error: ‘n_array’ was not declared in this scope src/ctmultiphase_methods.cpp:308: error: expected primary-expression before ‘)’ token src/ctmultiphase_methods.cpp:308: error: expected `;' before ‘n’ src/ctmultiphase_methods.cpp: In function ‘PyObject* py_mix_getChemPotentials(PyObject*, PyObject*)’: src/ctmultiphase_methods.cpp:388: error: ‘PyArrayObject’ was not declared in this scope src/ctmultiphase_methods.cpp:388: error: ‘mu_array’ was not declared in this scope src/ctmultiphase_methods.cpp:388: error: expected primary-expression before ‘)’ token src/ctmultiphase_methods.cpp:388: error: expected `;' before ‘mu’ src/pycantera.cpp: In function ‘void init_cantera()’: src/pycantera.cpp:96: error: ‘import_array’ was not declared in this scope error: command 'g++' failed with exit status 1 make[1]: *** [_build] Error 1 make: *** [python] Error 2 make: *** Waiting for unfinished jobs.... g++ -c fctxml.cpp -I../../src/base -I../../src/thermo -I../../src/kinetics -I../../src/transport -I../../src/numerics -I../../src/oneD -I../../src/zeroD -I../../src/equil -I../../src/converters -O3 -Wall rm -f /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libfct.a libtool -static -o /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libfct.a fct.o fctxml.o cantera_xml.o cantera_thermo.o cantera_kinetics.o cantera_transport.o cantera_iface.o cantera_funcs.o cantera.o libtool: file: cantera.o has no symbols /usr/bin/install -c -c Cantera/fortran/src/*.mod build/include/cantera
Soooooo.... LOTS of errors.
This is a numpy problem: PyArrayObject is a numpy type...
Need to fix NUMPY_INCLUDE to point to CORRECT location in preconfig! (b/c this time I installed it to /Users/charles/pkg/numpy-1.5.1)
Duh! The problem was I was pointing to an incorrect location for numpy.
(still seeing libclib problems... here's what I see:)
make[1]: *** No rule to make target `/Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libctbase.a', needed by `/Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libclib.a'. Stop. make[1]: *** Waiting for unfinished jobs.... make: *** [clib] Error 2 make: *** Waiting for unfinished jobs....
But the installation process keeps going..........
and dies with this:
running build_ext building 'Cantera._cantera' extension creating build/temp.macosx-10.6-intel-2.7 creating build/temp.macosx-10.6-intel-2.7/src g++ -DNDEBUG -g -O3 -O3 -Wall -fPIC -I../../build/include -Isrc -I../clib/src -I/Users/charles/pkg/numpy-1.5.1/lib/python2.7/site-packages/numpy/core/include/numpy -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/pycantera.cpp -o build/temp.macosx-10.6-intel-2.7/src/pycantera.o src/pycantera.cpp:26:31: error: numpy/arrayobject.h: No such file or directory gfortran -c cantera.f90 -fno-second-underscore -I. -O3 gfortran -c cantera.f90 -fno-second-underscore -I. -O3 g++ -c fct.cpp -I../../src/base -I../../src/thermo -I../../src/kinetics -I../../src/transport -I../../src/numerics -I../../src/oneD -I../../src/zeroD -I../../src/equil -I../../src/converters -O3 -Wall In file included from src/pycantera.cpp:56: src/ctphase_methods.cpp: In function ‘PyObject* phase_getarray(PyObject*, PyObject*)’: src/ctphase_methods.cpp:126: error: ‘PyArrayObject’ was not declared in this scope src/ctphase_methods.cpp:126: error: ‘x’ was not declared in this scope src/ctphase_methods.cpp:132: error: ‘npy_intp’ was not declared in this scope src/ctphase_methods.cpp:132: error: expected `;' before ‘nnn’ src/ctphase_methods.cpp:133: error: expected primary-expression before ‘)’ token src/ctphase_methods.cpp:133: error: expected `;' before ‘PyArray_SimpleNew’ src/ctphase_methods.cpp:157: error: ‘npy_intp’ was not declared in this scope src/ctphase_methods.cpp:157: error: expected `;' before ‘nnn’ src/ctphase_methods.cpp:158: error: expected primary-expression before ‘)’ token src/ctphase_methods.cpp:158: error: expected `;' before ‘PyArray_SimpleNew’ src/ctphase_methods.cpp:173: error: ‘PyArray_Return’ was not declared in this scope src/ctphase_methods.cpp: In function ‘PyObject* phase_setarray(PyObject*, PyObject*)’: src/ctphase_methods.cpp:260: error: ‘PyArrayObject’ was not declared in this scope src/ctphase_methods.cpp:260: error: ‘a’ was not declared in this scope src/ctphase_methods.cpp:260: error: expected primary-expression before ‘)’ token src/ctphase_methods.cpp:261: error: expected `;' before ‘PyArray_ContiguousFromObject’ In file included from src/pycantera.cpp:57: src/ctthermo_methods.cpp: In function ‘PyObject* thermo_getarray(PyObject*, PyObject*)’: src/ctthermo_methods.cpp:198: error: ‘npy_intp’ was not declared in this scope src/ctthermo_methods.cpp:198: error: expected `;' before ‘nnn’ src/ctthermo_methods.cpp:199: error: ‘PyArrayObject’ was not declared in this scope src/ctthermo_methods.cpp:199: error: ‘x’ was not declared in this scope src/ctthermo_methods.cpp:200: error: expected primary-expression before ‘)’ token src/ctthermo_methods.cpp:200: error: expected `;' before ‘PyArray_SimpleNew’ src/ctthermo_methods.cpp:228: error: ‘PyArray_Return’ was not declared in this scope src/ctthermo_methods.cpp:192: warning: unused variable ‘xlen’ In file included from src/pycantera.cpp:58: src/ctkinetics_methods.cpp: In function ‘PyObject* kin_getarray(PyObject*, PyObject*)’: src/ctkinetics_methods.cpp:172: error: ‘npy_intp’ was not declared in this scope src/ctkinetics_methods.cpp:172: error: expected `;' before ‘nix’ src/ctkinetics_methods.cpp:173: error: ‘PyArrayObject’ was not declared in this scope src/ctkinetics_methods.cpp:173: error: ‘x’ was not declared in this scope src/ctkinetics_methods.cpp:173: error: expected primary-expression before ‘)’ token src/ctkinetics_methods.cpp:173: error: expected `;' before ‘PyArray_SimpleNew’ src/ctkinetics_methods.cpp:238: error: ‘PyArray_Return’ was not declared in this scope In file included from src/pycantera.cpp:59: src/cttransport_methods.cpp: In function ‘PyObject* py_setParameters(PyObject*, PyObject*)’: src/cttransport_methods.cpp:40: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:40: error: ‘a’ was not declared in this scope src/cttransport_methods.cpp:40: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:41: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/cttransport_methods.cpp: In function ‘PyObject* py_thermalDiffCoeffs(PyObject*, PyObject*)’: src/cttransport_methods.cpp:74: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:74: error: expected `;' before ‘nidt’ src/cttransport_methods.cpp:75: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:75: error: ‘dt’ was not declared in this scope src/cttransport_methods.cpp:76: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:76: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:83: error: ‘PyArray_Return’ was not declared in this scope src/cttransport_methods.cpp: In function ‘PyObject* py_binaryDiffCoeffs(PyObject*, PyObject*)’: src/cttransport_methods.cpp:92: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:92: error: expected `;' before ‘idim’ src/cttransport_methods.cpp:93: error: ‘idim’ was not declared in this scope src/cttransport_methods.cpp:95: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:95: error: ‘d’ was not declared in this scope src/cttransport_methods.cpp:95: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:95: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:104: error: ‘PyArray_Return’ was not declared in this scope src/cttransport_methods.cpp: In function ‘PyObject* py_mixDiffCoeffs(PyObject*, PyObject*)’: src/cttransport_methods.cpp:113: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:113: error: expected `;' before ‘nid’ src/cttransport_methods.cpp:114: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:114: error: ‘d’ was not declared in this scope src/cttransport_methods.cpp:114: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:114: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:120: error: ‘PyArray_Return’ was not declared in this scope src/cttransport_methods.cpp: In function ‘PyObject* py_multiDiffCoeffs(PyObject*, PyObject*)’: src/cttransport_methods.cpp:130: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:130: error: expected `;' before ‘idim’ src/cttransport_methods.cpp:131: error: ‘idim’ was not declared in this scope src/cttransport_methods.cpp:133: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:133: error: ‘d’ was not declared in this scope src/cttransport_methods.cpp:133: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:133: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:142: error: ‘PyArray_Return’ was not declared in this scope src/cttransport_methods.cpp: In function ‘PyObject* py_getMolarFluxes(PyObject*, PyObject*)’: src/cttransport_methods.cpp:153: error: ‘PyArrayObject’ was not declared in this scope src/cttransport_methods.cpp:153: error: ‘state1array’ was not declared in this scope src/cttransport_methods.cpp:153: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:153: error: expected `;' before ‘state1’ src/cttransport_methods.cpp:154: error: ‘state2array’ was not declared in this scope src/cttransport_methods.cpp:154: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:154: error: expected `;' before ‘state2’ src/cttransport_methods.cpp:158: error: ‘npy_intp’ was not declared in this scope src/cttransport_methods.cpp:158: error: expected `;' before ‘nid’ src/cttransport_methods.cpp:159: error: ‘f’ was not declared in this scope src/cttransport_methods.cpp:159: error: expected primary-expression before ‘)’ token src/cttransport_methods.cpp:159: error: expected `;' before ‘PyArray_SimpleNew’ src/cttransport_methods.cpp:166: error: ‘PyArray_Return’ was not declared in this scope In file included from src/pycantera.cpp:60: src/ctxml_methods.cpp: In function ‘PyObject* py_ctml_getFloatArray(PyObject*, PyObject*)’: src/ctxml_methods.cpp:229: error: ‘npy_intp’ was not declared in this scope src/ctxml_methods.cpp:229: error: expected `;' before ‘nia’ src/ctxml_methods.cpp:230: error: ‘PyArrayObject’ was not declared in this scope src/ctxml_methods.cpp:230: error: ‘a’ was not declared in this scope src/ctxml_methods.cpp:231: error: expected primary-expression before ‘)’ token src/ctxml_methods.cpp:231: error: expected `;' before ‘PyArray_SimpleNew’ src/ctxml_methods.cpp:239: error: ‘PyArray_Return’ was not declared in this scope In file included from src/pycantera.cpp:62: src/ctsurf_methods.cpp: In function ‘PyObject* py_surf_setcoverages(PyObject*, PyObject*)’: src/ctsurf_methods.cpp:34: error: ‘PyArrayObject’ was not declared in this scope src/ctsurf_methods.cpp:34: error: expected primary-expression before ‘double’ src/ctsurf_methods.cpp:34: error: expected `)' before ‘double’ src/ctsurf_methods.cpp: In function ‘PyObject* py_surf_setconcentrations(PyObject*, PyObject*)’: src/ctsurf_methods.cpp:47: error: ‘PyArrayObject’ was not declared in this scope src/ctsurf_methods.cpp:47: error: expected primary-expression before ‘double’ src/ctsurf_methods.cpp:47: error: expected `)' before ‘double’ src/ctsurf_methods.cpp: In function ‘PyObject* py_surf_getcoverages(PyObject*, PyObject*)’: src/ctsurf_methods.cpp:57: error: ‘PyArrayObject’ was not declared in this scope src/ctsurf_methods.cpp:57: error: ‘cov’ was not declared in this scope src/ctsurf_methods.cpp:62: error: ‘npy_intp’ was not declared in this scope src/ctsurf_methods.cpp:62: error: expected `;' before ‘nnsp’ src/ctsurf_methods.cpp:63: error: expected primary-expression before ‘)’ token src/ctsurf_methods.cpp:63: error: expected `;' before ‘PyArray_SimpleNew’ src/ctsurf_methods.cpp:67: error: expected primary-expression before ‘double’ src/ctsurf_methods.cpp:67: error: expected `)' before ‘double’ src/ctsurf_methods.cpp:60: warning: unused variable ‘nsp’ src/ctsurf_methods.cpp: In function ‘PyObject* py_surf_getconcentrations(PyObject*, PyObject*)’: src/ctsurf_methods.cpp:77: error: ‘PyArrayObject’ was not declared in this scope src/ctsurf_methods.cpp:77: error: ‘c’ was not declared in this scope src/ctsurf_methods.cpp:82: error: ‘npy_intp’ was not declared in this scope src/ctsurf_methods.cpp:82: error: expected `;' before ‘nnsp’ src/ctsurf_methods.cpp:83: error: expected primary-expression before ‘)’ token src/ctsurf_methods.cpp:83: error: expected `;' before ‘PyArray_SimpleNew’ src/ctsurf_methods.cpp:87: error: expected primary-expression before ‘double’ src/ctsurf_methods.cpp:87: error: expected `)' before ‘double’ src/ctsurf_methods.cpp:80: warning: unused variable ‘nsp’ In file included from src/pycantera.cpp:64: src/ctrpath_methods.cpp: In function ‘PyObject* py_rdiag_findMajor(PyObject*, PyObject*)’: src/ctrpath_methods.cpp:230: error: ‘PyArrayObject’ was not declared in this scope src/ctrpath_methods.cpp:230: error: ‘aa’ was not declared in this scope src/ctrpath_methods.cpp:230: error: expected primary-expression before ‘)’ token src/ctrpath_methods.cpp:230: error: expected `;' before ‘a’ In file included from src/pycantera.cpp:65: src/ctreactor_methods.cpp: In function ‘PyObject* py_flowdev_setParameters(PyObject*, PyObject*)’: src/ctreactor_methods.cpp:321: error: ‘PyArrayObject’ was not declared in this scope src/ctreactor_methods.cpp:321: error: ‘ca’ was not declared in this scope src/ctreactor_methods.cpp:321: error: expected primary-expression before ‘)’ token src/ctreactor_methods.cpp:322: error: expected `;' before ‘PyArray_ContiguousFromObject’ In file included from src/pycantera.cpp:66: src/ctfunc_methods.cpp: In function ‘PyObject* py_func_new(PyObject*, PyObject*)’: src/ctfunc_methods.cpp:9: error: ‘PyArrayObject’ was not declared in this scope src/ctfunc_methods.cpp:9: error: ‘coeffs’ was not declared in this scope src/ctfunc_methods.cpp:9: error: expected primary-expression before ‘)’ token src/ctfunc_methods.cpp:9: error: expected `;' before ‘c’ In file included from src/pycantera.cpp:67: src/ctonedim_methods.cpp: In function ‘PyObject* py_domain_setupGrid(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:230: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:230: error: ‘grid_array’ was not declared in this scope src/ctonedim_methods.cpp:230: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:231: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp: In function ‘PyObject* py_stflow_setFixedTempProfile(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:548: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:548: error: ‘pos_array’ was not declared in this scope src/ctonedim_methods.cpp:548: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:549: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp:554: error: ‘temp_array’ was not declared in this scope src/ctonedim_methods.cpp:554: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:555: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp: In function ‘PyObject* py_sim1D_new(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:621: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:621: error: ‘domains_array’ was not declared in this scope src/ctonedim_methods.cpp:621: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:622: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp: In function ‘PyObject* py_sim1D_setProfile(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:686: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:686: error: ‘pos_array’ was not declared in this scope src/ctonedim_methods.cpp:686: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:687: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp:692: error: ‘v_array’ was not declared in this scope src/ctonedim_methods.cpp:692: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:693: error: expected `;' before ‘PyArray_ContiguousFromObject’ src/ctonedim_methods.cpp: In function ‘PyObject* py_sim1D_setTimeStep(PyObject*, PyObject*)’: src/ctonedim_methods.cpp:753: error: ‘PyArrayObject’ was not declared in this scope src/ctonedim_methods.cpp:753: error: ‘nsteps_array’ was not declared in this scope src/ctonedim_methods.cpp:753: error: expected primary-expression before ‘)’ token src/ctonedim_methods.cpp:754: error: expected `;' before ‘PyArray_ContiguousFromObject’ In file included from src/pycantera.cpp:68: src/ctmultiphase_methods.cpp: In function ‘PyObject* py_mix_setMoles(PyObject*, PyObject*)’: src/ctmultiphase_methods.cpp:308: error: ‘PyArrayObject’ was not declared in this scope src/ctmultiphase_methods.cpp:308: error: ‘n_array’ was not declared in this scope src/ctmultiphase_methods.cpp:308: error: expected primary-expression before ‘)’ token src/ctmultiphase_methods.cpp:308: error: expected `;' before ‘n’ src/ctmultiphase_methods.cpp: In function ‘PyObject* py_mix_getChemPotentials(PyObject*, PyObject*)’: src/ctmultiphase_methods.cpp:388: error: ‘PyArrayObject’ was not declared in this scope src/ctmultiphase_methods.cpp:388: error: ‘mu_array’ was not declared in this scope src/ctmultiphase_methods.cpp:388: error: expected primary-expression before ‘)’ token src/ctmultiphase_methods.cpp:388: error: expected `;' before ‘mu’ src/pycantera.cpp: In function ‘void init_cantera()’: src/pycantera.cpp:96: error: ‘import_array’ was not declared in this scope error: command 'g++' failed with exit status 1 make[1]: *** [_build] Error 1 make: *** [python] Error 2 make: *** Waiting for unfinished jobs.... g++ -c fctxml.cpp -I../../src/base -I../../src/thermo -I../../src/kinetics -I../../src/transport -I../../src/numerics -I../../src/oneD -I../../src/zeroD -I../../src/equil -I../../src/converters -O3 -Wall rm -f /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libfct.a libtool -static -o /Users/charles/pkg/_sources/cantera-1.8.0-beta/build/lib/i386-apple-darwin10.7.0/libfct.a fct.o fctxml.o cantera_xml.o cantera_thermo.o cantera_kinetics.o cantera_transport.o cantera_iface.o cantera_funcs.o cantera.o libtool: file: cantera.o has no symbols /usr/bin/install -c -c Cantera/fortran/src/*.mod build/include/cantera
But check out the very first few lines...
g++ -DNDEBUG -g -O3 -O3 -Wall -fPIC -I../../build/include -Isrc -I../clib/src -I/Users/charles/pkg/numpy-1.5.1/lib/python2.7/site-packages/numpy/core/include/numpy -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/pycantera.cpp -o build/temp.macosx-10.6-intel-2.7/src/pycantera.o src/pycantera.cpp:26:31: error: numpy/arrayobject.h: No such file or directory
The problem is, I'm giving /Users/charles/pkg/numpy-1.5.1/lib/python2.7/site-packages/numpy/core/include/numpy
and I need to give /Users/charles/pkg/numpy-1.5.1/lib/python2.7/site-packages/numpy/core/include
(no trailing "numpy"), because it's adding the numpy.
OKAY, that solved the problem.
But now I'm getting a problem with make install:
/usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/man1 /usr/bin/install -c -c man/ck2cti.1 /Users/charles/pkg/cantera/1.8.0/man1 /usr/bin/install -c -c man/mixmaster.1 /Users/charles/pkg/cantera/1.8.0/man1 (cd Cantera/cxx/demos; make install) /usr/bin/install -c -d /Users/charles/pkg/cantera/1.8.0/demos/cxx /usr/bin/install -c Makefile -m ug+rw,o+r /Users/charles/pkg/cantera/1.8.0/demos/cxx install: -m: No such file or directory make[1]: *** [install] Error 71 make: *** [demo-install] Error 2
Are you serious???
When I run it from the command line, at first it gives me the same error, "-m: no such file or directory"
But then I try it again and it says "ug+rw,o+r: no such file or directory"
What???
man install shows these arguments are legit:
-m : specify an alternatve mode; the specified mode may be either an actual or symbolic value; see chmod for a description of possible mode values.
ummmmmmmmmm....
Edited the Makefile Cantera/demos/cxx
BY HAND to move the -c Makefile to be AFTER the -m ug+rw,o+r
aaaaand, it worked fine.
also had to run:
$ make python $ make python-install
and then
export PYTHONPATH="${HOME}/pkg/cantera/1.8.0/lib/python2.7/site-packages:${PYTHONPATH}"
into my .profile