Hi there,
I have been using python branch of jetson inference:
$ git clone -b python https://github.com/dusty-nv/jetson-inference jetson-inference-python
Today, I decided to use the main branch as python branch has been merged into main branch.
I followed the instructions
$ git clone https://github.com/dusty-nv/jetson-inference
$ cd jetson-inference-python
$ git submodule update --init
$ mkdir build
$ cd build
$ cmake ../
$ make
However, I got a linking error:
...
[%1] Linking CXX shared library ../aarch64/lib/libjetson-utils.so
/usr/bin/ld: cannot find -lGL
collect2: error: ls returned 1 exit status
...
make:*** [all] Error 2
I do not have Jetpack installed as it causes an issue with unallocated space on SD card. This is noted as known issue in latest release note.
Without Jetpack I could successfully build this branch. but I do not know why I am not able to build now?
I also tried to build the python branch again in separate clone and I faced the error
/usr/bin/ld: cannot find -lGL
when I was building pycuda, I had some issues with ld and managed to resolve it using
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda-10.0/targets/aarch64-linux/lib
Is there any path which I need to set to resolve this?
Please advise.
Thanks
Amin
Hi Amin, since you were able to built the python branch before, it would seem that your libGL was changed or modified (perhaps from another package that was installed) since you last built jetson-inference. I confirmed that jetson-inference builds from a fresh SD card image as expected.
Can you check the size of your libGL.so library to see if it matches below?
$ ls -ll /usr/lib/aarch64-linux-gnu/libGL.so*
lrwxrwxrwx 1 root root 14 Aug 15 2018 /usr/lib/aarch64-linux-gnu/libGL.so -> libGL.so.1.0.0
lrwxrwxrwx 1 root root 14 Aug 15 2018 /usr/lib/aarch64-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root 972968 Aug 15 2018 /usr/lib/aarch64-linux-gnu/libGL.so.1.0.0
libGL is provided by libglvnd-dev and libglvnd0 packages. You can verify their info matches below with “dpkg -s” query:
$ dpkg -s libglvnd-dev
Package: libglvnd-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 25
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: arm64
Multi-Arch: same
Source: libglvnd
Version: 1.0.0-2ubuntu2.2
Replaces: libegl1-mesa-dev (<< 18.0.5-0ubuntu0~18.04), libgl1-mesa-dev (<< 18.0.5-0ubuntu0~18.04), libgles1-mesa-dev (<< 17.0.0~rc3-1), libgles2-mesa-dev (<< 18.0.5-0ubuntu0~18.04)
Depends: libglvnd0 (= 1.0.0-2ubuntu2.2), libglvnd-core-dev (= 1.0.0-2ubuntu2.2), libegl1 (= 1.0.0-2ubuntu2.2), libgles1 (= 1.0.0-2ubuntu2.2), libgles2 (= 1.0.0-2ubuntu2.2), libgl1 (= 1.0.0-2ubuntu2.2), libglx0 (= 1.0.0-2ubuntu2.2), libopengl0 (= 1.0.0-2ubuntu2.2)
Breaks: libegl1-mesa-dev (<< 18.0.5-0ubuntu0~18.04), libgl1-mesa-dev (<< 18.0.5-0ubuntu0~18.04), libgles1-mesa-dev (<< 17.0.0~rc3-1), libgles2-mesa-dev (<< 18.0.5-0ubuntu0~18.04)
Description: Vendor neutral GL dispatch library -- development files
This is an implementation of the vendor-neutral dispatch layer for
arbitrating OpenGL API calls between multiple vendors on a per-screen basis.
.
This package contains the development files for libglvnd.
Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Homepage: https://github.com/NVIDIA/libglvnd
$ dpkg -s libglvnd0
Package: libglvnd0
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 1032
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: arm64
Multi-Arch: same
Source: libglvnd
Version: 1.0.0-2ubuntu2.2
Replaces: libgldispatch0-nvidia
Depends: libc6 (>= 2.17)
Breaks: libgldispatch0-nvidia
Description: Vendor neutral GL dispatch library
This is an implementation of the vendor-neutral dispatch layer for
arbitrating OpenGL API calls between multiple vendors on a per-screen basis.
.
This package contains the GL dispatch library.
Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Homepage: https://github.com/NVIDIA/libglvnd
You can try re-installing libglvnd from GitHub here: https://github.com/NVIDIA/libglvnd
If you continue to have issues after that, you might want to purge those packages or consider flashing a fresh SD card image.
Hi Dustin,
Thanks for the reply and my appology for the delay in response.
I run those checks and find this discrepency in the first line:
~$ ls -ll /usr/lib/aarch64-linux-gnu/libGL.so*
lrwxrwxrwx 1 root root 41 Jun 27 07:26 /usr/lib/aarch64-linux-gnu/libGL.so -> /usr/lib/aarch64-linux-gnu/tegra/libGL.so
lrwxrwxrwx 1 root root 14 Aug 15 2018 /usr/lib/aarch64-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root 972968 Aug 15 2018 /usr/lib/aarch64-linux-gnu/libGL.so.1.0.0
The rest if checks for
dpkg -s libglvnd-dev
and
$ dpkg -s libglvnd0
provided the same output.
So I think the first line shows the cause of error:
lrwxrwxrwx 1 root root 41 Jun 27 07:26 /usr/lib/aarch64-linux-gnu/libGL.so -> /usr/lib/aarch64-linux-gnu/tegra/libGL.so
I tired to reinstall the libglvnd by cloning the repo:
$git clone https://github.com/NVIDIA/libglvnd.git
and then install dependecies:
sudo apt-get install libxext-dev libx11-dev x11proto-gl-dev
and building the code and installation:
$sudo ./autogen.sh
$./configure
$ make
$ sudo make install
the first line of ls -ll remained as before:
/usr/lib/aarch64-linux-gnu/libGL.so -> /usr/lib/aarch64-linux-gnu/tegra/libGL.so
However, I managed to build the jetson-inference successfully which was my original problem.
Now the only question is that the only line is a problem and should be fixed or not?
/usr/lib/aarch64-linux-gnu/libGL.so -> /usr/lib/aarch64-linux-gnu/tegra/libGL.so
thanks
Amin
Hi Amin, if it is linking and running fine, then you should be all set.