mknrndll failure in 10.8.5

Post Reply
AGBX2
Posts: 14
Joined: Thu Jun 16, 2011 11:12 am

mknrndll failure in 10.8.5

Post by AGBX2 » Wed Feb 12, 2014 3:06 pm

Dear All,

I have tried to install the "official release" of NEURON-7.3 (dmg) on my MacBook which runs under OS-10.8.5. Everything works fine but when I try to compile mod files I obtain the following messages:

Code: Select all

HH2.c:466:16: error: non-void function '_initlists' should return a value
      [-Wreturn-type]
  if (!_first) return;
               ^
30 warnings and 1 error generated.
make: *** [HH2.lo] Error 1
Press 'return' key to close
I uninstalled it and tried the latest alpha release and when trying to compile mod files I obtained:

Code: Select all

HH2.c:461:16: error: non-void function '_initlists' should return a value
      [-Wreturn-type]
  if (!_first) return;
               ^
30 warnings and 1 error generated.
make: *** [HH2.lo] Error 1
use @executable_path prefix for install_name for dylib absolute paths
otool: can't open file: /Users/AGBX2/Desktop/DLGN_NEW/i686/.libs/libnrnmech.so (No such file or directory)
Usage: install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input
Press 'return' key to close
And the same problem occurs regardless the mod files. I decided then to recompile it and followed the precise modus operandi but it ended up with another error message when I tried to compile the nrn part ... It's just like if my compiler was too strict and produced errors instead of warnings as mentioned elsewhere.

I first used the:

Code: Select all

../nrn/configure --prefix=$IDIR/nrn --with-iv=$IDIR/iv --with-pic --with-nrnpython=dynamic 
and obtained:

Code: Select all

io.c:85:3: error: non-void function 'unGetc' should return a value [-Wreturn-type]
                return;
                
                ...
                
11 warnings and 1 error generated.
make[3]: *** [io.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
[ AGBX2 p-e9-lightfoot ~/neuron/nrn ] 
and then tried with:

Code: Select all

../nrn/configure --prefix=$IDIR/nrn --with-iv=$IDIR/iv --with-pic --with-nrnpython=dynamic --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'
and obtained:

Code: Select all

ivocrand.cpp:191:26: error: addition of default argument on redeclaration makes this constructor a default constructor
Rand::Rand(unsigned long seed = 0, int size = 55, Object* obj = nil) {
                         ^      ~
./random1.h:11:3: note: previous declaration is here
  Rand(unsigned long seed, int size, Object*);
...
12 warnings and 1 error generated.
make[3]: *** [ivocrand.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
[ AGBX2 p-e9-lightfoot ~/neuron/nrn ] 
Quite desperate I tried the pip install which failed as well with:

Code: Select all

[ AGBX2 p-e9-lightfoot ~ ] sudo pip install NEURON
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Password:
Downloading/unpacking NEURON
  Downloading NEURON-7.2.536.15.tar.gz (30.4MB): 30.4MB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/NEURON/setup.py) egg_info for package NEURON
    Only Windows and 64-bit Linux currently supported by PyNEURON
    Complete output from command python setup.py egg_info:
    Only Windows and 64-bit Linux currently supported by PyNEURON

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/NEURON
Storing debug log for failure in /Users/AGBX2/Library/Logs/pip.log
I have the latest versions of XCode and commandlinetools and I also have installed and tested all the required libraries apart from the MPI before trying to compile.

Could anyone help me ? :)

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

Re: mknrndll failure in 10.8.5

Post by hines » Mon Feb 17, 2014 12:13 pm

The new mac compilers have elevated some of what used to be warnings into errors.
If you were using os x 10.9 I'd say to try out the alpha version
http://www.neuron.yale.edu/ftp/neuron/v ... y1.1.0.dmg
But for 10.8 it should suffice for you to edit /Applications/NEURON-7.3/nrn/x86_64/bin/nrnmech_makefile
and change CFLAGS by adding the options
-Wno-return-type -Wno-implicit-function-declaration -Wno-implicit-int

See: http://www.neuron.yale.edu/hg/neuron/nr ... 0f78755a30

AGBX2
Posts: 14
Joined: Thu Jun 16, 2011 11:12 am

Re: mknrndll failure in 10.8.5

Post by AGBX2 » Tue Feb 18, 2014 2:43 am

Dear Michael,

It is all right. I have added the

Code: Select all

-Wno-return-type -Wno-implicit-function-declaration -Wno-implicit-int
to the required file and it works :)
I have also installed and tested the 10.9 dmg version on my 10.8.5 system and it works fine too.
For the next step I have tried the modified compilation directives and this error occurs:

Code: Select all

    ivocrand.cpp:191:26: error: addition of default argument on redeclaration makes this constructor a default constructor
    Rand::Rand(unsigned long seed = 0, int size = 55, Object* obj = nil) {
                             ^      ~
    ./random1.h:11:3: note: previous declaration is here
      Rand(unsigned long seed, int size, Object*);
but the most important is that NEURON AND the mod file compilation works so I thank you again very much for your fast and efficient help !

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

Re: mknrndll failure in 10.8.5

Post by hines » Tue Feb 18, 2014 7:47 am

ivocrand.cpp:191:26: error:
That was fixed in http://www.neuron.yale.edu/hg/neuron/nr ... 0f78755a30
See how the lines were switched in random1.h and ivocrand.cpp
Thre were a couple of other changes also in some other files.

AGBX2
Posts: 14
Joined: Thu Jun 16, 2011 11:12 am

Re: mknrndll failure in 10.8.5

Post by AGBX2 » Tue Feb 18, 2014 8:59 am

Thanks a lot Michael. I used the link and everything was fine :)

Post Reply