Klayout 0.25.9 built successfully but unable to open

edited July 2019 in General

Hi,

I have just built klayout 0.25.9 on my mac (10.14.4). It was successful (no errors), but I couldn't open it. It says:

"klayout cannot be opened because of a problem."

And

Dyld Error Message:
  Library not loaded: libklayout_tl.0.dylib
  Referenced from: /Users/USER/*/klayout.app/Contents/MacOS/klayout
  Reason: image not found

Details:

  1. I followed the instruction on website, where tar hzxvf klayout-*.tar.gz threw an error because option h and x conflicted so I removed h for extraction.

  2. My environment:

Using qmake: qmake
    Using Qt 5 API

Using Ruby interpreter: ruby
    Ruby library found: /Users/xyan/anaconda3/lib/libruby.2.4.5.dylib
    Ruby headers found: /Users/xyan/anaconda3/include/ruby-2.4.0 and /Users/xyan/anaconda3/include/ruby-2.4.0/x86_64-darwin17
    Ruby installation is in:
    - /Users/xyan/anaconda3/lib/libruby.2.4.5.dylib (lib)
    - /Users/xyan/anaconda3/include/ruby-2.4.0 (headers)
    - /Users/xyan/anaconda3/include/ruby-2.4.0/x86_64-darwin17 (arch headers)
    Ruby version code is 20405

Using Python interpreter: /Users/xyan/anaconda3/bin/python
    Python library found: /Users/xyan/anaconda3/lib/libpython3.7m.dylib
    Python headers found: /Users/xyan/anaconda3/include/python3.7m
    Python installation is in:
    - /Users/xyan/anaconda3/lib/libpython3.7m.dylib (lib)
    - /Users/xyan/anaconda3/include/python3.7m (includes)

Features:
    Qt bindings enabled
    Installation target: /Users/xyan/klayout-0.25.9/bin-release
    Build directory: /Users/xyan/klayout-0.25.9/build-release
    Building plugins: 

Running qmake ..
QMake version 3.1
Using Qt version 5.9.7 in /Users/xyan/anaconda3/lib

and Clang:

Apple LLVM version 10.0.1 (clang-1001.0.43.3)
Target: x86_64-apple-darwin18.5.0
Thread model: posix

Thanks in advance!

xyan

Comments

  • I also tried running make after building, but

    fatal: not a git repository (or any of the parent directories): .git
    
  • Hi,

    Building KLayout (0.25 and later) on Mac OS is a bit complicated task.
    You need to resolve dependencies among many libraries and binaries.

    I have mimicked what you wanted to do on my Yosemite (still!) with anaconda3.
    Please refer to https://github.com/Kazzz-S/klayout/issues/34 for details.

    Hope this will help you in your Mojave environment, too.

    Kazzz-S (Kazunari)

  • Hello Kazzz,

    Thank you so much for the very detailed instructions. I have built successfully and I was able to open klayout.

    There was a small problem though. When I checking the python console in Macros Developments, I ran into an error when trying to import numpy. The error message is as follows:

    IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
    
    Importing the multiarray numpy extension module failed.  Most
    likely you are trying to import a failed build of numpy.
    Here is how to proceed:
    

    ...

    Original error was: dlopen(/Users/xyan/anaconda3/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libopenblas.dylib
      Referenced from: /Users/xyan/anaconda3/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so
      Reason: image not found
    
      /Users/xyan/anaconda3/lib/python3.7/site-packages/numpy/core/__init__.py:71
      /Users/xyan/anaconda3/lib/python3.7/site-packages/numpy/__init__.py:142
      (eval):1
    

    Then removed my numpy and reinstalled via conda install and it solved the problem. The reason I mention this is because that this error message looks very similar to what I had before, so now I suspect that my previous problem was also due to this numpy issue (?).

    Anyway, thanks so much for your help. I can use klayout for my applications now.

    Best,
    xyan

Sign In or Register to comment.