Commit 6d94fccf authored by Kirill Smelkov's avatar Kirill Smelkov

libpyxruntime: It should link to libgolang

It was all working on Debian 10, but running tests on Ubuntu 16.04
turned out to fail:

    $ python -m pytest
    ================================== test session starts ===================================
    platform linux2 -- Python 2.7.12, pytest-4.6.6, py-1.8.0, pluggy-0.13.0
    rootdir: /home/kirr/src/pygolang
    collected 0 items / 10 errors

    ========================================= ERRORS =========================================
    ________________________ ERROR collecting golang/_gopath_test.py _________________________
    ImportError while importing test module '/home/kirr/src/pygolang/golang/_gopath_test.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    golang/__init__.py:42: in <module>
        from golang._golang import _pysys_exc_clear as _sys_exc_clear
    golang/_golang.pyx:35: in init golang._golang
        _init_libpyxruntime()
    golang/_golang.pyx:532: in golang._golang._init_libpyxruntime
        import golang.pyx.runtime
    E   ImportError: /home/kirr/src/pygolang/golang/pyx/../runtime/liblibpyxruntime.so.0.1: undefined symbol: _ZN6golang4sync9WaitGroup3addEi

    $ c++filt _ZN6golang4sync9WaitGroup3addEi
    golang::sync::WaitGroup::add(int)

So since libpyxruntime is using sync.WaitGroup (and sync.Mutex etc) it should
be linking to libgolang where those symbols are provided. Fix it.

Fixes: 4fc6e49c (time: Factor-out PyFunc into shared library libpyxruntime.so)
parent 1477dd02
......@@ -216,7 +216,8 @@ setup(
include_dirs = ['.', sysconfig.get_python_inc()],
define_macros = [('BUILDING_LIBPYXRUNTIME', None)],
extra_compile_args = ['-std=c++11'],
soversion = '0.1')],
soversion = '0.1',
dsos = ['golang.runtime.libgolang'])],
ext_modules = [
Ext('golang._golang',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment