Menu

#26 "Image not found" on macOS High Sierra

v1.0_(example)
open
nobody
macOS (1)
1
2019-05-09
2019-04-04
Manuel
No

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.

Related

Bugs: #26

Discussion

  • ciroki

    ciroki - 2019-04-04

    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 gcc
    Can you check if it works?
    Dragan

     
  • Manuel

    Manuel - 2019-04-05

    Dear Dragan,
    as you suggested, I installed gcc-8 and rerun setup.py. Now, I get:

    Segmentation fault: 11
    

    gcc --version
    gives

    Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 10.0.0 (clang-1000.10.44.4)
    Target: x86_64-apple-darwin17.7.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin
    

    But gcc-8 --version:

    gcc-8 (Homebrew GCC 8.3.0) 8.3.0
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    brew link gcc said:

    Warning: Already linked: /usr/local/Cellar/gcc/8.3.0
    To relink: brew unlink gcc && brew link gcc
    

    Any other suggestion?

     

    Last edit: Manuel 2019-04-05
  • ciroki

    ciroki - 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

     
  • ciroki

    ciroki - 2019-04-05

    Hi, Can you do one more thing: run python and send me the compiler info. I.e. you can get something like:

    $python
    Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32) 
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

    Perhaps there is some collision between python and my extension wrappers.
    Dragan

     
    • Manuel

      Manuel - 2019-04-06

      Sure. I get the following output:

      Python 3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46) 
      [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      
       
    • Manuel

      Manuel - 2019-05-06

      Dear Dragan,
      have you been able to solve the problem in the meantime?
      Regards,
      Manuel

       
      • ciroki

        ciroki - 2019-05-06

        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

         
        • Manuel

          Manuel - 2019-05-09

          Dear Dragan,
          I was able to relink gcc-8 from Homebrew, so that gcc --version now gives:
          gcc (Homebrew GCC 8.3.0_2) 8.3.0
          However, after rerunning setup.py and executing an example file, I still get:
          Segmentation fault: 11
          I 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

           
  • ciroki

    ciroki - 2019-05-09

    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

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB