Page 1 of 1

Installation problem with NEURON 7.1 and OS X 10.7

Posted: Thu Sep 29, 2011 11:02 am
by henriklinden
I managed to install NEURON 7.1 on a new laptop running OS X 10.7 by following the intructions from Andrew Davison at http://www.davison.webfactional.com/not ... on-python/ but when I try running "nrngui" I get:

Code: Select all

dyld: lazy symbol binding failed: Symbol not found: _XOpenDisplay
  Referenced from: /usr/local/iv/i686/lib/libIVhines.3.dylib
  Expected in: flat namespace

dyld: Symbol not found: _XOpenDisplay
  Referenced from: /usr/local/iv/i686/lib/libIVhines.3.dylib
  Expected in: flat namespace

Trace/BPT trap: 5
Possibly related, when I try importing Neuron as a module in Python I just get:

Code: Select all

dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/neuron/hoc.so, 2): Symbol not found: _XGetWindowAttributes
  Referenced from: /Users/helinden/Installations/nrn-7.1/i686/lib/libivoc.0.dylib
  Expected in: flat namespace
 in /Users/helinden/Installations/nrn-7.1/i686/lib/libivoc.0.dylib
I'm clueless right now. Does anyone have an idea what might be wrong?

Thanks in advance
Henrik

Re: Installation problem with NEURON 7.1 and OS X 10.7

Posted: Thu Sep 29, 2011 12:29 pm
by ted
Lots of bugs have been fixed since 7.1 was released. Suggest you instead get the latest alpha, or even the most recent development code from the mercurial repository.

Re: Installation problem with NEURON 7.1 and OS X 10.7

Posted: Fri Sep 30, 2011 10:04 am
by henriklinden
Ok that's a good idea. I tried downloading and installing the latest development code by:

Code: Select all

hg clone http://www.neuron.yale.edu/hg/neuron/iv 
cd iv
./build.sh
./configure --prefix=`pwd`
make 
make install
cd ..
hg clone http://www.neuron.yale.edu/hg/neuron/nrn
cd nrn
./build.sh
./configure --prefix=`pwd` --with-iv=../iv --with-nrnpython PYLIBLINK='-framework Python' PYLIB='-framework Python'
make
but the 'make' of Neuron doesn't finish, instead I get the error:

Code: Select all

nrnpython.cpp:5:32: error: InterViews/session.h: No such file or directory
nrnpython.cpp: In function 'void nrnpython_start(int)':
nrnpython.cpp:139: error: 'ivSession' has not been declared
nrnpython.cpp:140: error: 'ivSession' has not been declared
make[4]: *** [nrnpython.lo] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Any ideas on this?

Re: Installation problem with NEURON 7.1 and OS X 10.7

Posted: Fri Sep 30, 2011 12:50 pm
by ted
make isn't finding something that belongs to InterViews. I suspect the reason is that the path specified in your configure command was ../iv, i.e. it specified relative path rather than absolute.

The example posted at http://www.neuron.yale.edu/neuron/downl ... pile_linux assumed the source code was in subdirectories of $HOME/neuron called iv and nrn, and the configure command for NEURON was
./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv
Proceeding exactly as described in that example, I find that make completes without error.

You might try again by running
make clean
in your nrn directory, then running configure but with different parameters than you tried the first time.
If your nrn and iv file trees are located in $HOME/neuron, I'd suggest
./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv . . . other options . . .
If they are located somewhere else, I'd suggest
./configure --prefix=`pwd` --with-iv=path_to_sourcecoderoot/iv . . . other options . . .
where you replace
path_to_sourcecoderoot
with the full path to the directory that contains iv. Then try make again.

Or you might just delete the entire nrn source code tree and grab a new copy from the mercurial repository, then
./configure --prefix=`pwd` --with-iv=path_to_sourcecoderoot/iv
make
etc.

Re: Installation problem with NEURON 7.1 and OS X 10.7

Posted: Mon Oct 03, 2011 5:52 am
by henriklinden
Thanks Ted for your help and quick response. I hadn't realized the difference between absolute and relative path, but your suggestion did the trick.

When importing Neuron as a Python module I also get the error reported in
http://www.neuron.yale.edu/phpBB/viewto ... f=4&t=2370
but applying the changes to the source code as suggested there fixes that problem.

Again, thanks for the help.

Re: Installation problem with NEURON 7.1 and OS X 10.7

Posted: Mon Oct 03, 2011 9:29 am
by ted
Thanks for using NEURON in your research. Also thanks for summarizing what worked--that will make things easier for others who may encounter the same problems.