neuronsimulator / nrn

NEURON Simulator
http://nrn.readthedocs.io
Other
406 stars 118 forks source link

Python3 build fails on OSX #227

Closed neurosutras closed 5 years ago

neurosutras commented 5 years ago

This is the first time I have attempted to build parallel NEURON against mpich and python3 in a python3 conda environment on Mac OSX 10.14.5. Since "stdlib" has been deprecated on OSX, I set the following environment variables:

export CFLAGS='-Qunused-arguments -stdlib=libc++ -mmacosx-version-min=10.9' export CXXFLAGS='-Qunused-arguments -stdlib=libc++ -mmacosx-version-min=10.9' export LDFLAGS='-Qunused-arguments -stdlib=libc++ -mmacosx-version-min=10.9'

and configure as: ./configure --prefix=$HOME/neuron/nrn_py3 --with-iv=$HOME/neuron/iv --with-nrnpython=$HOME/anaconda2/envs/py3/bin/python --with-paranrn --with-mpi --with-readline=no --disable-rx3d

I get the following error on build:

/bin/sh ../../libtool --tag=CXX --mode=compile mpic++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 -I. -I../../src/nrniv -I../../src/ivoc -I../../src/nrnoc -I../../src/oc -I../../src/nrnmpi -I../../src/gnu -I../../src/mesch -I/Users/milsteina/anaconda2/envs/py3/include/python3.7m -I/Users/milsteina/neuron/iv/include -I/usr/X11/include -Qunused-arguments -stdlib=libc++ -mmacosx-version-min=10.9 -MT nrnpy_p2h.lo -MD -MP -MF .deps/nrnpy_p2h.Tpo -c -o nrnpy_p2h.lo nrnpy_p2h.cpp libtool: compile: mpic++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 -I. -I../../src/nrniv -I../../src/ivoc -I../../src/nrnoc -I../../src/oc -I../../src/nrnmpi -I../../src/gnu -I../../src/mesch -I/Users/milsteina/anaconda2/envs/py3/include/python3.7m -I/Users/milsteina/neuron/iv/include -I/usr/X11/include -Qunused-arguments -stdlib=libc++ -mmacosx-version-min=10.9 -MT nrnpy_p2h.lo -MD -MP -MF .deps/nrnpy_p2h.Tpo -c nrnpy_p2h.cpp -fno-common -DPIC -o .libs/nrnpy_p2h.o mv -f .deps/nrnpy_p2h.Tpo .deps/nrnpy_p2h.Plo make[4]: No rule to make target grids.c', needed bygrids.lo'. Stop. make[3]: [all] Error 2 make[2]: [all-recursive] Error 1 make[1]: [all-recursive] Error 1 make: *** [all] Error 2

neurosutras commented 5 years ago

FWIW, I was able to build fine by rolling back to the last commit that I had used to build against python2.7: 7.7.0-26-gccfa131c

ramcdougal commented 5 years ago

Is it possible you had previously built from this directory?

The grids.c file is no longer used, but if you haven't rerun the ./build.sh the Makefile will still look for it.

The safest solution is to do a

sudo make distclean
./build.sh

and proceed with the configure etc from there

neurosutras commented 5 years ago

I do regularly: git pull make clean ./build.sh

But I had not tried make distclean.

Thanks for the tip!