OSX Yosemite 10.10.1 make install error

Post Reply
ehagen

OSX Yosemite 10.10.1 make install error

Post by ehagen » Mon Jan 26, 2015 12:05 pm

Dear developers.
I came across an issue that I couldn't resolve, attempting to install the most recent developer version (changeset 1211:a63a18084f1c) of NEURON. I'm compiling using GCC as provided by Macports. Both the OS and installed ports are up to date.

Configuration (just avoiding some includes here):

Code: Select all

export CC=/opt/local/bin/gcc-mp-4.9 
export CXX=/opt/local/bin/g++-mp-4.9 
./configure --prefix=/Applications/NEURON-7.4/nrn --without-iv --without-nrnpython --without-nrniv --without-nrnoc-x11 --without-paranrn
"make" results in no errors, however "sudo make install" crashes when (cross-)compiling the file "/src/mac/mac2uxarg.c":

Code: Select all

gcc -g -arch i386 -Dncpu="\"x86_64\"" -I. ./launch.c ./mac2uxarg.c -framework Carbon
In file included from /usr/include/dispatch/dispatch.h:51:0,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19,
                 from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
                 from ./mac2uxarg.c:10:
/usr/include/dispatch/object.h:143:15: error: expected identifier or '(' before '^' token
 typedef void (^dispatch_block_t)(void);
               ^
/usr/include/dispatch/object.h:362:3: error: unknown type name 'dispatch_block_t'
   dispatch_block_t notification_block);
   ^
./mac2uxarg.c: In function 'fullname':
./mac2uxarg.c:93:7: warning: 'PBGetCatInfoSync' is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:8732) [-Wdeprecated-declarations]
       err = PBGetCatInfoSync(&myPB);
       ^
make[2]: *** [install] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
inm6078:nrn ehagen$ 
Any help to resolve the issue would be greatly appreciated.

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

Re: OSX Yosemite 10.10.1 make install error

Post by hines » Mon Jan 26, 2015 2:29 pm

I've never built NEURON on mac os x except with the Xcode command line tools. The failure indicated is for a now ancient launcher helper that requires
carbon that (hence the i386 architecture) is not available for x86_64 machines. It is needed for the icons but should not be needed if you launch from
a terminal. The old launcher uses FSSpec which was in Carbon but is now obsolete. Someone who was familiar with Xcode and app
development could probably replace it in a few minutes. I'd try commenting out the "gcc -g -arch i386 ..." line with a # in the nrn/src/mac/Makefile.am
file and see if the install succeeds without errors and you are able to launch nrniv from a terminal window .
By the way, adding the --without-nrniv configure argument might be reducing the program to uselessness but I have to admit I never used that arg.

ehagen

Re: OSX Yosemite 10.10.1 make install error

Post by ehagen » Tue Jan 27, 2015 5:28 am

Thanks a lot.
The suggested change appear to work fine when similar entries was commented out in the main /src/mac/Makefile and /src/mac/Makefile.in as well.

JustasB
Posts: 14
Joined: Tue Dec 08, 2015 8:17 pm

Re: OSX Yosemite 10.10.1 make install error

Post by JustasB » Wed Dec 09, 2015 3:51 pm

Commenting out the "gcc -g ..." lines avoided the problem, but then sent me down another rabbit hole of issues.

I was able to get past the error by following the suggestion here:
http://stackoverflow.com/questions/2797 ... re-headers

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

Re: OSX Yosemite 10.10.1 make install error

Post by hines » Wed Dec 09, 2015 6:37 pm

I have not had trouble building on Yosimite. That may be because the command line tools apparently copied clang to gcc according to 'gcc -v'

Post Reply