Closed jiapei100 closed 1 year ago
master
Failed to build Open3DViewer .... How to link ALL required libraries?
➜ apps git:(master) ✗ /usr/bin/g++ -std=c++20 -fPIC -I/usr/local/filament/include -I/opt/intel/oneapi/tbb/latest/include -I/opt/intel/oneapi/mkl/latest/include -I/opt/intel/oneapi/embree/latest/include -I/opt/intel/oneapi/embree/latest -I/opt/intel/oneapi/dpl/latest/linux -I/usr/local/vtk/headers/vtk-9.2 -I/usr/include/eigen3 -O3 -DNDEBUG -Wl,-z,noexecstack -Wl,-z,relro,-z,now -pie -Wl,--strip-debug CMakeFiles/Open3DViewer.dir/Open3DViewer/Open3DViewer.cpp.o -o ../../Open3D/Open3D -Wl,-rpath,....../Open3D/build/lib/Release:/usr/local/filament/lib:/usr/local/lib:/usr/local/build/lib.linux-x86_64-3.10/vtkmodules:/opt/intel/oneapi/tbb/2021.6.0/lib/intel64/gcc4.8:/opt/intel/oneapi/mkl/2022.1.0/lib/intel64:/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64 ../../lib/Release/libOpen3D.so -lstdc++fs /usr/local/lib/libassimp.so.5.2.0 /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/librt.a /usr/lib/gcc/x86_64-linux-gnu/11/libgomp.so /usr/lib/x86_64-linux-gnu/libpthread.a /usr/local/lib/libjpeg.so.62.3.0 /usr/local/lib/libturbojpeg.so.0.2.0 /usr/lib/x86_64-linux-gnu/libjsoncpp.so.1.9.5 /usr/lib/x86_64-linux-gnu/liblzf.so.1.5 /usr/local/lib/librealsense2.so.2.50.0 /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so /usr/local/lib/librplycpp.so /usr/local/lib/libtinyfiledialogs.so /usr/lib/x86_64-linux-gnu/libtinygltf.so.2.5.0 /usr/lib/x86_64-linux-gnu/libtinyobjloader.so.2.0.0 /usr/lib/x86_64-linux-gnu/libqhullcpp.so.8.0.2 /usr/lib/x86_64-linux-gnu/libqhull_r.so.8.0.2 -lm /usr/local/lib/libk4a.so.1.4.0 /usr/local/lib/libPoissonRecon.so /usr/lib/x86_64-linux-gnu/libbenchmark_main.a /usr/lib/x86_64-linux-gnu/libbenchmark.so.1.6.1 /usr/lib/x86_64-linux-gnu/libimgui.a /usr/lib/x86_64-linux-gnu/libstb.so /usr/lib/x86_64-linux-gnu/libzmq.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkFiltersGeneric.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkIOGeometry.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkViewsCore.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkInteractionWidgets.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkRenderingContext2D.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkIOLegacy.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkIOCore.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkRenderingCore.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkFiltersGeometry.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkFiltersSources.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkFiltersGeneral.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkFiltersCore.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkCommonExecutionModel.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkCommonDataModel.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkCommonSystem.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkCommonMisc.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkCommonTransforms.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkCommonMath.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkCommonCore.so /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtksys.so -ldl /usr/local/build/lib.linux-x86_64-3.10/vtkmodules/libvtkkissfft.so /opt/intel/oneapi/tbb/2021.6.0/lib/intel64/gcc4.8/libtbb.so.12 -Wl,-rpath=/opt/intel/oneapi/mkl/2022.1.0/lib/intel64 /opt/intel/oneapi/mkl/2022.1.0/lib/intel64/libmkl_intel_ilp64.so /opt/intel/oneapi/mkl/2022.1.0/lib/intel64/libmkl_core.so /opt/intel/oneapi/mkl/2022.1.0/lib/intel64/libmkl_intel_thread.so /opt/intel/oneapi/embree/latest/lib/libembree.so /opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64/libiomp5.so -lm -ldl -lpthread /usr/lib/x86_64-linux-gnu/libGLEW.so /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 /usr/lib/x86_64-linux-gnu/libX11.so -Wl,--as-needed /usr/local/filament/lib/libfilament.so /usr/local/filament/lib/libbackend.so /usr/local/filament/lib/libbluegl.so /usr/local/filament/lib/libbluevk.so /usr/local/filament/lib/libcamutils.so /usr/local/filament/lib/libfilabridge.so /usr/local/filament/lib/libfilaflat.so /usr/local/filament/lib/libfilagui_resources.a /usr/local/filament/lib/libfilagui.so /usr/local/filament/lib/libfilamat_lite.so /usr/local/filament/lib/libfilamat.so /usr/local/filament/lib/libfilamentapp-resources.a /usr/local/filament/lib/libfilamentapp.so /usr/local/filament/lib/libfilament-iblprefilter.so /usr/local/filament/lib/libfilameshio.so /usr/local/filament/lib/libgeometry.so /usr/local/filament/lib/libgltfio_core.so /usr/local/filament/lib/libgltfio.so /usr/local/filament/lib/libibl-lite.so /usr/local/filament/lib/libibl.so /usr/local/filament/lib/libimageio.so /usr/local/filament/lib/libimage.so /usr/local/filament/lib/libktxreader.so /usr/local/filament/lib/libmatdbg_resources.a /usr/local/filament/lib/libmatdbg.so /usr/local/filament/lib/libmathio.so /usr/local/filament/lib/libmath.so /usr/local/filament/lib/libmatlang.so /usr/local/filament/lib/libshaders.so /usr/local/filament/lib/libuberzlib.so /usr/local/filament/lib/libutils.so /usr/local/filament/lib/libviewer.so /usr/local/filament/lib/libvkshaders.so /usr/local/lib/libfmt.so.9.0.0 /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so -Wl,-rpath-link,/usr/local/build/lib.linux-x86_64-3.10/vtkmodules /usr/lib/x86_64-linux-gnu/libmeshoptimizer.so.0.17 /usr/lib/x86_64-linux-gnu/libtinygltf.so.2.5.0 -ldraco -lstb -lbasis_encoder -lbasis_transcoder -lpng -lsmol-v -lgtest -lbenchmark -lcivetweb-cpp -lcivetweb -lgomp -lzstd -lz -lcurl -lglslang -lSPIRV -lSPVRemapper -lSPIRV-Tools -lSPIRV-Tools-shared -lSPIRV-Tools-opt -lspirv-cross-c-shared -lspirv-cross-cpp -lspirv-cross-c -lspirv-cross-core -lspirv-cross-util -lspirv-cross-glsl -lspirv-cross-msl /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `CreateEGLHeadlessPlatform' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `open3d::t::geometry::RaycastingScene::~RaycastingScene()' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::ktx2_transcoder::ktx2_transcoder()' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `open3d::t::geometry::RaycastingScene::AddTriangles(open3d::core::Tensor const&, open3d::core::Tensor const&)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `vtkLinearExtrusionFilter::New()' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::basis_is_format_supported(basist::transcoder_texture_format, basist::basis_tex_format)' /usr/bin/ld: /usr/local/filament/lib/libfilamat.so: undefined reference to `vtable for spv::spirvbin_t' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `fmt::v9::vformat(fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<fmt::v9::appender, char> >)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::ReadWholeFile(std::vector<unsigned char, std::allocator<unsigned char> >*, std::string*, std::string const&, void*)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::TinyGLTF::WriteGltfSceneToFile(tinygltf::Model*, std::string const&, bool, bool, bool, bool)' /usr/bin/ld: /usr/local/filament/lib/libfilamat.so: undefined reference to `smolv::Encode(void const*, unsigned long, std::vector<unsigned char, std::allocator<unsigned char> >&, unsigned int, bool (*)(char const*))' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::WriteWholeFile(std::string*, std::string const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, void*)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::ExpandFilePath(std::string const&, void*)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::Value::Value(std::string const&)' /usr/bin/ld: /usr/local/filament/lib/libfilamat.so: undefined reference to `spv::spirvbin_t::errorHandler[abi:cxx11]' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::CharReaderBuilder::operator[](std::string const&)' /usr/bin/ld: /usr/local/filament/lib/libfilamat.so: undefined reference to `spirv_cross::CompilerMSL::compile[abi:cxx11]()' /usr/bin/ld: /usr/local/filament/lib/libfilamat.so: undefined reference to `spirv_cross::CompilerMSL::add_msl_resource_binding(spirv_cross::MSLResourceBinding const&)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::parseFromStream(Json::CharReader::Factory const&, std::istream&, Json::Value*, std::string*)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::Value::toStyledString() const' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::FileExists(std::string const&, void*)' /usr/bin/ld: /usr/local/filament/lib/libfilamat.so: undefined reference to `spv::spirvbin_t::remap(std::vector<unsigned int, std::allocator<unsigned int> >&, unsigned int)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::Value::asString() const' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::Value::operator[](std::string const&)' /usr/bin/ld: /usr/local/filament/lib/libfilamat.so: undefined reference to `spirv_cross::CompilerMSL::CompilerMSL(std::vector<unsigned int, std::allocator<unsigned int> >)' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::basisu_transcoder_init()' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::ktx2_transcoder::get_image_level_info(basist::ktx2_image_level_info&, unsigned int, unsigned int, unsigned int) const' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `vtkRotationalExtrusionFilter::New()' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `vtkFillHolesFilter::New()' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::basis_get_basisu_texture_format(basist::transcoder_texture_format)' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::basis_get_bytes_per_block_or_pixel(basist::transcoder_texture_format)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::WriteImageData(std::string const*, std::string const*, tinygltf::Image*, bool, void*)' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::ktx2_transcoder::start_transcoding()' /usr/bin/ld: /usr/local/filament/lib/libfilamentapp.so: undefined reference to `getNativeWindow' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::Value::operator[](std::string const&) const' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinyobj::LoadObj(tinyobj::attrib_t*, std::vector<tinyobj::shape_t, std::allocator<tinyobj::shape_t> >*, std::vector<tinyobj::_material_t, std::allocator<tinyobj::_material_t> >*, std::string*, std::string*, char const*, char const*, bool, bool)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::TinyGLTF::LoadASCIIFromFile(tinygltf::Model*, std::string*, std::string*, std::string const&, unsigned int)' /usr/bin/ld: /usr/local/filament/lib/libfilamat.so: undefined reference to `vtable for spirv_cross::CompilerMSL' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::StreamWriterBuilder::operator[](std::string const&)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `open3d::t::geometry::RaycastingScene::RaycastingScene(long)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `open3d::t::geometry::RaycastingScene::ComputeClosestPoints(open3d::core::Tensor const&, int)' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::ktx2_transcoder::transcode_image_level(unsigned int, unsigned int, unsigned int, void*, unsigned int, basist::transcoder_texture_format, unsigned int, unsigned int, unsigned int, int, int, basist::ktx2_transcoder_state*)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `Json::writeString(Json::StreamWriter::Factory const&, Json::Value const&)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::TinyGLTF::LoadBinaryFromFile(tinygltf::Model*, std::string*, std::string*, std::string const&, unsigned int)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `orgQhull::PointCoordinates::PointCoordinates(int, std::string const&)' /usr/bin/ld: /usr/local/filament/lib/libktxreader.so: undefined reference to `basist::ktx2_transcoder::init(void const*, unsigned int)' /usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `tinygltf::LoadImageData(tinygltf::Image*, int, std::string*, std::string*, int, int, unsigned char const*, int, void*)' collect2: error: ld returned 1 exit status
HI @jiapei100 please add your system environment, open3d version and cmake configuration (according to the issue template).
Please reopen once you provide environment information. We cannot help without that.
Checklist
master
branch).My Question
Failed to build Open3DViewer .... How to link ALL required libraries?