NEURON installation on macOS Catalina

Post Reply
kellihancock
Posts: 2
Joined: Tue Dec 17, 2019 4:14 pm

NEURON installation on macOS Catalina

Post by kellihancock » Fri Dec 20, 2019 9:01 am

Hello -

I am trying to install NEURON on macOS Catalina 10.15.1 but I get an error message that says "'nrn-7.7.x86_64-osx.pkg' can't be opened because Apple cannot check it for malicious software". Has anyone else encountered or resolved this issue?

Thanks,

Kelli



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

Re: NEURON installation on macOS Catalina

Post by hines » Mon Dec 23, 2019 8:48 am

Yes. It is not enough any longer that the package be signed, it must also be notarized (now a $100 annual fee). Notarization means that Apple
scanned the app for known malicious software. From https://support.apple.com/en-us/HT202491

How to open an app that hasn’t been notarized or is from an unidentified developer
Running software that hasn’t been signed and notarized may expose your computer and personal information to malware that can harm your Mac or compromise your privacy. If you’re certain that an app you want to install is from a trustworthy source and hasn’t been tampered with, you can temporarily override your Mac security settings to open it.

In macOS Catalina and macOS Mojave, when an app fails to install because it hasn’t been notarized or is from an unidentified developer, it will appear in System Preferences > Security & Privacy, under the General tab. Click Open Anyway to confirm your intent to open or install the app.

kellihancock
Posts: 2
Joined: Tue Dec 17, 2019 4:14 pm

Re: NEURON installation on macOS Catalina

Post by kellihancock » Thu Jan 23, 2020 1:41 pm

Ok, thank you! I was able to install NEURON, but now I am having trouble with compiling mod files with the nrnivmodl command. In particular, I get the output posted below. Do you have any insight on this?

Note: I re-installed XCode and command line tools.

(base) MacBook-Pro:August2019 kellihancock$ nrnivmodl myexpsyn.mod
/Users/kellihancock/Box Sync/Home Folder ksh57/Sync/Grill Lab/CRCompModels/NEURONCR/August2019
myexpsyn.mod
myexpsyn.mod
"/Applications/NEURON-7.7/nrn/share/nrn/libtool" --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I"/Applications/NEURON-7.7/nrn/include/nrn" -I"/Applications/NEURON-7.7/nrn/x86_64/lib" -g -O2 -c -o mod_func.lo mod_func.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/Applications/NEURON-7.7/nrn/include/nrn -I/Applications/NEURON-7.7/nrn/x86_64/lib -g -O2 -c mod_func.c -fno-common -DPIC -o .libs/mod_func.o
"/Applications/NEURON-7.7/nrn/share/nrn/libtool" --tag=CC --mode=link gcc -module -g -O2 -headerpad_max_install_names -o libnrnmech.la -rpath "/Applications/NEURON-7.7/nrn/x86_64/lib" myexpsyn.lo mod_func.lo -L"/Applications/NEURON-7.7/nrn/x86_64/lib" -lnrnoc -loc -lmemacs -lscopmath -lsparse13 -lreadline -lncurses -L"/Applications/NEURON-7.7/nrn/x86_64/lib" -lnrniv -livoc -lneuron_gnu -lmeschach -lsundials
libtool: link: gcc -Wl,-undefined -Wl,dynamic_lookup -o .libs/libnrnmech.0.so -bundle .libs/myexpsyn.o .libs/mod_func.o -L/Applications/NEURON-7.7/nrn/x86_64/lib /Applications/NEURON-7.7/nrn/x86_64/lib/libnrnoc.dylib /Applications/NEURON-7.7/nrn/x86_64/lib/liboc.dylib -L/usr/X11/lib -lX11 /Applications/NEURON-7.7/nrn/x86_64/lib/libmemacs.dylib /Applications/NEURON-7.7/nrn/x86_64/lib/libscopmath.dylib /Applications/NEURON-7.7/nrn/x86_64/lib/libsparse13.dylib /Applications/NEURON-7.7/nrn/x86_64/lib/libreadline.dylib -lncurses /Applications/NEURON-7.7/nrn/x86_64/lib/libnrniv.dylib /Applications/NEURON-7.7/nrn/x86_64/lib/libivoc.dylib /Applications/NEURON-7.7/nrn/x86_64/lib/libneuron_gnu.dylib /Applications/NEURON-7.7/nrn/x86_64/lib/libmeschach.dylib /Applications/NEURON-7.7/nrn/x86_64/lib/libsundials.dylib -g -O2
ld: warning: directory not found for option '-L/usr/X11/lib'
ld: library not found for -lX11
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libnrnmech.la] Error 1

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

Re: NEURON installation on macOS Catalina

Post by hines » Thu Jan 23, 2020 2:04 pm

ld: library not found for -lX11
It appears that XQuartz is not installed. You can do that from xquartz.org

Lopreore
Posts: 3
Joined: Thu Jan 23, 2020 11:45 am

Re: NEURON installation on macOS Catalina

Post by Lopreore » Fri Feb 07, 2020 5:22 pm

I am also getting an error message since updating to Catalina

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/NEURON-7.7/nrn/lib/python/neuron/__init__.py", line 112, in <module>
exec("import neuron.hoc%d%d as hoc" % (sys.version_info[0], sys.version_info[1]))
File "<string>", line 1, in <module>
ImportError: No module named hoc27

Before updating to Catalina Neuron worked fine from both the terminal window and from xquartz xterminal.

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

Re: NEURON installation on macOS Catalina

Post by hines » Fri Feb 07, 2020 6:26 pm

If you start a terminal and launch python or python3 what is the result of
import sys
sys.version

Lopreore
Posts: 3
Joined: Thu Jan 23, 2020 11:45 am

Re: NEURON installation on macOS Catalina

Post by Lopreore » Mon Feb 10, 2020 11:35 am

I get the message

'2.7.16 (default, Dec 13 2019, 18:00:32) \n[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-s'

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

Re: NEURON installation on macOS Catalina

Post by hines » Mon Feb 10, 2020 11:54 am

Check the output of
otool -L /Applications/NEURON-7.7/nrn/lib/python/neuron/hoc.so
to see if it cannot find any of the libraries that library is trying to load.

It may be that you need to install/upgrade your command line tools and XQuartz. The latter comes from xquartz.org. For the former, when I type
xcode-select --install
I get 'xcode-select: error: command line tools are already installed, use "Software Update" to install updates.'

Lopreore
Posts: 3
Joined: Thu Jan 23, 2020 11:45 am

Re: NEURON installation on macOS Catalina

Post by Lopreore » Mon Feb 10, 2020 2:47 pm

I reinstalled xquartz and everything is working now. Thanks for your help!

Post Reply