Open3D
Open3D copied to clipboard
Open3Ds C++ does not compile on Ubuntu 24.04
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
main
branch).
Steps to reproduce the issue
System isn't that old. Not upgraded from 22.04. Installed some months ago. I install it from source using Cmake and CPM. Below is my CMakeLists.txt
cmake_minimum_required(VERSION 3.20)
project(UndistortNavvis)
include(cmake/CPM.cmake)
find_package(OpenCV REQUIRED COMPONENTS)
CPMAddPackage(NAME Open3D
GIT_REPOSITORY "https://github.com/isl-org/Open3D.git"
GIT_TAG main
OPTIONS
"GLIBCXX_USE_CXX11_ABI ON"
"BUILD_EXAMPLES OFF"
"BUILD_PYTHON_MODULE OFF"
)
CPMAddPackage("gh:nlohmann/[email protected]") #<- Shouldn't matter
On my old system I used the 0.17 tag. That does not work on 24.04, because it has some errors. The errors that I encountered were errors that https://github.com/isl-org/Open3D/pull/6809 could fix.
However even the latest version does not solve the error that you can see below.
So install I simply use: mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DGLIBCXX_USE_CXX11_ABI=ON -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON_MODULE=OFF .. make -j 16
Not sure if I did something wrong here.
I can build if I don't treat warnings as errors. But for that I have to modify one file. Due to CPM the code will be pulled again and I would have to apply the changes every time. Not really feasible.
Any suggestions?
Error message
In member function ‘void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = double]’,
inlined from ‘static void std::allocator_traits<std::allocator<_Tp1> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = double]’ at /usr/include/c++/13/bits/alloc_traits.h:517:23,
inlined from ‘void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = double; _Alloc = std::allocator<double>]’ at /usr/include/c++/13/bits/stl_vector.h:390:19,
inlined from ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = double; _Alloc = std::allocator<double>]’ at /usr/include/c++/13/bits/stl_vector.h:369:15,
inlined from ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = double; _Alloc = std::allocator<double>]’ at /usr/include/c++/13/bits/stl_vector.h:738:7,
inlined from ‘open3d::core::nns::impl::{anonymous}::_KnnSearchCPU<double, int, open3d::core::nns::NeighborSearchAllocator<double, int>, 1>(open3d::core::nns::NanoFlannIndexHolderBase*, int64_t*, size_t, const double*, size_t, const double*, size_t, int, bool, bool, open3d::core::nns::NeighborSearchAllocator<double, int>&)::<lambda(const double*, const double*, size_t)>’ at /home/...../build/_deps/open3d-src/cpp/open3d/core/nns/NanoFlannImpl.h:126:5,
inlined from ‘open3d::core::nns::impl::{anonymous}::_RadiusSearchCPU<double, int, open3d::core::nns::NeighborSearchAllocator<double, int>, 1>(open3d::core::nns::NanoFlannIndexHolderBase*, int64_t*, size_t, const double*, size_t, const double*, size_t, const double*, bool, bool, bool, bool, open3d::core::nns::NeighborSearchAllocator<double, int>&)::<lambda(const tbb::detail::d1::blocked_range<long unsigned int>&)>’ at /home/......./build/_deps/open3d-src/cpp/open3d/core/nns/NanoFlannImpl.h:258:41:
/usr/include/c++/13/bits/new_allocator.h:172:33: error: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset [8, 9223372036854775800] [-Werror=free-nonheap-object]
172 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n));
Open3D, Python and System information
- Operating system: Ubuntu 24.04 LTS
- Python version: 3.12.4 using Anaconda
- Open3D version: -
- System architecture: arm64
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 13.2.0
Additional information
No response