Cannot compile for embedded aarch64 without GLFW (and other stuff?) even with BUILD_GUI=OFF
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
Hello, I am trying to build Open3D for an arm64 embedded sytem. I just want to build the core library, I don't need visualization, or CUDA, or anything fancy, just the core geometry module for point clouds and meshes, that's it. It seems that even though I explicitly disabled the GUI, it is still trying to build GLFW and other libraries which are related to window management and visualization. Is there a way to disable them?
### 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](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### Steps to reproduce the issue
#### I first cloned Open3D v0.18.0 by:
```
git clone https://github.com/isl-org/Open3D.git -b v0.18.0
cd Open3D
```
#### Then, I build Open3D in the build environment for the embedded platform I'm using (`cmake` is a cmake wrapper passing the correct toolchain to cmake):
```
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON_MODULE=OFF -DBUILD_ISPC_MODULE=OFF -DBUILD_GUI=OFF -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_EIGEN3=ON -DUSE_SYSTEM_TBB=ON ..
```
### Error message
```shell
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON_MODULE=OFF -DBUILD_ISPC_MODULE=OFF -DBUILD_GUI=OFF -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_EIGEN3=ON -DUSE_SYSTEM_TBB=ON ..
-- CMAKE_BUILD_TYPE is set to Release.
-- ccache found at /bsp/host/bin/ccache
-- Downloading third-party dependencies to /home/giuliano/Open3D/3rdparty_downloads
CMake Deprecation Warning at CMakeLists.txt:196 (cmake_policy):
The OLD behavior for policy CMP0072 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bsp/host/bin/aarch64-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bsp/host/bin/aarch64-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Open3D 0.18.0+5c982c7b5
-- Found Python3: /bsp/host/bin/python3.11 (found suitable version "3.11.6", minimum required is "3.6") found components: Interpreter Development Development.Module Development.Embed
-- Performing Test FLAG_fstack_protector_strong
-- Performing Test FLAG_fstack_protector_strong - Success
-- Performing Test FLAG_Wformat
-- Performing Test FLAG_Wformat - Success
-- Performing Test FLAG_Wformat_security
-- Performing Test FLAG_Wformat_security - Success
-- Performing Test FLAG_Wl__z_noexecstack
-- Performing Test FLAG_Wl__z_noexecstack - Success
-- Performing Test FLAG_Wl__z_relro__z_now
-- Performing Test FLAG_Wl__z_relro__z_now - Success
-- Performing Test FLAG_pie
-- Performing Test FLAG_pie - Success
-- Performing Test FLAG____CONFIG_Release__LINKER___strip_debug_
-- Performing Test FLAG____CONFIG_Release__LINKER___strip_debug_ - Success
-- Using security hardening compiler flags: $<$:-Xcompiler=-fstack-protector-strong,-Wformat,-Wformat-security>;$<$:-fstack-protector-strong;-Wformat;-Wformat-security>
-- Using security hardening linker flags: $<$:-Xcompiler=-Wl,-z,noexecstack,-Wl,-z,relro,-z,now,$<$,EXECUTABLE>:-pie>,$<$:LINKER:--strip-debug>>;$<$:-Wl,-z,noexecstack;-Wl,-z,relro,-z,now;$<$,EXECUTABLE>:-pie>;$<$:LINKER:--strip-debug>>
-- Using security hardening compiler definitions: _FORTIFY_SOURCE=2
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Using installed third-party library 3rdparty_threads
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Using installed third-party library 3rdparty_openmp
-- Building with OpenMP
-- Using installed third-party library 3rdparty_x11
-- Using installed third-party library 3rdparty_eigen3 3.4.0
-- Building library 3rdparty_glfw from source
-- Could NOT find Vulkan (missing: VULKAN_INCLUDE_DIR)
-- Using X11 for window creation
-- Found X11: /bsp/host/aarch64-buildroot-linux-gnu/sysroot/usr/include
CMake Error at 3rdparty/glfw/CMakeLists.txt:236 (message):
The RandR headers were not found
```
### Open3D, Python and System information
```markdown
- Operating system: Customized Embedded Linux
- Open3D version: 0.18.0
- System architecture: arm64
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc-7
```
### Additional information
I just want to build the core library, I don't need visualization, or CUDA, or anything fancy, just the core geometry module for point clouds and meshes, that's it.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.