sbinet / go-python

naive go bindings to the CPython2 C-API
Other
1.52k stars 138 forks source link

undefined reference #77

Open wzhdigimax opened 5 years ago

wzhdigimax commented 5 years ago

Hi,

When i tried make, i got many python errors. I confirmed the python is correctly installed....any idea on this? Thanks a lot!

gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -o $WORK/b001/cgo.o $WORK/b001/_cgo_main.o $WORK/b001/_x001.o $WORK/b001/_x002.o $WORK/b001/_x003.o $WORK/b001/_x004.o $WORK/b001/_x005.o $WORK/b001/_x006.o $WORK/b001/_x007.o $WORK/b001/_x008.o $WORK/b001/_x009.o $WORK/b001/_x010.o $WORK/b001/_x011.o $WORK/b001/_x012.o $WORK/b001/_x013.o $WORK/b001/_x014.o $WORK/b001/_x015.o $WORK/b001/_x016.o $WORK/b001/_x017.o $WORK/b001/_x018.o $WORK/b001/_x019.o $WORK/b001/_x020.o $WORK/b001/_x021.o -g -O2 -L/usr/local/lib -lpython2.7

go-python-master

/usr/local/lib/libpython2.7.a(complexobject.o): In function _Py_c_abs': /usr/src/Python-2.7.15/Objects/complexobject.c:214: undefined reference tohypot' /usr/local/lib/libpython2.7.a(complexobject.o): In function complex_remainder': /usr/src/Python-2.7.15/Objects/complexobject.c:616: undefined reference tofloor' /usr/local/lib/libpython2.7.a(complexobject.o): In function complex_divmod': /usr/src/Python-2.7.15/Objects/complexobject.c:642: undefined reference tofloor' /usr/local/lib/libpython2.7.a(complexobject.o): In function _Py_c_pow': /usr/src/Python-2.7.15/Objects/complexobject.c:143: undefined reference tohypot' /usr/src/Python-2.7.15/Objects/complexobject.c:144: undefined reference to pow' /usr/src/Python-2.7.15/Objects/complexobject.c:145: undefined reference toatan2' /usr/src/Python-2.7.15/Objects/complexobject.c:147: undefined reference to sincos' /usr/src/Python-2.7.15/Objects/complexobject.c:148: undefined reference toexp' /usr/src/Python-2.7.15/Objects/complexobject.c:149: undefined reference to log' /usr/src/Python-2.7.15/Objects/complexobject.c:143: undefined reference tohypot' /usr/src/Python-2.7.15/Objects/complexobject.c:144: undefined reference to pow' /usr/src/Python-2.7.15/Objects/complexobject.c:145: undefined reference toatan2' /usr/src/Python-2.7.15/Objects/complexobject.c:146: undefined reference to sincos' /usr/local/lib/libpython2.7.a(complexobject.o): In function_Py_c_abs': /usr/src/Python-2.7.15/Objects/complexobject.c:214: undefined reference to hypot' /usr/local/lib/libpython2.7.a(floatobject.o): In functionfloat_is_integer': /usr/src/Python-2.7.15/Objects/floatobject.c:995: undefined reference to `floor'

wzhdigimax commented 5 years ago

BTW, i mean the make of go-python-master for installation

sbinet commented 5 years ago

it seems the compilation is missing a link to libm. are you sure pkg-config knows about Python?

xhaoxiong commented 4 years ago

are you resolve it ?

popeye8777 commented 3 years ago

Not sure I'm going to give a shot