isl-org / Open3D

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

Cannot compile with GCC 8.2.0, Mesa 18.3.6, CMake 3.25.0, OpenBLAS 0.3.20, Python 3.11.2 #6166

Open samfux84 opened 1 year ago

samfux84 commented 1 year ago

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 with:

mkdir build
cd build
cmake -DENABLE_HEADLESS_RENDERING=ON -DBUILD_GUI=OFF -DUSE_SYSTEM_GLEW=OFF -DUSE_SYSTEM_GLFW=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/cluster/apps/nss/gcc-8.2.0/open3d/0.17.0/x86_64 -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_ISPC_MODULE=OFF ..
make -j8

Error message

/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:705:50: error: conversion from ‘solist_iterator<[...],pair<[...],[...]>>’ to non-scalar type ‘solist_iterator<[...],pair<[...],[...]>>’ requested
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:706:49: error: invalid initialization of reference of type ‘const tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >&’ from expression of type ‘tbb::interface5::internal::concurrent_unordered_base<tbb::interface5::concurrent_unordered_map_traits<open3d::utility::MiniVec<int, 3>, unsigned int, tbb::interface5::internal::hash_compare<open3d::utility::MiniVec<int, 3>, open3d::utility::MiniVecHash<int, 3>, open3d::utility::MiniVecEq<int, 3> >, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >, false> >::const_iterator’ {aka ‘tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, const std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >’}
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:732:46: error: conversion from ‘solist_iterator<[...],pair<[...],[...]>>’ to non-scalar type ‘solist_iterator<[...],pair<[...],[...]>>’ requested
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:733:45: error: invalid initialization of reference of type ‘const tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >&’ from expression of type ‘tbb::interface5::internal::concurrent_unordered_base<tbb::interface5::concurrent_unordered_map_traits<open3d::utility::MiniVec<int, 3>, unsigned int, tbb::interface5::internal::hash_compare<open3d::utility::MiniVec<int, 3>, open3d::utility::MiniVecHash<int, 3>, open3d::utility::MiniVecEq<int, 3> >, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >, false> >::const_iterator’ {aka ‘tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, const std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >’}
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:931:46: error: conversion from ‘solist_iterator<[...],pair<[...],[...]>>’ to non-scalar type ‘solist_iterator<[...],pair<[...],[...]>>’ requested
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:932:45: error: invalid initialization of reference of type ‘const tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >&’ from expression of type ‘tbb::interface5::internal::concurrent_unordered_base<tbb::interface5::concurrent_unordered_map_traits<open3d::utility::MiniVec<int, 3>, unsigned int, tbb::interface5::internal::hash_compare<open3d::utility::MiniVec<int, 3>, open3d::utility::MiniVecHash<int, 3>, open3d::utility::MiniVecEq<int, 3> >, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >, false> >::const_iterator’ {aka ‘tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, const std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >’}
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:705:50: error: conversion from ‘solist_iterator<[...],pair<[...],[...]>>’ to non-scalar type ‘solist_iterator<[...],pair<[...],[...]>>’ requested
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:706:49: error: invalid initialization of reference of type ‘const tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >&’ from expression of type ‘tbb::interface5::internal::concurrent_unordered_base<tbb::interface5::concurrent_unordered_map_traits<open3d::utility::MiniVec<int, 3>, unsigned int, tbb::interface5::internal::hash_compare<open3d::utility::MiniVec<int, 3>, open3d::utility::MiniVecHash<int, 3>, open3d::utility::MiniVecEq<int, 3> >, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >, false> >::const_iterator’ {aka ‘tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, const std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >’}
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:732:46: error: conversion from ‘solist_iterator<[...],pair<[...],[...]>>’ to non-scalar type ‘solist_iterator<[...],pair<[...],[...]>>’ requested
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:733:45: error: invalid initialization of reference of type ‘const tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >&’ from expression of type ‘tbb::interface5::internal::concurrent_unordered_base<tbb::interface5::concurrent_unordered_map_traits<open3d::utility::MiniVec<int, 3>, unsigned int, tbb::interface5::internal::hash_compare<open3d::utility::MiniVec<int, 3>, open3d::utility::MiniVecHash<int, 3>, open3d::utility::MiniVecEq<int, 3> >, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >, false> >::const_iterator’ {aka ‘tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, const std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >’}
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:931:46: error: conversion from ‘solist_iterator<[...],pair<[...],[...]>>’ to non-scalar type ‘solist_iterator<[...],pair<[...],[...]>>’ requested
/scratch/258932703.tmpdir/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridImpl.h:932:45: error: invalid initialization of reference of type ‘const tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >&’ from expression of type ‘tbb::interface5::internal::concurrent_unordered_base<tbb::interface5::concurrent_unordered_map_traits<open3d::utility::MiniVec<int, 3>, unsigned int, tbb::interface5::internal::hash_compare<open3d::utility::MiniVec<int, 3>, open3d::utility::MiniVecHash<int, 3>, open3d::utility::MiniVecEq<int, 3> >, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >, false> >::const_iterator’ {aka ‘tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int>, tbb::tbb_allocator<std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> > >, const std::pair<const open3d::utility::MiniVec<int, 3>, unsigned int> >’}
/scratch/258932703.tmpdir/Open3D/cpp/open3d/core/ParallelFor.h:103:6: error: ‘void open3d::core::ParallelFor(const open3d::core::Device&, int64_t, const func_t&) [with func_t = open3d::t::geometry::kernel::voxel_grid::RayCastCPU(std::shared_ptr<open3d::core::HashMap>&, const open3d::t::geometry::TensorMap&, const open3d::core::Tensor&, open3d::t::geometry::TensorMap&, const open3d::core::Tensor&, const open3d::core::Tensor&, open3d::t::geometry::kernel::voxel_grid::index_t, open3d::t::geometry::kernel::voxel_grid::index_t, open3d::t::geometry::kernel::voxel_grid::index_t, float, float, float, float, float, float, int) [with tsdf_t = float; weight_t = short unsigned int; color_t = short unsigned int; open3d::t::geometry::kernel::voxel_grid::index_t = int]::<lambda(open3d::t::geometry::kernel::voxel_grid::index_t)>; int64_t = long int]’, declared using local type ‘const open3d::t::geometry::kernel::voxel_grid::RayCastCPU(std::shared_ptr<open3d::core::HashMap>&, const open3d::t::geometry::TensorMap&, const open3d::core::Tensor&, open3d::t::geometry::TensorMap&, const open3d::core::Tensor&, const open3d::core::Tensor&, open3d::t::geometry::kernel::voxel_grid::index_t, open3d::t::geometry::kernel::voxel_grid::index_t, open3d::t::geometry::kernel::voxel_grid::index_t, float, float, float, float, float, float, int) [with tsdf_t = float; weight_t = short unsigned int; color_t = short unsigned int; open3d::t::geometry::kernel::voxel_grid::index_t = int]::<lambda(open3d::t::geometry::kernel::voxel_grid::index_t)>’, is used but never defined [-fpermissive]
/scratch/258932703.tmpdir/Open3D/cpp/open3d/core/ParallelFor.h:103:6: error: ‘void open3d::core::ParallelFor(const open3d::core::Device&, int64_t, const func_t&) [with func_t = open3d::t::geometry::kernel::voxel_grid::RayCastCPU(std::shared_ptr<open3d::core::HashMap>&, const open3d::t::geometry::TensorMap&, const open3d::core::Tensor&, open3d::t::geometry::TensorMap&, const open3d::core::Tensor&, const open3d::core::Tensor&, open3d::t::geometry::kernel::voxel_grid::index_t, open3d::t::geometry::kernel::voxel_grid::index_t, open3d::t::geometry::kernel::voxel_grid::index_t, float, float, float, float, float, float, int) [with tsdf_t = float; weight_t = float; color_t = float; open3d::t::geometry::kernel::voxel_grid::index_t = int]::<lambda(open3d::t::geometry::kernel::voxel_grid::index_t)>; int64_t = long int]’, declared using local type ‘const open3d::t::geometry::kernel::voxel_grid::RayCastCPU(std::shared_ptr<open3d::core::HashMap>&, const open3d::t::geometry::TensorMap&, const open3d::core::Tensor&, open3d::t::geometry::TensorMap&, const open3d::core::Tensor&, const open3d::core::Tensor&, open3d::t::geometry::kernel::voxel_grid::index_t, open3d::t::geometry::kernel::voxel_grid::index_t, open3d::t::geometry::kernel::voxel_grid::index_t, float, float, float, float, float, float, int) [with tsdf_t = float; weight_t = float; color_t = float; open3d::t::geometry::kernel::voxel_grid::index_t = int]::<lambda(open3d::t::geometry::kernel::voxel_grid::index_t)>’, is used but never defined [-fpermissive]
/scratch/258932703.tmpdir/Open3D/cpp/open3d/visualization/visualizer/Visualizer.cpp:215:58: error: ‘new’ of type ‘open3d::visualization::ViewControl’ with extended alignment 32 [-Werror=aligned-new=]

Open3D, Python and System information

- Operating system: CentOS 7.9 (but no libraries from CentOS 7.9 are used. The compiler and all dependencies have been built from  source)
- Python version: Python 3.11.2
- Open3D version: 0.17.0
- System architecture: x86_64
- Is this a remote workstation?: I try to build the software on a HPC cluster
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 8.2.0 (also built from source)

Additional information

I could not find any useful information about this problem that keeps me now busy for a while. I started trying to build a headless open3d version when 0.14.0 was releases and tried every new release until 0.17.0, but I could not resolve the issue described above. I tried using system dependencies and then removed one after another to let open3d build the dependencies, but not even this seems to work.

samfux84 commented 1 year ago

Adding

-DWITH_SIMD=OFF -DWITH_IPPICV=OFF -DBUILD_ISPC_MODULE=OFF

already improves the situation. Now I am just left with a single error:

/scratch/258932703.tmpdir/Open3D/cpp/open3d/visualization/visualizer/Visualizer.cpp:215:58: error: ‘new’ of type ‘open3d::visualization::ViewControl’ with extended alignment 32 [-Werror=aligned-new=]

Just noticed that this is the same error than I reported already in #5036

qingchuchu commented 8 months ago

Have you solved the problem? I met the same issue.

samfux84 commented 8 months ago

@qingchuchu : No, I could not solve the problem and I am still waiting for feedback from the developers

qingchuchu commented 8 months ago

Hi~ I want to share some process with you.

1) With environment: CentOS7, gcc=8.2.0, pytorch=1.8.2(build from source by developer), Open3D=0.14.0( filament: build from source ; CUDA, Pytorch, OpenML On) I have met the same error with you, as below: conversion from ‘solist_iterator<[...],pair<[...],[...]>>’ to non-scalar type ‘solist_iterator<[...],pair<[...],[...]>>’ requested

2) I tried to change something, for example, pytorch version, filament API, gcc version and so on. When I set gcc=9.4.0, change the source code of filament to https://github.com/google/filament/releases/tag/v1.9.19 and change pytorch version, the above error does not appear. And the compilation process seems to only have the following error:

../../lib/Release/libOpen3D.a(filamentEngine.cpp.o): In function 'open3d::visualization::rendring::EngineInstance:EngineInstance()': FilamentEngine.cpp:(.text+0x2f2): undefined reference to 'CreateEGLHeadlessPlatform'

3)When I set GUI=OFF, filament doesn't need to be compiled, and there is no error.

I hope this information will help you. Good luck to you.

HydrogenSulfate commented 6 months ago

same here