davidstutz/mesh-fusion

setup error: cannot find -lfusiongpu/ cannot find -lGL

w4LJY opened this issue · 2 comments

w4LJY commented

I have a "cannot find lib" error when installing pyfusion and pyrender setup.
It seems that some lib are missing, is it possible that it is an environment variable setting problem ?

when I run python setup.py build_ext --inplace in libfusiongpu:

mesh-fusion/libfusiongpu$ python setup.py build_ext --inplace
Added OpenMP
running build_ext
building 'cyfusion' extension
gcc -pthread -B /home/sandman/anaconda3/envs/rayonet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include -I/home/sandman/anaconda3/envs/rayonet/include/python3.6m -c cyfusion.cpp -o build/temp.linux-x86_64-3.6/cyfusion.o -ffast-math -msse -msse2 -msse3 -msse4.2 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0,
                 from /home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from cyfusion.cpp:743:
/home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
g++ -pthread -shared -B /home/sandman/anaconda3/envs/rayonet/compiler_compat -L/home/sandman/anaconda3/envs/rayonet/lib -Wl,-rpath=/home/sandman/anaconda3/envs/rayonet/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/cyfusion.o -L./build/ -lm -lfusion_gpu -o /media/sandman/Exdisk/mydata/reconstruction_3d/ray_onet/ray-onet/external/mesh-fusion/libfusiongpu/cyfusion.cpython-36m-x86_64-linux-gnu.so -fopenmp
/home/sandman/anaconda3/envs/rayonet/compiler_compat/ld: cannot find -lfusion_gpu
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

when I run python setup.py build_ext --inplace in librender:

mesh-fusion/librender$ python setup.py build_ext --inplace
running build_ext
building 'pyrender' extension
gcc -pthread -B /home/sandman/anaconda3/envs/rayonet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include -I/home/sandman/anaconda3/envs/rayonet/include/python3.6m -c pyrender.cpp -o build/temp.linux-x86_64-3.6/pyrender.o -ffast-math -msse -msse2 -msse3 -msse4.2 -O4 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0,
                 from /home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from pyrender.cpp:742:
/home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
gcc -pthread -B /home/sandman/anaconda3/envs/rayonet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/numpy/core/include -I/home/sandman/anaconda3/envs/rayonet/include/python3.6m -c offscreen.cpp -o build/temp.linux-x86_64-3.6/offscreen.o -ffast-math -msse -msse2 -msse3 -msse4.2 -O4 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
offscreen.cpp: In constructor ‘OffscreenGL::OffscreenGL(int, int)’:
offscreen.cpp:11:18: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     char *argv = "test";
                  ^~~~~~
offscreen.cpp: In function ‘GLuint createDisplayList(double*, int, double*, int, double*, unsigned int, double, bool)’:
offscreen.cpp:69:33: warning: variable ‘channelCapacity2’ set but not used [-Wunused-but-set-variable]
   unsigned int channelCapacity, channelCapacity2;
                                 ^~~~~~~~~~~~~~~~
offscreen.cpp: In function ‘void drawPatchToDepthBuffer(GLuint, unsigned char*, float*, bool*, unsigned int, unsigned int, double*, bool)’:
offscreen.cpp:160:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int j = 0; j < imgWidth; j++) {
                   ~~^~~~~~~~~~
offscreen.cpp:161:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < imgHeight; i++, matlabImgIndex++) {
                     ~~^~~~~~~~~~~
g++ -pthread -shared -B /home/sandman/anaconda3/envs/rayonet/compiler_compat -L/home/sandman/anaconda3/envs/rayonet/lib -Wl,-rpath=/home/sandman/anaconda3/envs/rayonet/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/pyrender.o build/temp.linux-x86_64-3.6/offscreen.o -o /media/sandman/Exdisk/mydata/reconstruction_3d/ray_onet/ray-onet/external/mesh-fusion/librender/pyrender.cpython-36m-x86_64-linux-gnu.so -lGLEW -lglut -lGL -lGLU -fopenmp
/home/sandman/anaconda3/envs/rayonet/compiler_compat/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

I have:

$ pip --version
pip 21.3.1 from /home/sandman/anaconda3/envs/rayonet/lib/python3.6/site-packages/pip (python 3.6)
$ python
Python 3.6.7 | packaged by conda-forge | (default, Mar  4 2020, 16:55:12) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cython
>>> cython.__version__
'0.29.2'
>>> quit()
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Thu_Jun_11_22:26:38_PDT_2020
Cuda compilation tools, release 11.0, V11.0.194
Build cuda_11.0_bu.TC445_37.28540450_0
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.5 LTS
Release:	18.04
Codename:	bionic

Can someone help me with this problem.
Thanks!

Hi, I also got this error. Have you fixed this error? If is, can you share your solution? Thanks in advance!

Sorry, I am afraid I can't help with this, but will leave it open for others to help and comment.