nrnivmodl No rule to make target

Post Reply
bscoventry

nrnivmodl No rule to make target

Post by bscoventry »

Hi all,

I ran into an interesting problem while trying to compile mod files on an Ubuntu distribution. I was previously able to compile these files just fine, then I compiled NEURON into a Python package as per Hines et al 2009. Since then, when compiling mod files, I get the following error:

Code: Select all

:~/OpticalStim$ nrnivmodl
/home/brandon/OpticalStim
ca.mod cad.mod chanrhod.mod gabaa.mod kca.mod km.mod kv.mod na.mod na12.mod na16.mod ostim.mod xtra.mod
ca.mod cad.mod chanrhod.mod gabaa.mod kca.mod km.mod kv.mod na.mod na12.mod na16.mod ostim.mod xtra.mod
make: *** No rule to make target 'ca.mod', needed by 'ca.lo'.  Stop.
Interesting. To dig in deeper, I ran the neuron demo:

Code: Select all

:~/OpticalStim$ neurondemo
NEURON -- Release 7.4 (1341:2ccabed20677) 2015-05-31
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits

loading membrane mechanisms from /usr/local/nrn/share/nrn/demo/release/x86_64/.libs/libnrnmech.so
Additional mechanisms from files
 cabpump.mod cachan1.mod camchan.mod capump.mod invlfire.mod khhchan.mod mcna.mod nacaex.mod nachan.mod release.mod
ImportError: No module named site
Py_Initialize exited. PYTHONHOME probably needs to be set correctly.
Our automatic guess based on the Python shared library location:
    export PYTHONHOME=/usr/lib
did not work.
It will help to examine the output of:
nrnpyenv.sh
and set the indicated environment variables, or avoid python by adding
nopython: on
to /usr/local/nrn/share/nrn/lib/nrn.defaults (or .nrn.defaults in your $HOME directory)
However, checking the python directory, it is indeed pointing to my python distribution in Canopy. I've even tried setting the no python on option on with no success. Has anyone had any experience with this?

Best,
Brandon
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: nrnivmodl No rule to make target

Post by hines »

Second issue:
Although enthought python is first in your path. It may not be the case that the corresponding libpython... is first in the paths searched by ldopen when libpython is dynamically
loaded. One solution is to figure out where enthought python is :
which python
and then replace the last two names, bin/python, with lib and see if libpython...so is in that folder. If so use that in
export LD_LIBRARY_PATH=..../lib

Perhaps a simpler thing to do is execute
nrnpyenv.sh
and set the environment variables indicated, since it may be that PYTHONHOME is also useful as well as PYTHONPATH

first issue:
try removing the x86_64 folder from the folder where you typed nrnivmodl and try again.
bscoventry

Re: nrnivmodl No rule to make target

Post by bscoventry »

Michael,

Thank you for your help. Your suggestion fixed the second issue. However, the first issue persisted. So I utilized the scorched earth approach and deleted and redownloaded the model. This seemed to fix it. While disconcerting, atleast it worked. Thank you!

Brandon
Post Reply