isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.28k stars 2.28k forks source link

arm build for jetson Xavier #2468

Closed Fred3D-tech closed 2 years ago

Fred3D-tech commented 3 years ago

I tried using https://github.com/intel-isl/Open3D/blob/master/docs/arm.rst. And I got this result (as I got before):

[ 41%] 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,
                      ^~~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:37:22: error: ‘CBLAS_LAYOUT’ was not declared in this scope
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:37:22: note: suggested alternative: ‘CBLAS_UPLO’
 inline void gemm_cpu(CBLAS_LAYOUT layout,
                      ^~~~~~~~~~~~
                      CBLAS_UPLO
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:38:38: error: expected primary-expression before ‘trans_A’
                      CBLAS_TRANSPOSE trans_A,
                                      ^~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:39:38: error: expected primary-expression before ‘trans_B’
                      CBLAS_TRANSPOSE trans_B,
                                      ^~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:40:44: error: expected primary-expression before ‘m’
                      OPEN3D_CPU_LINALG_INT m,
                                            ^
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:41:44: error: expected primary-expression before ‘n’
                      OPEN3D_CPU_LINALG_INT n,
                                            ^
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:42:44: error: expected primary-expression before ‘k’
                      OPEN3D_CPU_LINALG_INT k,
                                            ^
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:43:31: error: expected primary-expression before ‘alpha’
                      scalar_t alpha,
                               ^~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:44:22: error: expected primary-expression before ‘const’
                      const scalar_t *A_data,
                      ^~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:45:44: error: expected primary-expression before ‘lda’
                      OPEN3D_CPU_LINALG_INT lda,
                                            ^~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:46:22: error: expected primary-expression before ‘const’
                      const scalar_t *B_data,
                      ^~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:47:44: error: expected primary-expression before ‘ldb’
                      OPEN3D_CPU_LINALG_INT ldb,
                                            ^~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:48:31: error: expected primary-expression before ‘beta’
                      scalar_t beta,
                               ^~~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:49:31: error: expected primary-expression before ‘*’ token
                      scalar_t *C_data,
                               ^
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:49:32: error: ‘C_data’ was not declared in this scope
                      scalar_t *C_data,
                                ^~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:49:32: note: suggested alternative: ‘__catan’
                      scalar_t *C_data,
                                ^~~~~~
                                __catan
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:50:44: error: expected primary-expression before ‘ldc’
                      OPEN3D_CPU_LINALG_INT ldc) {
                                            ^~~
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:55:21: error: expected initializer before ‘<’ token
 inline void gemm_cpu<float>(CBLAS_LAYOUT layout,
                     ^
/home/fred/Open3D/cpp/open3d/core/linalg/BlasWrapper.h:74:21: error: expected initializer before ‘<’ token
 inline void gemm_cpu<double>(CBLAS_LAYOUT layout,
                     ^
In file included from /home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:28:0:
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp: In lambda function:
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:9: error: ‘gemm_cpu’ was not declared in this scope
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:9: note: suggested alternative: ‘gemm_cuda’
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:26: error: expected primary-expression before ‘>’ token
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                          ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:43: error: left operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                           ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:57: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:71: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                                       ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:71: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                                       ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:74: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                                          ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:77: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                                             ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:43:70: error: right operand of comma operator has no effect [-Werror=unused-value]
                            alpha, static_cast<const scalar_t*>(A_data), m,
                                                                      ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:43:35: error: right operand of comma operator has no effect [-Werror=unused-value]
                            alpha, static_cast<const scalar_t*>(A_data), m,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:43:73: error: right operand of comma operator has no effect [-Werror=unused-value]
                            alpha, static_cast<const scalar_t*>(A_data), m,
                                                                         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:44:28: error: right operand of comma operator has no effect [-Werror=unused-value]
                            static_cast<const scalar_t*>(B_data), k, beta,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:44:66: error: right operand of comma operator has no effect [-Werror=unused-value]
                            static_cast<const scalar_t*>(B_data), k, beta,
                                                                  ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:45:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:45:57: error: right operand of comma operator has no effect [-Werror=unused-value]
                            static_cast<scalar_t*>(C_data), m);
                                                         ^
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:40:5: note: in expansion of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
     DISPATCH_LINALG_DTYPE_TO_TEMPLATE(dtype, [&]() {
     ^
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:45:28: error: right operand of comma operator has no effect [-Werror=unused-value]
                            static_cast<scalar_t*>(C_data), m);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:40:5: note: in expansion of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
     DISPATCH_LINALG_DTYPE_TO_TEMPLATE(dtype, [&]() {
     ^
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp: In lambda function:
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:9: error: ‘gemm_cpu’ was not declared in this scope
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:9: note: suggested alternative: ‘gemm_cuda’
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:26: error: expected primary-expression before ‘>’ token
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                          ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:43: error: left operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                           ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:57: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:71: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                                       ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:71: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                                       ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:74: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                                          ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:42:77: error: right operand of comma operator has no effect [-Werror=unused-value]
         gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
                                                                             ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:43:70: error: right operand of comma operator has no effect [-Werror=unused-value]
                            alpha, static_cast<const scalar_t*>(A_data), m,
                                                                      ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:43:35: error: right operand of comma operator has no effect [-Werror=unused-value]
                            alpha, static_cast<const scalar_t*>(A_data), m,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:43:73: error: right operand of comma operator has no effect [-Werror=unused-value]
                            alpha, static_cast<const scalar_t*>(A_data), m,
                                                                         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:44:28: error: right operand of comma operator has no effect [-Werror=unused-value]
                            static_cast<const scalar_t*>(B_data), k, beta,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:44:66: error: right operand of comma operator has no effect [-Werror=unused-value]
                            static_cast<const scalar_t*>(B_data), k, beta,
                                                                  ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:45:57: error: right operand of comma operator has no effect [-Werror=unused-value]
                            static_cast<scalar_t*>(C_data), m);
                                                         ^
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/MatmulCPU.cpp:45:28: error: right operand of comma operator has no effect [-Werror=unused-value]
                            static_cast<scalar_t*>(C_data), m);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fred/Open3D/cpp/open3d/core/linalg/LinalgUtils.h:48:20: note: in definition of macro ‘DISPATCH_LINALG_DTYPE_TO_TEMPLATE’
             return __VA_ARGS__();                           \
                    ^~~~~~~~~~~
cc1plus: all warnings being treated as errors
cpp/open3d/core/CMakeFiles/core.dir/build.make:263: recipe for target 'cpp/open3d/core/CMakeFiles/core.dir/linalg/MatmulCPU.cpp.o' failed
make[2]: *** [cpp/open3d/core/CMakeFiles/core.dir/linalg/MatmulCPU.cpp.o] Error 1
CMakeFiles/Makefile2:1399: recipe for target 'cpp/open3d/core/CMakeFiles/core.dir/all' failed
make[1]: *** [cpp/open3d/core/CMakeFiles/core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

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.

yxlao commented 3 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
Fred3D-tech commented 3 years ago

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 .

Fred3D-tech commented 3 years ago

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, ^~~~

keithahern commented 3 years ago

confirming same result on build from today, following instructions exactly

keithahern commented 3 years ago

I fixed this (crudely) by adding the right header in

Open3D/cpp/open3d/core/linalg/BlasWrapper.h

include "/usr/include/aarch64-linux-gnu/cblas-netlib.h" <-- add this

include "open3d/core/linalg/LinalgHeadersCPU.h"

Harshabajje commented 3 years ago

[ 59%] Linking CXX executable ../../bin/ManuallyCropGeometry ../../lib/Release/libOpen3D.so: undefined reference to std::bad_alloc::bad_alloc()' ../../lib/Release/libOpen3D.so: undefined reference tocblas_dgemm(CBLAS_ORDER, CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, double, double const, int, double const, int, double, double*, int)'

flobotde commented 3 years ago

[ 59%] Linking CXX executable ../../bin/ManuallyCropGeometry ../../lib/Release/libOpen3D.so: undefined reference to std::bad_alloc::bad_alloc()' ../../lib/Release/libOpen3D.so: undefined reference tocblas_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. ^^

kvdeepak commented 3 years ago

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)'

kylevedder commented 3 years ago

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.

ricardodong commented 3 years ago

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.

Nizarft commented 2 years ago

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.

Thank you! I can confirm that this works for me on AGX as well.

yxlao commented 2 years ago

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:

I am closing this issue for now. Please open a new issue if you run into new problems.