Error compiling even IV on 10.6 Snow Leopard

anusm
Posts: 8
Joined: Wed Sep 23, 2009 12:00 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by anusm »

Oh I didn't realize I posted the code from MacOSX10.5.sdk instead of 10.6. I think it was the same for 10.6 as well but will check tomorrow morning.
I do have /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Carbon.framework.
However I downloaded the latest Developer Tools from the Apple website rather than installing it from the Snow Leopard disk. Will try installing from the disk tomorrow and see if that changes anything.
Thanks for all your inputs!
anusm
Posts: 8
Joined: Wed Sep 23, 2009 12:00 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by anusm »

The code I posted from MacOSX10.5.sdk is the same under 10.6 as well.
I installed Developer Tools from the Snow Leopard CD by clicking on Xcode.mpkg. I get the same errors when I run:

Code: Select all

hg clone http://www.neuron.yale.edu/hg/neuron/iv iv
cd iv
sh build.sh
./configure --prefix=/Applications/NEURON-7.1/iv --enable-carbon
make
make install
Essentially it seems like I no longer have definitions for a bunch of the deprecated functions included under Developer. I am really confused as to how this is working for you and not for me.

My compile line for canvas.cpp (before all the errors) is:

Code: Select all

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
I get the same thing as you for gcc version:
$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)

Thanks again!
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by hines »

All I can think of is that your environment variables and aliases are such as to prevent things from working properly.
The only things I've set in my .bash_profile are
$ cat .bash_profile
export PATH=$HOME/bin:$PATH
export EDITOR=em
alias l='ls -l'
IV=/Applications/NEURON-7.1/iv
N=/Applications/NEURON-7.1/nrn
export PATH=$PATH:$N/i386/bin:/Users/hines/mpich2/bin
export PYTHONPATH=$HOME/lib/python

(on my x86_4 linux machine I had trouble for a week with the latest libtool because I had an old script
in $HOME/bin called ggrep)
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by hines »

While at codejam3 in Freiburg, someone showed me the same problem. It was finally traced to the fact
that Carbon is NOT supported on Snow Leopard on an x86_64 architecture. (My machine is i686).
The only solutions for now are to install the 32 bit dmg version of NEURON.
(I don't know if one can easily build a 32 bit version on the x86_64) or else build using X11
(leave off the --enable-carbon argument to configure.

I don't know when I'll be able to convert the carbon window code to cocoa.
anusm
Posts: 8
Joined: Wed Sep 23, 2009 12:00 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by anusm »

Thanks for the information. If I perform a clean installation of Leopard on this machine (with x86_64 architecture), will I be able to compile NEURON from source? I ask because I really want to get NEURON + Python working (such that NEURON can be called as a module from within Python), but don't want to go to the trouble of downgrading if I'm going to run into problems again.
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by hines »

For snow leopard on a 64 bit machine, if you wish to launch python and extend with NEURON the
easiest path is to compile NEURON under X11. Use the latest repository sources as there
are some code changes that are needed. see:
http://www.neuron.yale.edu/hg/neuron/nr ... b2f73c1506

The only way to get a carbon version of NEURON 64 bit snow leopard is to use the
configure options
CFLAGS='-arch i386' CXXFLAGS='-arch i386' --enable-carbon
and in this case, one can launch NEURON and embed python. This works because the
32bit NEURON will cause the 32bit fork of python to be dynamically loaded.
However, if you launch Python, the 64bit fork is launched and there is no corresponding
64bit NEURON library to dynamically load. If one could figure out how to launch the
32bit python then one could extend with the carbon version of NEURON.
aschoen
Posts: 2
Joined: Fri Jan 07, 2011 4:04 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by aschoen »

The instructions posted permanently in in the "Download" section of the neuron website do not say to run build.sh. I suspect that this is the real cause of many "Snow Leopard" issues. I was only able to compile after running build.sh. I also checked out the latest code with mercurial. I don't know if this was vital, because I didn't test the archive in the downloads section.
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by hines »

There are instructions about build.sh on the page
http://www.neuron.yale.edu/neuron/download/getdevel
under "2. Create the "configure" files" which is under
"The very latest development code" section. This page is
navigated to from
http://www.neuron.yale.edu/neuron/download
from the heading ""Alpha" version installers and development code".

You must have taken another path that bypassed this. Where should we put
another link to the above "getdevel" page?
aschoen
Posts: 2
Joined: Fri Jan 07, 2011 4:04 pm

Re: Error compiling even IV on 10.6 Snow Leopard

Post by aschoen »

I clicked "Download", scrolled to the bottom where it says "Compiling the standard distribution from source code", clicked "get the source code for the standard distribution..." and then clicked "OS X". That leads to the page
http://www.neuron.yale.edu/neuron/downl ... ilestd_osx
which contains compilation instructions that don't mention build.sh
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Error compiling even IV on 10.6 Snow Leopard

Post by ted »

aschoen wrote:I clicked "Download", scrolled to the bottom where it says "Compiling the standard distribution from source code", clicked "get the source code for the standard distribution..." and then clicked "OS X". That leads to the page
http://www.neuron.yale.edu/neuron/downl ... ilestd_osx
which contains compilation instructions that don't mention build.sh
. . . because the standard distribution sources include a configure file, so there is no need to run (or mention) build.sh
Post Reply