"Image not found" on macOS High Sierra
Object-oriented equation-based modelling and optimisation software
Brought to you by:
ciroki
After moving to macOS as my main OS, I want to continue using DAE Tools. However, I have yet to get it to work. I installed required packages via Miniconda, downloaded tar file, executed setup.py. However, if I try to run any tutorial (in console mode), I get the following error:
Traceback (most recent call last):
File "tutorial_che_opt_3.py", line 73, in <module>
from daetools.pyDAE import *
File "/Users/rotton/miniconda3/lib/python3.6/site-packages/daetools-1.9.0-py3.6-macosx-10.7-x86_64.egg/daetools/pyDAE/__init__.py", line 20, in <module>
import pyCore
ImportError: dlopen(/Users/rotton/miniconda3/lib/python3.6/site-packages/daetools-1.9.0-py3.6-macosx-10.7-x86_64.egg/daetools/pyDAE/Darwin_x86_64_py36/pyCore.so, 2): Library not loaded: /usr/local/opt/gcc/lib/gcc/8/libgomp.1.dylib
Referenced from: /Users/rotton/miniconda3/lib/python3.6/site-packages/daetools-1.9.0-py3.6-macosx-10.7-x86_64.egg/daetools/pyDAE/Darwin_x86_64_py36/pyCore.so
Reason: image not found
Why does this occur? How can I fix it?
I am on High Sierra 10.13.6, and Python 3.6.8.
Anonymous
Hi Manuel,
In the new version DAE Tools is compiled using Homebrew gcc 8. It should be a default version so you can just update homebrew. Otherwise install gcc@8.
This needs to be checked: it may or may not require linking gcc using:
brew link gccCan you check if it works?
Dragan
Dear Dragan,
as you suggested, I installed gcc-8 and rerun
setup.py. Now, I get:gcc --versiongives
But
gcc-8 --version:brew link gccsaid:Any other suggestion?
Last edit: Manuel 2019-04-05
Hi Manuel,
You actually do not need the compiler, just the runtime libraries. I checked and the only libraries linked are libSystem and those from gcc-8. So everything should be fine.
I'll try to install some recent macOS to try to reproduce the error.
Dragan
Hi, Can you do one more thing: run python and send me the compiler info. I.e. you can get something like:
Perhaps there is some collision between python and my extension wrappers.
Dragan
Sure. I get the following output:
Dear Dragan,
have you been able to solve the problem in the meantime?
Regards,
Manuel
Hey Manuel,
The status is the following: I reproduced the error on my computer, found where the problem (the most likely) is, but the the exact reason is still not clear to me. Therefore, I did try some things in the latest release, but in general the problem is still there for some versions of MacOS. Please try the new version, see if it works and let me know. The next version will probably have this resolved.
Cheers
Dragan
Dear Dragan,
I was able to relink
gcc-8from Homebrew, so thatgcc --versionnow gives:gcc (Homebrew GCC 8.3.0_2) 8.3.0However, after rerunning
setup.pyand executing an example file, I still get:Segmentation fault: 11I am now on Mojave 10.14.4, Python 3.6.8, and DAE Tool 1.9.0. Should I try Python 3.7.x?
With the "next version", you mean DAE Tools 1.9.1?
Regards,
Manuel
Hi Manuel,
Thanks for trying.
No, if it does not work than that's it unilI fix it (in 1.9.1). It probably does work in python 2.7.
Dragan