Page 1 of 1

NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Tue Nov 22, 2011 11:22 am
by vsekulic
Hello!

NEURON seems somewhat borked in the latest up-to-date version of OS X Lion (10.7.2). NB: I have the latest Xcode installed (4.2.1). I believe it started when I wished to run nrnivmodl on some mod files, and it failed with:

Code: Select all

...
"/Applications/NEURON-7.1/nrn/share/nrn/libtool"  --mode=compile gcc -DHAVE_CONFIG_H  -I. -I.. -I"/Applications/NEURON-7.1/nrn/include/nrn" -I"/Applications/NEURON-7.1/nrn/umac/lib"    -arch ppc -arch i386 -c -o ICaL.lo `test -f 'ICaL.c' || echo '/'`ICaL.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/Applications/NEURON-7.1/nrn/include/nrn -I/Applications/NEURON-7.1/nrn/umac/lib -arch ppc -arch i386 -c ICaL.c  -fno-common -DPIC -o .libs/ICaL.o
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/xd/2jsc7brn0jq76r60nq_fcsgm0000gn/T//ccN42syY.out
make: *** [ICaL.lo] Error 1
From some Googling it seems that this is because Lion doesn't have support for building or running powerpc binaries anymore. Reinstalling NEURON using the dmg file for 10.4 doesn't work (got same problem as above). No problem, I thought, I will just rebuild from source. Turns out there are problems here too.

Interviews configure output:

Code: Select all

user226-139:iv vsekulic$ ./configure --prefix=/Applications/NEURON-7.1/iv --enable-carbon
configure: WARNING: unrecognized options: --enable-carbon
checking build system type... x86_64-apple-darwin11.2.0
checking host system type... x86_64-apple-darwin11.2.0
checking for g++... g++
checking whether the C++ compiler works... yes

... [ snipped out ] ...

config.status: creating src/lib/Makefile
config.status: WARNING:  'src/lib/Makefile.in' seems to ignore the --datarootdir setting
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating src/include/ivstream.h
config.status: src/include/ivstream.h is unchanged
config.status: executing libtool commands
configure: WARNING: unrecognized options: --enable-carbon
user226-139:iv vsekulic$ 
Interestingly, the --enable-carbon option seems to not be supported anymore. Interviews make output:

Code: Select all

user226-139:iv vsekulic$ make
Making all in src
Making all in lib
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -DMAC=1 -Dcarbon=1 -DSYSV=1 -c Dispatch/dispatcher.cpp  -fno-common -DPIC -o Dispatch/.libs/dispatcher.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -DMAC=1 -Dcarbon=1 -DSYSV=1 -c Dispatch/iohandler.cpp  -fno-common -DPIC -o Dispatch/.libs/iohandler.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -DMAC=1 -Dcarbon=1 -DSYSV=1 -c IV-Mac/bitmap.cpp  -fno-common -DPIC -o IV-Mac/.libs/bitmap.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -DMAC=1 -Dcarbon=1 -DSYSV=1 -c IV-Mac/brush.cpp  -fno-common -DPIC -o IV-Mac/.libs/brush.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -DMAC=1 -Dcarbon=1 -DSYSV=1 -c IV-Mac/canvas.cpp  -fno-common -DPIC -o IV-Mac/.libs/canvas.o
In file included from IV-Mac/canvas.cpp:57:
../include/IV-Mac/canvas.h: In member function 'void MACcanvas::addToDamage(Rect*)':
../include/IV-Mac/canvas.h:208: error: 'UnionRect' was not declared in this scope

... [ snipped out ] ...

IV-Mac/canvas.cpp:1288: error: 'GetPortBitMapForCopyBits' was not declared in this scope
IV-Mac/canvas.cpp:1293: error: 'CopyBits' was not declared in this scope
make[2]: *** [IV-Mac/canvas.lo] Error 1
Making all in include
make[2]: Nothing to be done for `all'.
Making all in bin
Making all in idemo
g++ -DHAVE_CONFIG_H -I. -I. -I../../include   -g -O2 -DMAC=1 -Dcarbon=1 -DSYSV=1 -c -o main.o main.cpp
/bin/sh ../../../libtool --mode=link g++ -g -O2 -DMAC=1 -Dcarbon=1 -DSYSV=1 -framework Carbon  -o idemo main.o ../../lib/libIVhines.la  
libtool: link: cannot find the library `../../lib/libIVhines.la' or unhandled argument `../../lib/libIVhines.la'
make[3]: *** [idemo] Error 1
user226-139:iv vsekulic$ 
(I didn't run make install or after_install.)

Then I tried building NEURON without Interviews, just in case. The output of configure:

Code: Select all

user226-139:nrn vsekulic$ ./configure --prefix=/Applications/NEURON-7.1/nrn --without-iv --enable-carbon
configure: WARNING: unrecognized options: --enable-carbon
checking for a BSD-compatible install... /opt/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no

... [ snipped out ] ...

config.status: creating src/sundials/sundials_config.h
config.status: src/sundials/sundials_config.h is unchanged
config.status: creating src/nrnpython/nrnpython_config.h
config.status: src/nrnpython/nrnpython_config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --enable-carbon
user226-139:nrn vsekulic$ 
NEURON make:

Code: Select all

make  all-recursive
Making all in src
Making all in memacs
/bin/sh ../../libtool --tag=CC   --mode=compile gcc -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 -I../../src/nrnpython     -g -O2 -MT ansi.lo -MD -MP -MF .deps/ansi.Tpo -c -o ansi.lo ansi.c
libtool: compile:  gcc -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 -I../../src/nrnpython -g -O2 -MT ansi.lo -MD -MP -MF .deps/ansi.Tpo -c ansi.c  -fno-common -DPIC -o .libs/ansi.o
mv -f .deps/ansi.Tpo .deps/ansi.Plo

... [ snipped out ] ...

Making all in ivos
make  all-recursive
Making all in InterViews
make[5]: Nothing to be done for `all'.
Making all in OS
make[5]: Nothing to be done for `all'.
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/sundials -I../../src/nrnpython     -g -O2 -MT file.lo -MD -MP -MF .deps/file.Tpo -c -o file.lo file.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/sundials -I../../src/nrnpython -g -O2 -MT file.lo -MD -MP -MF .deps/file.Tpo -c file.cpp  -fno-common -DPIC -o .libs/file.o
mv -f .deps/file.Tpo .deps/file.Plo
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/sundials -I../../src/nrnpython     -g -O2 -MT listimpl.lo -MD -MP -MF .deps/listimpl.Tpo -c -o listimpl.lo listimpl.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/sundials -I../../src/nrnpython -g -O2 -MT listimpl.lo -MD -MP -MF .deps/listimpl.Tpo -c listimpl.cpp  -fno-common -DPIC -o .libs/listimpl.o
listimpl.cpp: In function 'void ListImpl_range_error(long int)':
listimpl.cpp:56: warning: format '%d' expects type 'int', but argument 2 has type 'long int'
listimpl.cpp:56: warning: format '%d' expects type 'int', but argument 2 has type 'long int'
mv -f .deps/listimpl.Tpo .deps/listimpl.Plo
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/sundials -I../../src/nrnpython     -g -O2 -MT math.lo -MD -MP -MF .deps/math.Tpo -c -o math.lo math.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/sundials -I../../src/nrnpython -g -O2 -MT math.lo -MD -MP -MF .deps/math.Tpo -c math.cpp  -fno-common -DPIC -o .libs/math.o
mv -f .deps/math.Tpo .deps/math.Plo
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/sundials -I../../src/nrnpython     -g -O2 -MT memory.lo -MD -MP -MF .deps/memory.Tpo -c -o memory.lo memory.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/sundials -I../../src/nrnpython -g -O2 -MT memory.lo -MD -MP -MF .deps/memory.Tpo -c memory.cpp  -fno-common -DPIC -o .libs/memory.o
memory.cpp: In static member function 'static void osMemory::copy(const void*, void*, unsigned int)':
memory.cpp:38: error: 'BlockMove' was not declared in this scope
make[5]: *** [memory.lo] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I didn't do too much debugging, however I'm more than willing to try any suggestions. Thank you!

Re: NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Tue Nov 22, 2011 3:44 pm
by ted
7.1 does not work under Lion. Try the latest installer for OS X, which, since 11/16, is
http://www.neuron.yale.edu/ftp/neuron/v ... 10.8.0.dmg

Re: NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Tue Nov 22, 2011 9:07 pm
by ted
Wow, that information is labile. Just a few hours later, we have a new standard distribution: version 7.2 is no longer in alpha. Instead, just go to the Download page
http://www.neuron.yale.edu/neuron/download
and get the version 7.2 "standard distribution" installer for OS X 10.8

Re: NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Wed Nov 23, 2011 12:04 pm
by vsekulic
Thank you, what timing! I installed the 7.2 distribution and it works like a charm!

While on the topic -- what is notably different in version 7.2? I don't seem to be able to find any info on this on the site/forums or in the source tarball.

Thanks!

Re: NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Wed Nov 23, 2011 10:59 pm
by ted
From the perspective of many users, perhaps the most salient feature is the fact that it works under the latest OS X, MSWin, and Linux distributions. Other than that, performance improvements, elimination of bugs, GPL compliance, refinement and extension of Python + NEURON come to mind. You might find other items of interest in the mercurial changelog http://www.neuron.yale.edu/hg/neuron/nrn/ (discloses all changes in the past 11 months; prior to that a Trac repository was used, and before that CVS, which I think are still around somewhere if you're eager to dig through them).

Re: NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Thu Nov 24, 2011 4:38 pm
by vsekulic
Thanks again, that's very helpful!

Re: NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Tue Jul 17, 2012 8:50 pm
by hines
Now that OSX 10.8 (Mountain Lion) will be out in a week or so, I can say that the 10.7 (Lion) version of NEURON is in pretty good shape.
It is a 64 bit X11 version and works with or without Python, with or without openmpi, can be installed in places other than /Applications (can launch
straight from the dmg), and all the icons work. You can try
http://www.neuron.yale.edu/ftp/neuron/v ... 10.7.4.dmg
(the 694+ will change when I update; go to the folder above if the link disappears)

I haven't tried this, but there is hope that if one installs enthought python and the libraries are prior in the LD_LIBRARY_PATH, then NEURON will
properly use the enthought version instead of the Python already installed on your machine.

To get single click action for x11 windows when the mouse enters a new window, consider executing in a terminal window the command:
defaults write org.x.X11 wm_ffm -bool true

This version will NOT work on Snow Leopard (10.6). I don't know if it will work on the upcoming Mountain Lion (10.8) but I have hope that it will after
it asks you to install XQuartz.

The following notes are useful if you build from the sources. More info is available in the nrn/macosxconf.sh file.
It was built using:
export IDIR=/Applications/NEURON-7.3
../nrn/configure --prefix=$IDIR/nrn --with-iv=$IDIR/iv --with-paranrn=dynamic --with-nrnpython=dynamic
make
make install
make after_install

Note that I had already installed openmpi to its default location. Xcode 4 was installed (4GB size so I recommend the command line tools version. It is
required to build and when mknrndll is used.) InterViews was installed using
./configure --prefix=$IDIR/iv
make
make install

Re: NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Tue Jul 17, 2012 8:56 pm
by hines
Sorry. I botched the above link to the dog. It is
http://www.neuron.yale.edu/ftp/neuron/v ... 10.7.4.dmg

Re: NEURON 7.1 kaput on OS X Lion 10.7.2?

Posted: Tue Jul 17, 2012 8:58 pm
by hines
dmg, not dog