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

Compiled it under gentoo but a I have a linkage error #3

Closed
gbin opened this issue Apr 8, 2013 · 3 comments
Closed

Compiled it under gentoo but a I have a linkage error #3

gbin opened this issue Apr 8, 2013 · 3 comments
Assignees

Comments

@gbin
Copy link

gbin commented Apr 8, 2013

I made an ebuild here : https://github.com/gbin/gbin-overlay/tree/master/dev-python/gopy

It seems to compile correctly but when I try to run the example from python I have :

gbin@sal ~/projects/testpygo » gopy test.go                                
gbin@sal ~/projects/testpygo » ipython                                     
Python 2.7.3 (default, Mar 20 2013, 11:58:44) 
Type "copyright", "credits" or "license" for more information.

IPython 0.13.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import simple
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-6de4b98437d9> in <module>()
----> 1 import simple

ImportError: /usr/lib/gccgo/libgopy.ext.so: undefined symbol: libgo_runtime.runtime.LockOSThread

If I look at the .so, indeed something is fishy, did I miss something at the link step ?

gbin@sal ~/projects/testpygo » ldd -r /usr/lib/gccgo/libgopy.ext.so
        linux-vdso.so.1 (0x00007fff9c3fd000)
        libgo.so.0 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/libgo.so.0 (0x00007ffe65fa1000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ffe65bf6000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ffe68ed0000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffe659d9000)
        libm.so.6 => /lib64/libm.so.6 (0x00007ffe656e3000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/libgcc_s.so.1 (0x00007ffe654cd000)
undefined symbol: cgocallback   (/usr/lib/gccgo/libgopy.ext.so)
undefined symbol: go.py..import (/usr/lib/gccgo/libgopy.ext.so)
undefined symbol: libgo_runtime.runtime.LockOSThread    (/usr/lib/gccgo/libgopy.ext.so)
undefined symbol: simple_cgocallback    (/usr/lib/gccgo/libgopy.ext.so)
undefined symbol: simple_cgocall        (/usr/lib/gccgo/libgopy.ext.so)
@qur
Copy link
Owner

qur commented Jul 6, 2013

It looks like libgo_runtime.runtime.LockOSThread has been removed or renamed in gcc 4.7.2?

@ghost ghost assigned qur Jul 7, 2013
@qur
Copy link
Owner

qur commented Jul 7, 2013

Definitely had to fix a bunch of symbol names to get things working with 4.7.3, so this should be fixed now.

@gbin
Copy link
Author

gbin commented Jul 7, 2013

I confirm it fixed it. The ebuild to be able to build it from the correct branch is here : https://github.com/gbin/gbin-overlay/tree/master/dev-python/gopy

Thanks a lot !

@gbin gbin closed this as completed Jul 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants