Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile on Ubuntu 23.10 #6544

Open
3 tasks done
mariusrueve opened this issue Dec 19, 2023 · 4 comments
Open
3 tasks done

Cannot compile on Ubuntu 23.10 #6544

mariusrueve opened this issue Dec 19, 2023 · 4 comments
Labels
build/install Build or installation issue
Milestone

Comments

@mariusrueve
Copy link

Checklist

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 Ubuntu 23.10) with:

mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${HOME}/open3d_install ..
make install -j 12

Error message

In file included from /usr/include/c++/13/bits/specfun.h:43,
                 from /usr/include/c++/13/cmath:3699,
                 from /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/include/assimp/vector2.h:53,
                 from /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/include/assimp/types.h:64,
                 from /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/include/assimp/IOStream.hpp:53,
                 from /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/include/assimp/DefaultIOStream.h:55,
                 from /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/include/assimp/Exceptional.h:49,
                 from /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/include/assimp/BaseImporter.h:52,
                 from /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/code/AssetLib/MDL/MDLLoader.h:50,
                 from /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/code/AssetLib/MDL/MDLLoader.cpp:51:
In static member function ‘static _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = long unsigned int; _Up = long unsigned int; bool _IsMove = false]’,
    inlined from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at /usr/include/c++/13/bits/stl_algobase.h:506:30,
    inlined from ‘_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at /usr/include/c++/13/bits/stl_algobase.h:533:42,
    inlined from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at /usr/include/c++/13/bits/stl_algobase.h:540:31,
    inlined from ‘_OI std::copy(_II, _II, _OI) [with _II = long unsigned int*; _OI = long unsigned int*]’ at /usr/include/c++/13/bits/stl_algobase.h:633:7,
    inlined from ‘std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::_M_copy_aligned(const_iterator, const_iterator, iterator) [with _Alloc = std::allocator<bool>]’ at /usr/include/c++/13/bits/stl_bvector.h:1306:28,
    inlined from ‘void std::vector<bool, _Alloc>::_M_reallocate(size_type) [with _Alloc = std::allocator<bool>]’ at /usr/include/c++/13/bits/vector.tcc:851:40,
    inlined from ‘void std::vector<bool, _Alloc>::reserve(size_type) [with _Alloc = std::allocator<bool>]’ at /usr/include/c++/13/bits/stl_bvector.h:1094:17,
    inlined from ‘Assimp::MDL::IntSharedData_MDL7::IntSharedData_MDL7()’ at /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/code/AssetLib/MDL/MDLFileData.h:879:32,
    inlined from ‘void Assimp::MDLImporter::InternReadFile_3DGS_MDL7()’ at /home/marius/projects/ciw/Open3D/build/assimp/src/ext_assimp/code/AssetLib/MDL/MDLLoader.cpp:1351:29:
/usr/include/c++/13/bits/stl_algobase.h:437:30: error: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ forming offset 8 is out of the bounds [0, 8] [-Werror=array-bounds=]
  437 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[5]: *** [code/CMakeFiles/assimp.dir/build.make:1504: code/CMakeFiles/assimp.dir/AssetLib/MDL/MDLLoader.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [CMakeFiles/Makefile2:169: code/CMakeFiles/assimp.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/ext_assimp.dir/build.make:86: assimp/src/ext_assimp-stamp/ext_assimp-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1011: CMakeFiles/ext_assimp.dir/all] Error 2

Open3D, Python and System information

- Operating system: Ubuntu 23.10
- Python version: Python 3.11.6 (main, Oct  8 2023, 05:06:43) [GCC 13.2.0] / output from `import sys; print(sys.version)`
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 13.2.0 / clang 16.0.6

Additional information

No response

@mariusrueve mariusrueve added the build/install Build or installation issue label Dec 19, 2023
@ssheorey
Copy link
Member

ssheorey commented Jan 5, 2024

Thanks for reporting this - looks like we need to upgrade dependencies (Assimp, TBB). Happy to accept PRs for this.

@greenlet
Copy link

greenlet commented Jan 22, 2024

I had same issue for the headless build. My cmake command:

cmake -DENABLE_HEADLESS_RENDERING=ON -DBUILD_GUI=OFF -DUSE_SYSTEM_GLEW=OFF -DUSE_SYSTEM_GLFW=OFF -DPYTHON_EXECUTABLE=$(which python) -DUSE_SYSTEM_ASSIMP=ON ..

I fixed it by changing file 3rdparty/mkl/tbb.cmake (added CMAKE_CXX_FLAGS):

    CMAKE_ARGS
        -DCMAKE_CXX_FLAGS=-fpermissive -Wchanges-meaning -Wno-free-nonheap-object
        -DCMAKE_INSTALL_PREFIX=${MKL_INSTALL_PREFIX}

and root file CMakeLists.txt (first macro after cmake_minimum_required):

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Wchanges-meaning -Wno-free-nonheap-object")

@ssheorey
Copy link
Member

Needs update TBB -> oneTBB

@sebastienmascha
Copy link
Contributor

Same issue with Ubuntu 22.04. It works well for GCC 11 but the error occurs with GCC 13.

[ 51%] Building CXX object code/CMakeFiles/assimp.dir/AssetLib/Obj/ObjFileParser.cpp.o
In file included from /usr/include/c++/13/bits/specfun.h:43,
                 from /usr/include/c++/13/cmath:3699,
                 from /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/include/assimp/vector2.h:53,
                 from /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/include/assimp/types.h:64,
                 from /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/include/assimp/IOStream.hpp:53,
                 from /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/include/assimp/DefaultIOStream.h:55,
                 from /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/include/assimp/Exceptional.h:49,
                 from /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/include/assimp/BaseImporter.h:52,
                 from /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/code/AssetLib/MDL/MDLLoader.h:50,
                 from /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/code/AssetLib/MDL/MDLLoader.cpp:51:
In static member function ‘static _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = long unsigned int; _Up = long unsigned int; bool _IsMove = false]’,
    inlined from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at /usr/include/c++/13/bits/stl_algobase.h:506:30,
    inlined from ‘_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at /usr/include/c++/13/bits/stl_algobase.h:533:42,
    inlined from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = long unsigned int*; _OI = long unsigned int*]’ at /usr/include/c++/13/bits/stl_algobase.h:540:31,
    inlined from ‘_OI std::copy(_II, _II, _OI) [with _II = long unsigned int*; _OI = long unsigned int*]’ at /usr/include/c++/13/bits/stl_algobase.h:633:7,
    inlined from ‘std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::_M_copy_aligned(const_iterator, const_iterator, iterator) [with _Alloc = std::allocator<bool>]’ at /usr/include/c++/13/bits/stl_bvector.h:1305:28,
    inlined from ‘void std::vector<bool, _Alloc>::_M_reallocate(size_type) [with _Alloc = std::allocator<bool>]’ at /usr/include/c++/13/bits/vector.tcc:851:40,
    inlined from ‘void std::vector<bool, _Alloc>::reserve(size_type) [with _Alloc = std::allocator<bool>]’ at /usr/include/c++/13/bits/stl_bvector.h:1093:17,
    inlined from ‘Assimp::MDL::IntSharedData_MDL7::IntSharedData_MDL7()’ at /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/code/AssetLib/MDL/MDLFileData.h:879:32,
    inlined from ‘void Assimp::MDLImporter::InternReadFile_3DGS_MDL7()’ at /home/ubuntu/dev/summer_robotics/core_vision/pkgs/open3d/open3d-src/build-release/assimp/src/ext_assimp/code/AssetLib/MDL/MDLLoader.cpp:1351:29:
/usr/include/c++/13/bits/stl_algobase.h:437:30: error: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ forming offset 8 is out of the bounds [0, 8] [-Werror=array-bounds=]
  437 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
gmake[5]: *** [code/CMakeFiles/assimp.dir/build.make:1504: code/CMakeFiles/assimp.dir/AssetLib/MDL/MDLLoader.cpp.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....
gmake[4]: *** [CMakeFiles/Makefile2:169: code/CMakeFiles/assimp.dir/all] Error 2
gmake[3]: *** [Makefile:136: all] Error 2
gmake[2]: *** [CMakeFiles/ext_assimp.dir/build.make:86: assimp/src/ext_assimp-stamp/ext_assimp-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:902: CMakeFiles/ext_assimp.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2

@ssheorey ssheorey added this to the v0.19 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/install Build or installation issue
Projects
None yet
Development

No branches or pull requests

4 participants