Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken dynamic library compile on osx #1

Merged
merged 1 commit into from
Apr 14, 2017

Commits on Apr 13, 2017

  1. Fix broken dynamic library compile on osx

    It was remarkably hard tracking down the problem.
    I found the solution here:
    openai/universe#167
    
    Without this fix, I was getting an error that looked like this:
    ```
    > python python_to_go.py
    Traceback (most recent call last):
      File "python_to_go.py", line 12, in <module>
        lib = cdll.LoadLibrary('go_adder/libadder.' + lib_extension())
      File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 440, in LoadLibrary
        return self._dlltype(name)
      File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 362, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: dlopen(go_adder/libadder.dylib, 6): no suitable image found.  Did find:
    	go_adder/libadder.dylib: malformed mach-o image: segment __DWARF vm overlaps segment __LINKEDIT
    	/Users/steventroxler/kode/scratch/go-interlang/dyn_langs_to_go/go_adder/libadder.dylib: malformed mach-o image: segment __DWARF vm overlaps segment __LINKEDIT
    ```
    stroxler committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    d5792be View commit details
    Browse the repository at this point in the history