Thanks to @pramodk's help, I have been able to jump through all the hoops necessary to compile NEURON on Mac OSX using Python installed via Anaconda.
This issue is solved, but I'd like to leave a trace of the steps necessary for building, in case other people have similar problems.
Summary
You need to add at least the following options to configure step
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
This was fixed by specifying macdarwin=no in the configure line
Linking with Anaconda Python
First, you need to find where you anaconda was installed.
Mine was installed at $HOME/anaconda3.
During the configure phase, you need to carefully specify the correct paths.
For example, I am using python3.5 and the following (minimal) configure line
Thanks to @pramodk's help, I have been able to jump through all the hoops necessary to compile NEURON on Mac OSX using Python installed via Anaconda. This issue is solved, but I'd like to leave a trace of the steps necessary for building, in case other people have similar problems.
Summary
DYLD_LIBRARY_PATH
andPYTHONHOME
More details
Problem with CarbonCore.framework
At first, I got the following problem:
This was fixed by specifying
macdarwin=no
in the configure lineLinking with Anaconda Python
First, you need to find where you anaconda was installed. Mine was installed at
$HOME/anaconda3
. During the configure phase, you need to carefully specify the correct paths.For example, I am using python3.5 and the following (minimal) configure line
Setting runtime environment
when you execute, you need to make sure that
DYLD_LIBRARY_PATH
andPYTHONHOME
are both correctly set.