Compile 7.3 on Mac 10.8

Post Reply
m.capogrosso
Posts: 8
Joined: Tue Jan 25, 2011 12:13 pm

Compile 7.3 on Mac 10.8

Post by m.capogrosso »

good evening to all, I've compiled the distribution on several mac machines without any problem,
however I'm struggling with the following error on this new machine that we have in the lab when I try to compile Neuron

Code: Select all

io.c:85:3: error: non-void function 'unGetc' should return a value [-Wreturn-type]
                return;
this error stops the "make" phase of the neuron installation, "vi" installed properly and it doesn't look that is something related to python or openMPI
Does someone have any Idea?

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

Re: Compile 7.3 on Mac 10.8

Post by hines »

Your compiler is very strict and has promoted what used to be a warning into an error. This would be the first of many that would cause problems.
Are you using the clang compiler? If so, see http://www.neuron.yale.edu/phpBB/viewto ... f=4&t=2826 and in particular the CFLAGS and CXXFLAGS
options used for configure. e.g.

Code: Select all

./configure --prefix=/Application/NEURON/nrn --with-iv=/Application/NEURON/iv --with-pic --with-nrnpython --with-paranrn --with-readline=/usr/local/opt/readline --with-pic CC='clang' CXX='clang++' CFLAGS='-O3 -Wno-return-type -Wno-implicit-function-declaration -Wno-implicit-int -fPIC' CXXFLAGS='-O3 -Wno-return-type -Wno-implicit-function-declaration -Wno-implicit-int -fPIC'
m.capogrosso
Posts: 8
Joined: Tue Jan 25, 2011 12:13 pm

Re: Compile 7.3 on Mac 10.8

Post by m.capogrosso »

Thanks Micheal!

Actually I was using the last version of gcc as downloaded by the link to the developer tool to the last version of the Command line packages (for Mountain lion 10.8.5), I made sure that I was using gcc by applying
the CC='gcc' command, and the CXX='g++' command. I don't want to use clang because I have no experience of it and I also miss some component like the 'readline'.
I suspect that could be something related to the last update of the Xcode tools.
Do you know of others having a similar issue? Otherwise I could try to install some older version of XCode.
Thanks again

Marco
m.capogrosso
Posts: 8
Joined: Tue Jan 25, 2011 12:13 pm

Re: Compile 7.3 on Mac 10.8

Post by m.capogrosso »

Hi Micheal,

I tried to proceed by installing the older version of Xcode (4.6) Ad apprently the situation is improving in the sense that I don't have any more that error, maybe this version is more permissive, I have though another problem.

So now, again vi, compiles and install proprerly, Neruon instead is ok up to the "make" phase included, but when I do the "make install" command I have the following error

Code: Select all

if test ! -f graphicsPrimitives.cpp ; then \
		cp ../../../../../../share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.cpp  . ; \
	fi
cp: ../../../../../../share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.cpp: No such file or directory
make[7]: *** [install-exec-am] Error 1
make[6]: *** [install-am] Error 2
make[5]: *** [install-recursive] Error 1
make[4]: *** [install-recursive] Error 1
make[3]: *** [install-recursive] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
As it's missing that "graphicsPrimitives.cpp" function.
Any Idea?

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

Re: Compile 7.3 on Mac 10.8

Post by hines »

The version 4 RXD stuff requires cython. There are 4 options.
1) if you are working from a mercurial repository update to version 3 using
hg update 'Release 7.3'

2) install cython. On my mac I have done this with macports using
sudo port install py27-cython
and then I configured with the extra option
CYTHON=cython-2.7

3) (kind of painful) install NEURON on a linux system and copy the cython generated .cpp files to your mac.

4) do not configure with --with-nrnpython
m.capogrosso
Posts: 8
Joined: Tue Jan 25, 2011 12:13 pm

Re: Compile 7.3 on Mac 10.8

Post by m.capogrosso »

Thanks Micheal, It worked just fine, with option 2!!


Marco
Post Reply