openai / go-vncdriver

Fast VNC driver
MIT License
123 stars 60 forks source link

Undefined references everywhere. #16

Closed israelg99 closed 7 years ago

israelg99 commented 7 years ago

I cloned the repo, cd, and ./build.py.

user@user-kubuntu | ~/Work/go-vncdriver | master |: ./build.py

Env info:

export CGO_LDFLAGS='/usr/lib/x86_64-linux-gnu/libjpeg.so -L/home/user/.pyenv/versions/3.5.2/lib -lpython3.5m'
export CGO_CFLAGS='-I/home/user/.pyenv/versions/ai/lib/python3.5/site-packages/numpy/core/include -I/home/user/.pyenv/versions/3.5.2/include/python3.5m'
export GOPATH='/home/user/Work/go-vncdriver/.build'
export GO15VENDOREXPERIMENT='1'

Running build with OpenGL rendering.
Building with OpenGL: GOPATH=/home/user/Work/go-vncdriver/.build go build -buildmode=c-shared -o go_vncdriver.so github.com/openai/go-vncdriver. (Set GO_VNCDRIVER_NOGL to build without OpenGL.)
# github.com/openai/go-vncdriver
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_is_integer':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:812: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_divmod':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:604: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:627: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_rem':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:575: undefined reference to `fmod'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_divmod':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:604: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:627: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_as_integer_ratio':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:1483: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_round':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:1007: undefined reference to `round'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:1010: undefined reference to `round'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_pow':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:703: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:713: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:763: undefined reference to `pow'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:728: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:739: undefined reference to `fmod'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(longobject.o): In function `PyLong_FromString':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/longobject.c:2168: undefined reference to `log'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(pytime.o): In function `_PyTime_ObjectToTime_t':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:121: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:119: undefined reference to `ceil'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(pytime.o): In function `_PyTime_ObjectToDenominator':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:89: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:82: undefined reference to `ceil'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:89: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:82: undefined reference to `ceil'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(pytime.o): In function `_PyTime_FromObject':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:238: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:236: undefined reference to `ceil'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:238: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:236: undefined reference to `ceil'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(dynload_shlib.o): In function `_PyImport_FindSharedFuncptr':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:82: undefined reference to `dlsym'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:95: undefined reference to `dlopen'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:126: undefined reference to `dlsym'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:95: undefined reference to `dlopen'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:101: undefined reference to `dlerror'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(_threadmodule.o): In function `PyInit__thread':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/_threadmodule.c:1376: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(signalmodule.o): In function `timeval_from_double':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/signalmodule.c:140: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/signalmodule.c:141: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/signalmodule.c:140: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/signalmodule.c:141: undefined reference to `fmod'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(posixmodule.o): In function `os_forkpty_impl':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/posixmodule.c:5972: undefined reference to `forkpty'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(posixmodule.o): In function `os_openpty_impl':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/posixmodule.c:5878: undefined reference to `openpty'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(complexobject.o): In function `_Py_c_abs':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:196: undefined reference to `hypot'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(complexobject.o): In function `_Py_c_pow':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:125: undefined reference to `hypot'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:126: undefined reference to `pow'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:127: undefined reference to `atan2'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:129: undefined reference to `sincos'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:130: undefined reference to `exp'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:131: undefined reference to `log'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:125: undefined reference to `hypot'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:126: undefined reference to `pow'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:127: undefined reference to `atan2'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:128: undefined reference to `sincos'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(complexobject.o): In function `_Py_c_abs':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:196: undefined reference to `hypot'
collect2: error: ld returned 1 exit status

Note: could not build with OpenGL rendering (cf https://github.com/openai/go-vncdriver). This is expected on most servers. Going to try building without OpenGL.
Building without OpenGL: GOPATH=/home/user/Work/go-vncdriver/.build go build -tags no_gl -buildmode=c-shared -o go_vncdriver.so github.com/openai/go-vncdriver
# github.com/openai/go-vncdriver
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_is_integer':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:812: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_divmod':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:604: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:627: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_rem':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:575: undefined reference to `fmod'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_divmod':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:604: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:627: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_as_integer_ratio':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:1483: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_round':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:1007: undefined reference to `round'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:1010: undefined reference to `round'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(floatobject.o): In function `float_pow':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:703: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:713: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:763: undefined reference to `pow'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:728: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/floatobject.c:739: undefined reference to `fmod'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(longobject.o): In function `PyLong_FromString':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/longobject.c:2168: undefined reference to `log'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(pytime.o): In function `_PyTime_ObjectToTime_t':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:121: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:119: undefined reference to `ceil'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(pytime.o): In function `_PyTime_ObjectToDenominator':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:89: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:82: undefined reference to `ceil'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:89: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:82: undefined reference to `ceil'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(pytime.o): In function `_PyTime_FromObject':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:238: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:236: undefined reference to `ceil'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:238: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Python/pytime.c:236: undefined reference to `ceil'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(dynload_shlib.o): In function `_PyImport_FindSharedFuncptr':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:82: undefined reference to `dlsym'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:95: undefined reference to `dlopen'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:126: undefined reference to `dlsym'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:95: undefined reference to `dlopen'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Python/dynload_shlib.c:101: undefined reference to `dlerror'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(_threadmodule.o): In function `PyInit__thread':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/_threadmodule.c:1376: undefined reference to `floor'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(signalmodule.o): In function `timeval_from_double':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/signalmodule.c:140: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/signalmodule.c:141: undefined reference to `fmod'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/signalmodule.c:140: undefined reference to `floor'
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/signalmodule.c:141: undefined reference to `fmod'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(posixmodule.o): In function `os_forkpty_impl':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/posixmodule.c:5972: undefined reference to `forkpty'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(posixmodule.o): In function `os_openpty_impl':
/tmp/python-build.20161207101855.17159/Python-3.5.2/./Modules/posixmodule.c:5878: undefined reference to `openpty'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(complexobject.o): In function `_Py_c_abs':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:196: undefined reference to `hypot'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(complexobject.o): In function `_Py_c_pow':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:125: undefined reference to `hypot'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:126: undefined reference to `pow'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:127: undefined reference to `atan2'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:129: undefined reference to `sincos'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:130: undefined reference to `exp'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:131: undefined reference to `log'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:125: undefined reference to `hypot'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:126: undefined reference to `pow'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:127: undefined reference to `atan2'
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:128: undefined reference to `sincos'
/home/user/.pyenv/versions/3.5.2/lib/libpython3.5m.a(complexobject.o): In function `_Py_c_abs':
/tmp/python-build.20161207101855.17159/Python-3.5.2/Objects/complexobject.c:196: undefined reference to `hypot'
collect2: error: ld returned 1 exit status

Build failed. HINT:

- Ensure you have your Python development headers installed. (On Ubuntu,
  this is just 'sudo apt-get install python-dev'.

python-dev and python3-dev are installed. I'm using Kubuntu, and pyenv for managing python envs. Since it's a new issue, perhaps the latest commit a768e8bb5f1663c8b4fbb9d36e340887c550b0e0 introduced it? especially since it has to do with python headers.

Can anyone try to reproduce it?

israelg99 commented 7 years ago

When using system python it works, doesn't work only when called in pyenv.

Any suggestions?

tlbtlbtlb commented 7 years ago

It's important that the Python and Pip used during installation is the same Python you'll use when running.

When you run ./build.py, it finds the python in your path (that you'd get by just typing python). If you're using a different Python (like python3) to run it, use that explicitly by running python3 build.py.

If you're using pyenv to run, use the same pyenv when installing.

dpasiukevich commented 7 years ago

I've got exactly the same issue. Using pyenv virtualenv with python 3.5.2 or 3.6.0 gives the same result. Linux Mint 18. Given up on that and installed everything with system python 2.7.12

tlbtlbtlb commented 7 years ago

I clarified the README for installing on common environments. Can you try those instructions?

dpasiukevich commented 7 years ago

As far as I can tell it uses right python. Python-dev and every required package is installed, so is numpy. Simply curious what could be wrong. Here is the full trace: http://pastebin.com/ZMH6SviY error

daben commented 7 years ago

Hit this issue today. The cause is that pyenv doesn't build CPython with --enable-shared. The solution is to do env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.5.0.

dpasiukevich commented 7 years ago

@daben thanks for the solution.

hepeng1341022 commented 5 years ago

Hit this issue today. The cause is that pyenv doesn't build CPython with --enable-shared. The solution is to do env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.5.0.

very very think you! i solved this problem success, it's been bothering me for days.