Open3d: ARM build Jetson Xavier still not working.

Created on 20 Oct 2020  Â·  6Comments  Â·  Source: intel-isl/Open3D

You closed an issue without solving it.
Information needed:
All of the dependencies are installed.

(base) fred@fred-desktop:~/Open3D/build$ g++ --version
g++ (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(base) fred@fred-desktop:~/Open3D/build$ clang++ --version
clang version 7.0.0-3~ubuntu0.18.04.1 (tags/RELEASE_700/final)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

(base) fred@fred-desktop:~/Open3D/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

(base) fred@fred-desktop:~/Open3D/build$ uname -a
Linux fred-desktop 4.9.140-tegra #1 SMP PREEMPT Thu Jun 25 21:22:12 PDT 2020 aarch64 aarch64 aarch64 GNU/Linux

cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_CUDA_MODULE=ON \
-DBUILD_GUI=ON \
-DBUILD_TENSORFLOW_OPS=OFF \
-DBUILD_PYTORCH_OPS=OFF \
-DBUILD_UNIT_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=~/open3d_install \
-DPYTHON_EXECUTABLE=$(which python) \
..
make -j$(nproc)

[ 41%] Building CXX object cpp/open3d/visualization/CMakeFiles/visualization.dir/shader/ImageShader.cpp.o
In file included from /home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:27:0:
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:37:22: error: variable or field ‘gemm_cpu’ declared void
inline void gemm_cpu(CBLAS_LAYOUT layout,
^~~~

arm builinstall issue

Most helpful comment

Hi,

I do not know if it fits exactly your problem with installing on jetson xavier, but I was able to compile open3d from source on Jetson Nano B01 and got it finally work with python3. I was also struggling to install it, but after many tries here is what I did:

General considerations
1. Swap Memory
I increased the swap memory on jetson nano (this might just been a precaution, because my nano freezed a couple of times when I tried compiling different packages from source, maybe because of lack of memory. Here you find how to do, but I guess it is not an issue on xavier.

2. Compiler Jobs
My nano crashed a lot of times, when I tried to compile with all CPU cores. So I never forced more than 3 make jobs on nano ( make -j3 )

3. Python
In my case, I wanted to use open3d with python3 (more exactly python3.6.9) so I set python3 as my standard python with sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
and also pip3 as standard pip with sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
You might say, switiching standard python version to python3 was not nescessary because you could specify the python executable you want to use. Yes, but I tried it and it did not work out, as during the process, there might was a problem when it comes to loading dependencies and so on.

4. update cmake
I got cmake version 3.10 with my jetpack image, so I needed to update by:
sudo apt remove --purge cmake
hash -r
sudo snap install cmake --classic I got version 3.19 then.

Installation process
0. Install dependencies
sudo apt-get update -y
sudo apt-get install -y apt-utils build-essential python3-dev xorg-dev libglu1-mesa-dev libblas-dev liblapack-dev liblapacke-dev libsdl2-dev libc++-7-dev libc++abi-7-dev libxi-dev clang-7 libjpeg-dev gfortran

1. clone repo
git clone --recursive https://github.com/intel-isl/open3d

2. downgrade open3d version
the latest version could not be compiled, I had luck with version v0.11.0.
So I did: git checkout v0.11.0

3. go to repo directory
cd open3d and mkdir build && cd build

4. run cmake
I used following cmake flags. Especially important for me was cuda support.
cmake \ -DCMAKE_CUDA_COMPILER=/usr/local/cuda-10.2/bin/nvcc \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_CUDA_MODULE=ON \ -DBUILD_GUI=ON \ -DBUILD_TENSORFLOW_OPS=OFF \ -DBUILD_PYTORCH_OPS=OFF \ -DBUILD_UNIT_TESTS=ON \ -DCMAKE_INSTALL_PREFIX=~/open3d_install \ -DPYTHON_EXECUTABLE=$(which python) \ ..

5. run make
make -j3 As mentioned, more then make jobs on jetson nano was too much for the little fellow. Takes approx. 2h on jetson nano.

*6. make tests just in case *
make tests -j3
./bin/tests --gtest_filter="-*Reduce*Sum*" works for me

7. Install c++ lib
I did NOT use sudo make install BUT sudo checkinstall (Here you find some information about, it really helps to keep your system clean as it makes a deb package for installation. especially if you try to install a lot of things from source).

8. Install python binding
When I tried to make the pip package I encountered many errors. The solution was to install as many dependencies I could encounter before hand. In my case it was:
python3 -m pip install Cython
python3 -m pip install -U numpy
python3 -m pip install -U matplotlib
Then make install-pip-package -j3

After all that it finally worked for me. Hope it helps.

All 6 comments

what is this reference to CBLAS_LAYOUT ?

it looks like there is a cblas dependency should be installed.

using before sudo apt-get install lsb-core
you get :

(base) fred@fred-desktop:~$ lsb_release -a
LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

but it does not change anything.
I still get this error:
[ 43%] Building CXX object cpp/open3d/geometry/CMakeFiles/geometry.dir/PointCloudSegmentation.cpp.o
In file included from /home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:27:0:
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:37:22: error: variable or field ‘gemm_cpu’ declared void
inline void gemm_cpu(CBLAS_LAYOUT layout,
^~~~
I tried different cmake options but nothing works...
What is this CBLAS_LAYOUT reference? it looks like something else should be installed.

This is a problem related to a specific system configuration. Try starting from a fresh OS. We cannot provide support for a specific configuration.

If you like us to look further into it, please provide a Dockerfile base on arm64v8/ubuntu:18.04 containing all of your build scripts. See https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/ and https://hub.docker.com/r/arm64v8/ubuntu for reference.

Hi,

I do not know if it fits exactly your problem with installing on jetson xavier, but I was able to compile open3d from source on Jetson Nano B01 and got it finally work with python3. I was also struggling to install it, but after many tries here is what I did:

General considerations
1. Swap Memory
I increased the swap memory on jetson nano (this might just been a precaution, because my nano freezed a couple of times when I tried compiling different packages from source, maybe because of lack of memory. Here you find how to do, but I guess it is not an issue on xavier.

2. Compiler Jobs
My nano crashed a lot of times, when I tried to compile with all CPU cores. So I never forced more than 3 make jobs on nano ( make -j3 )

3. Python
In my case, I wanted to use open3d with python3 (more exactly python3.6.9) so I set python3 as my standard python with sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
and also pip3 as standard pip with sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
You might say, switiching standard python version to python3 was not nescessary because you could specify the python executable you want to use. Yes, but I tried it and it did not work out, as during the process, there might was a problem when it comes to loading dependencies and so on.

4. update cmake
I got cmake version 3.10 with my jetpack image, so I needed to update by:
sudo apt remove --purge cmake
hash -r
sudo snap install cmake --classic I got version 3.19 then.

Installation process
0. Install dependencies
sudo apt-get update -y
sudo apt-get install -y apt-utils build-essential python3-dev xorg-dev libglu1-mesa-dev libblas-dev liblapack-dev liblapacke-dev libsdl2-dev libc++-7-dev libc++abi-7-dev libxi-dev clang-7 libjpeg-dev gfortran

1. clone repo
git clone --recursive https://github.com/intel-isl/open3d

2. downgrade open3d version
the latest version could not be compiled, I had luck with version v0.11.0.
So I did: git checkout v0.11.0

3. go to repo directory
cd open3d and mkdir build && cd build

4. run cmake
I used following cmake flags. Especially important for me was cuda support.
cmake \ -DCMAKE_CUDA_COMPILER=/usr/local/cuda-10.2/bin/nvcc \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_CUDA_MODULE=ON \ -DBUILD_GUI=ON \ -DBUILD_TENSORFLOW_OPS=OFF \ -DBUILD_PYTORCH_OPS=OFF \ -DBUILD_UNIT_TESTS=ON \ -DCMAKE_INSTALL_PREFIX=~/open3d_install \ -DPYTHON_EXECUTABLE=$(which python) \ ..

5. run make
make -j3 As mentioned, more then make jobs on jetson nano was too much for the little fellow. Takes approx. 2h on jetson nano.

*6. make tests just in case *
make tests -j3
./bin/tests --gtest_filter="-*Reduce*Sum*" works for me

7. Install c++ lib
I did NOT use sudo make install BUT sudo checkinstall (Here you find some information about, it really helps to keep your system clean as it makes a deb package for installation. especially if you try to install a lot of things from source).

8. Install python binding
When I tried to make the pip package I encountered many errors. The solution was to install as many dependencies I could encounter before hand. In my case it was:
python3 -m pip install Cython
python3 -m pip install -U numpy
python3 -m pip install -U matplotlib
Then make install-pip-package -j3

After all that it finally worked for me. Hope it helps.

I ran into the same issue, and @thvis solution worked for me!

Was this page helpful?
0 / 5 - 0 ratings