isl-org / isl-org/Open3D

Compilation nightmares on RaspiOS-64

Open
#5,680 4 comments 0 reactions 0 assignees View on GitHub
build/install
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Steps to reproduce the issue

#### I first cloned Open3D by:
```
git clone https://github.com/isl-org/Open3D.git
cd Open3D
```

#### Then, I build Open3D (on Debian 11 Bullseye) with:
```
mkdir build
cd build
ccmake ..

BUILD_AZURE_KINECT OFF
BUILD_BENCHMARKS OFF
BUILD_COMMON_CUDA_ARCHS ON
BUILD_COMMON_ISPC_ISAS OFF
BUILD_CUDA_MODULE OFF
BUILD_EXAMPLES OFF
BUILD_FILAMENT_FROM_SOURCE OFF
BUILD_GUI OFF
BUILD_ISPC_MODULE OFF
BUILD_JUPYTER_EXTENSION OFF
BUILD_LIBREALSENSE OFF
BUILD_PYTHON_MODULE OFF
BUILD_PYTORCH_OPS OFF
BUILD_SHARED_LIBS OFF
BUILD_SYCL_MODULE OFF
BUILD_TENSORFLOW_OPS OFF
BUILD_UNIT_TESTS OFF
BUILD_VTK_FROM_SOURCE OFF
BUILD_WEBRTC OFF
BUNDLE_OPEN3D_ML OFF
CCACHE /usr/bin/ccache
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/local
DEVELOPER_BUILD OFF
ENABLE_CACHED_CUDA_MANAGER OFF
ENABLE_HEADLESS_RENDERING OFF
ENABLE_SYCL_UNIFIED_SHARED_MEM OFF
Eigen3_DIR /usr/share/eigen3/cmake
FETCHCONTENT_BASE_DIR /usr/src/Open3D/build/_deps
FETCHCONTENT_FULLY_DISCONNECTE OFF
FETCHCONTENT_QUIET OFF
FETCHCONTENT_SOURCE_DIR_EXT_IS
FETCHCONTENT_SOURCE_DIR_EXT_OP
FETCHCONTENT_UPDATES_DISCONNEC OFF
FETCHCONTENT_UPDATES_DISCONNEC OFF
FETCHCONTENT_UPDATES_DISCONNEC OFF
FILAMENT_PRECOMPILED_ROOT
GLFW_USE_MIR OFF
GLFW_USE_WAYLAND OFF
GLFW_VULKAN_STATIC OFF
GLIBCXX_USE_CXX11_ABI OFF
ISPC_ISAS_EXECUTABLE ISPC_ISAS_EXECUTABLE-NOTFOUND
LIB_SUFFIX
OPEN3D_THIRD_PARTY_DOWNLOAD_DI /usr/src/Open3D/3rdparty_downloads
PREFER_OSX_HOMEBREW OFF
PYTHON_EXECUTABLE /opt/venv/bin/python3.10
STATIC_WINDOWS_RUNTIME OFF
TBB_DIR /usr/lib/aarch64-linux-gnu/cmake/TBB
USE_BLAS OFF
USE_LINUX_MKL_FROM_CONDA_REPO ON
USE_SYSTEM_ASSIMP ON
USE_SYSTEM_BLAS ON
USE_SYSTEM_EIGEN3 ON
USE_SYSTEM_FILAMENT OFF
USE_SYSTEM_FMT OFF
USE_SYSTEM_GLEW OFF
USE_SYSTEM_GLFW OFF
USE_SYSTEM_GOOGLETEST OFF
USE_SYSTEM_IMGUI OFF
USE_SYSTEM_JPEG OFF
USE_SYSTEM_JSONCPP OFF
USE_SYSTEM_LIBLZF OFF
USE_SYSTEM_LIBREALSENSE OFF
USE_SYSTEM_MSGPACK OFF
USE_SYSTEM_NANOFLANN OFF
USE_SYSTEM_PNG OFF
USE_SYSTEM_PYBIND11 OFF
USE_SYSTEM_QHULLCPP OFF
USE_SYSTEM_TBB ON
USE_SYSTEM_TINYGLTF OFF
USE_SYSTEM_TINYOBJLOADER OFF
USE_SYSTEM_ZEROMQ OFF
WITH_IPPICV ON
WITH_OPENMP ON
WITH_SIMD OFF
assimp_DIR /usr/lib/aarch64-linux-gnu/cmake/assimp-5.0

make -j$(nproc)
```
Issue 1: Every flags.cmake file is created using unrecognized ``-m64``
- Manually removed to proceed.

Issue 2:
c++: error: unrecognized command-line option ‘-mf16c’
c++: error: unrecognized command-line option ‘-mavx2’
c++: error: unrecognized command-line option ‘-mfma’
c++: error: unrecognized command-line option ‘-mlzcnt’
c++: error: unrecognized command-line option ‘-mbmi’
c++: error: unrecognized command-line option ‘-mbmi2’
- Manually altered CMakeLists.txt to proceed.

Issue 3:
[ 98%] Linking CXX executable ../../bin/ConvertPointCloud
/usr/bin/ld: ../../assimp/lib/libassimp.a(ImporterRegistry.cpp.o): in function `Assimp::GetImporterInstanceList(std::vector >&)':
ImporterRegistry.cpp:(.text+0x8b0): undefined reference to `Assimp::XGLImporter::XGLImporter()'
/usr/bin/ld: ImporterRegistry.cpp:(.text+0x8e0): undefined reference to `Assimp::FBXImporter::FBXImporter()'
collect2: error: ld returned 1 exit status
make[2]: *** [cpp/tools/CMakeFiles/ConvertPointCloud.dir/build.make:139: bin/ConvertPointCloud] Error 1
make[1]: *** [CMakeFiles/Makefile2:2436: cpp/tools/CMakeFiles/ConvertPointCloud.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
- Built libassimp from source to proceed.

Issue 4: undefined reference to `aiMaterial::GetName() const`

### Error message

```shell
[ 98%] Linking CXX executable ../../bin/ConvertPointCloud
/usr/bin/ld: ../../lib/Release/libOpen3D.a(FileASSIMP.cpp.o): in function `open3d::io::ReadTriangleMeshUsingASSIMP(std::string const&, open3d::geometry::TriangleMesh&, open3d::io::ReadTriangleMeshOptions const&)':
FileASSIMP.cpp:(.text+0x1040): undefined reference to `aiMaterial::GetName() const'
/usr/bin/ld: ../../lib/Release/libOpen3D.a(FileASSIMP.cpp.o): in function `open3d::io::ReadModelUsingAssimp(std::string const&, open3d::visualization::rendering::TriangleMeshModel&, open3d::io::ReadTriangleModelOptions const&)':
FileASSIMP.cpp:(.text+0x2368): undefined reference to `aiMaterial::GetName() const'
collect2: error: ld returned 1 exit status
make[2]: *** [cpp/tools/CMakeFiles/ConvertPointCloud.dir/build.make:139: bin/ConvertPointCloud] Error 1
make[1]: *** [CMakeFiles/Makefile2:2392: cpp/tools/CMakeFiles/ConvertPointCloud.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
```

### Open3D, Python and System information

```markdown
- Operating system: Debian 11 Bullseye (RasPiOS)
- Python version: Python 3.10
- Open3D version: Cloned master
- System architecture: arm64 / Rpi
- Is this a remote workstation?: No
- How did you install Open3D?: build from source
- Compiler version(s)
GCC:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/10/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20210110 (Debian 10.2.1-6)

CLANG:
Debian clang version 11.0.1-2
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/aarch64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/aarch64-linux-gnu/10
Selected GCC installation: /usr/bin/../lib/gcc/aarch64-linux-gnu/10
Candidate multilib: .;@m64
Selected multilib: .;@m64
```

### Additional information

I have inspected the Libassimp header files and I can clearly see that aiMaterial::GetName() is defined. I am at a loss as to why the build fails.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.