go-python icon indicating copy to clipboard operation
go-python copied to clipboard

undefined reference

Open wzhdigimax opened this issue 7 years ago • 4 comments

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 to hypot' /usr/local/lib/libpython2.7.a(complexobject.o): In function complex_remainder': /usr/src/Python-2.7.15/Objects/complexobject.c:616: undefined reference to floor' /usr/local/lib/libpython2.7.a(complexobject.o): In function complex_divmod': /usr/src/Python-2.7.15/Objects/complexobject.c:642: undefined reference to floor' /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 to hypot' /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 to atan2' /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 to exp' /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 to hypot' /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 to atan2' /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 function float_is_integer': /usr/src/Python-2.7.15/Objects/floatobject.c:995: undefined reference to `floor'

wzhdigimax avatar Jan 11 '19 01:01 wzhdigimax

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

wzhdigimax avatar Jan 11 '19 01:01 wzhdigimax

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

sbinet avatar Jan 31 '19 16:01 sbinet

are you resolve it ?

xhaoxiong avatar Jan 29 '20 21:01 xhaoxiong

Not sure I'm going to give a shot

popeye8777 avatar Oct 27 '20 12:10 popeye8777