Open ZhiyeTang opened 1 year ago
It seems that my C compiler cannot detect the file GL/glu.h
. I've tried the fix offered in https://github.com/isl-org/Open3D/issues/4741 , installing package libglu
but it doesn't work for me.
Had the same error trying to compile from source today. Solution for me was: "cd" to the root of open3d and do a "git status" Git showed me some missing files, which could easily be restored with "git restore <path/filename>". That happened only once. After restoring all missing files the sources compiled correctly. That happened on Ubuntu 20.04 desktop (laptop)
Thanks for your suggestion @nanotuxi . I downloaded the codes directly from the GitHub released page, which is not a Git
repository. Thus, I tried to clone the master
branch and rebuild it following the instruction. Then the same error occurs. Then I tried git status
, but it says my branch is up to date which probably means there's no file missing. But the error log shows that the 3rdparty package glew
inside directory Open3D/3rdparty/
missing the head file GL/glu.h
, which is weird. I think that the glu.h
will be generated if all the compilations are processed correctly, but I don't know how to trouble shoot. Anyway, Thanks a lot.
Furthermore, can you please have a check at your Open3D/3rdparty/glew/include/GL
directory, see whether there's a glu.h
?
I search for the head file glu.h
, and an issue from glew
shows that the head file is no longer required when building and running glew
: https://github.com/nigels-com/glew/issues/192 . Therefore, I comment the including lines but another missing file error occured:
/home/zhiyetang/data/Open3D/3rdparty/glew/src/glew.c:41:12: fatal error: GL/osmesa.h: No such file or directory
41 | # include <GL/osmesa.h>
| ^~~~~~~~~~~~~
compilation terminated.
Any progress here? I am facing the same issue.
I've had the same issue. I am on a headless server running Ubuntu 20 without sudo.
So installing libglu1-mesa-dev
from apt was not an option.
Instead compiling libglu
from source was the solution.
You can download the source code here: https://launchpad.net/ubuntu/+source/libglu
Here is an example on how to proceed (Ubuntu 20):
cd /dir/where/you/want/to/install/glu
wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/libglu/9.0.1-1build1/libglu_9.0.1.orig.tar.gz
tar xf libglu_9.0.1.orig.tar.gz
cd glu-9.0.1
./configure --prefix="$(pwd)/install/"
make
make install
Then don't forget to link the header files:
export CPATH=/path/to/your/libglu/install/include/:$CPATH
Then run make again and this should work.
Note that I had a further error related to LLVM afterwards:
/usr/bin/ld: /lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `tgetnum@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libLLVM-12.so.1: undefined reference to `tigetnum@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libLLVM-12.so.1: undefined reference to `del_curterm@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `tputs@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libLLVM-12.so.1: undefined reference to `set_curterm@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libLLVM-12.so.1: undefined reference to `setupterm@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `tgoto@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `tgetent@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `tgetstr@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `tgetflag@NCURSES6_TINFO_5.0.19991023'
To solve this I had to run cmake with -DCMAKE_CXX_FLAGS="-frtti -lz -ltinfo"
Checklist
master
branch).Steps to reproduce the issue
I've downloaded the code from https://github.com/isl-org/Open3D/releases/tag/v0.16.0 .
Since I'm using a headless Ubuntu 18.04 server, I have to build the binary file on my own following the instructions here: http://www.open3d.org/docs/release/tutorial/visualization/headless_rendering.html .
The
makefile
seems generated well and no errors reported, but something goes wrong in the following step:make -j$(nproc)
:Makefile:155: recipe for target 'all' failed
make: *** [all] Error 2
I was using
CMake
from myAnaconda
environment so firstly I supposed that it's a package-missing error, so I installed the corresponding packages inAnaconda
:Mesalib
,Glew
andGlfw
and retried commandmake -j$(nproc)
. But the error still occurs. After several retries, I found that the error might because of the failed from buildingassimp
(The total error message is shown below). And it seems that no similar former issues can help.Error message
Open3D, Python and System information
Additional information
No response