Closed Fred3D-tech closed 2 years ago
Looks like a dependency or system configuration issue. We have community users that were able to get it working on Jetson (including CUDA): https://github.com/intel-isl/Open3D/issues/2134#issuecomment-707583849
Here are some suggestions:
Did you install the dependencies?
sudo apt-get update -y
sudo apt-get install -y apt-utils build-essential git cmake
sudo apt-get install -y python3 python3-dev python3-pip
sudo apt-get install -y xorg-dev libglu1-mesa-dev
sudo apt-get install -y libblas-dev liblapack-dev liblapacke-dev
sudo apt-get install -y libsdl2-dev libc++-7-dev libc++abi-7-dev libxi-dev
sudo apt-get install -y clang-7
What your output of the following commands?
g++ --version
clang++ --version
lsb_release -a
uname -a
Which compiler is picked up by cmake? Please provide the following message from CMake config output
-- Check for working C compiler: xxxxxx - skipped
-- Check for working CXX compiler: xxxxx - skipped
no... your problem is the reference to CBLAS_LAYOUT layout.. with all the dependencies installed it does not work. If you use CBLAS_LAYOUT layout tell us how to install the CBLAS_LAYOUT layout you need. You got any references to that.
On Wed, Oct 14, 2020 at 6:27 PM Yixing Lao notifications@github.com wrote:
Looks like a dependency or system configuration issue. We have community users that were able to get it working on Jetson (including CUDA): #2134 (comment) https://github.com/intel-isl/Open3D/issues/2134#issuecomment-707583849
Did you install the dependencies?
sudo apt-get update -y sudo apt-get install -y apt-utils build-essential git cmake sudo apt-get install -y python3 python3-dev python3-pip sudo apt-get install -y xorg-dev libglu1-mesa-dev sudo apt-get install -y libblas-dev liblapack-dev liblapacke-dev sudo apt-get install -y libsdl2-dev libc++-7-dev libc++abi-7-dev libxi-dev sudo apt-get install -y clang-7
What your output of the following commands? Is your compiler too new or too old?
g++ --version clang++ --version lsb_release -a uname -a
Which compiler is picked up by cmake? Please provide the following message from CMake config output
-- Check for working C compiler: xxxxxx - skipped -- Check for working CXX compiler: xxxxx - skipped
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/intel-isl/Open3D/issues/2468#issuecomment-708515419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDS746SCPS2MWK43W7LETLSKXGQVANCNFSM4SPLDBIQ .
you can't close an issue when it is still not working.. and your arm build is still not working. I just tested it again tonight and it is still not working.
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,
^~~~
confirming same result on build from today, following instructions exactly
I fixed this (crudely) by adding the right header in
Open3D/cpp/open3d/core/linalg/BlasWrapper.h
[ 59%] Linking CXX executable ../../bin/ManuallyCropGeometry
../../lib/Release/libOpen3D.so: undefined reference to std::bad_alloc::bad_alloc()' ../../lib/Release/libOpen3D.so: undefined reference to
cblas_dgemm(CBLAS_ORDER, CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, double, double const, int, double const, int, double, double*, int)'
[ 59%] Linking CXX executable ../../bin/ManuallyCropGeometry ../../lib/Release/libOpen3D.so: undefined reference to
std::bad_alloc::bad_alloc()' ../../lib/Release/libOpen3D.so: undefined reference to
cblas_dgemm(CBLAS_ORDER, CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, double, double const, int, double const, int, double, double*, int)'
I had the same issue on a jetson nano after coming further with the header-patch.
With one of these steps (don't know which) did come along with this:
I followed the tutorial https://nextremer-nbo.blogspot.com/2021/02/jetson-jetpack-45-open3d-open3d-ml.html
installing pytorch, tensorflow and open3d (c++) build successful including tensorflow and pytorch on with a jetpack 4.5 as basis on the nano.
So, the c++ part is working now.
I am hanging right now at building the python binding, which gives me a "libgomp.so.1: cannot allocate memory in static TLS block" But this is another ticket where LD_PRELOAD didn't help me. ^^
Adding #include "/usr/include/aarch64-linux-gnu/cblas-netlib.h" in cpp/open3d/core/kernel/Kernel.cpp resolved the error: ../../lib/Release/libOpen3D.so: undefined reference to std::bad_alloc::bad_alloc()' ../../lib/Release/libOpen3D.so: undefined reference to cblas_dgemm(CBLAS_ORDER, CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, double, double const, int, double const, int, double, double*, int)'
The two proposed cblas-netlib.h
include hack fixes solved my compilation issue with the current master
branch, but @yxlao this issue is still ongoing and shouldn't be closed. The cause is not just a misconfigured env as you suggested; I followed the setup instructions to the letter.
Basing on @keithahern post, an alternative solution to this problem that does not need to change the code, is to change the link to cblas.h
file. You can do it with the following commands:
cd /usr/include/aarch64-linux-gnu
sudo ln -sf cblas-netlib.h cblas.h
This should be done before cmake
. So it may be necessary to clean the bulid directory and redo the cmake
after this.
PS: My Jetson Xavier NX uses cblas-ATLAS.h
by default, and this version doesn't have the CBLAS_LAYOUT variable.
Basing on @keithahern post, an alternative solution to this problem that does not need to change the code, is to change the link to
cblas.h
file. You can do it with the following commands:cd /usr/include/aarch64-linux-gnu sudo ln -sf cblas-netlib.h cblas.h
This should be done before
cmake
. So it may be necessary to clean the bulid directory and redo thecmake
after this.PS: My Jetson Xavier NX uses
cblas-ATLAS.h
by default, and this version doesn't have the CBLAS_LAYOUT variable.
Thank you! I can confirm that this works for me on AGX as well.
We have recently added static OpenBLAS support and Docker builder (#4552, #4651), as well as pre-compiled Open3D Python wheel for ARM64. Using the Docker build script is a safe bet as it takes care of the system dependency automatically.
To get Open3D Python wheel on ARM64:
pip install open3d
to get the stable release.I am closing this issue for now. Please open a new issue if you run into new problems.
I tried using https://github.com/intel-isl/Open3D/blob/master/docs/arm.rst. And I got this result (as I got before):
I used these parameters: 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) \ ..
then sorry but it still not working.