Все сделано на изображениях Docker с Ubuntu 22. Идея: одна формула на зависимость, которая будет создана (и упакована).
Проблема: нам нужно добавить Open3d в качестве зависимости к проекту, поэтому нам нужно создать и упаковать его. Но при запуске Make One Devidey Of Open3d называется Embree , кажется, отсутствует.
Чтобы запустить сборку, мы просто «Используем: Brew stall-build-from-source my-open3d
и формула:
require "formula"
class MyOpen3d < Formula
homepage 'http://www.open3d.org/'
url "http://mirror.OUR_MIRROR/open3d-0.15.1.zip"
sha256 "1664ad0539d7175215b02aea6ee09eec154ce7f9865abd4fdbc5369fce4ec511" # Same file from github
def install
cmake_args = %W[
-DBUILD_GUI=OFF
-DCMAKE_INSTALL_PREFIX=#{prefix}
-DBUILD_SHARED_LIBS=ON
]
system "mkdir", "builds"
Dir.chdir('builds/') do
system "cmake", "..", *cmake_args
system "make", "-j#{ENV.make_jobs}", "install"
end
end
end
< /code>
При запуске этого я вижу большую часть сборки, но она останавливается при этой ошибке: < /p>
Код: Выделить всё
[ 88%] Building CXX object cpp/pybind/CMakeFiles/pybind.dir/core/tensor_accessor.cpp.o
cd /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/cpp/pybind && /usr/bin/ccache /cache/brew/Library/Homebrew/shims/linux/super/g++ -DBUILD_ISPC_MODULE -DFMT_HEADER_ONLY=0 -DFMT_STRING_ALIAS=1 -DFMT_USE_WINDOWS_H=0 -DOPEN3D_CUDA_COMPILER_ID=\"\" -DOPEN3D_CUDA_COMPILER_VERSION=\"\" -DOPEN3D_CXX_COMPILER_ID=\"GNU\" -DOPEN3D_CXX_COMPILER_VERSION=\"11.4.0\" -DOPEN3D_CXX_STANDARD=\"14\" -DUNIX -DUSE_BLAS -DWITH_IPPICV -DZMQ_STATIC -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=1 -D__TBB_LIB_NAME=tbb_static -Dpybind_EXPORTS -I/cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp/pybind/.. -I/cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/_deps/ext_pybind11-src/include -isystem /usr/include/python3.10 -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/3rdparty/glew/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/3rdparty/glfw/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/fmt/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/eigen/src/ext_eigen -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/parallelstl/src/ext_parallelstl/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -fstack-protector-strong -Wformat -Wformat-security -Wall -Wextra -Werror -Wno-unused-parameter -fdiagnostics-color=always -Wno-unknown-pragmas -flto -fno-fat-lto-objects -std=c++14 -MD -MT cpp/pybind/CMakeFiles/pybind.dir/core/tensor_accessor.cpp.o -MF CMakeFiles/pybind.dir/core/tensor_accessor.cpp.o.d -o CMakeFiles/pybind.dir/core/tensor_accessor.cpp.o -c /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp/pybind/core/tensor_accessor.cpp
[ 88%] Building CXX object cpp/pybind/CMakeFiles/pybind.dir/core/tensor_converter.cpp.o
cd /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/cpp/pybind && /usr/bin/ccache /cache/brew/Library/Homebrew/shims/linux/super/g++ -DBUILD_ISPC_MODULE -DFMT_HEADER_ONLY=0 -DFMT_STRING_ALIAS=1 -DFMT_USE_WINDOWS_H=0 -DOPEN3D_CUDA_COMPILER_ID=\"\" -DOPEN3D_CUDA_COMPILER_VERSION=\"\" -DOPEN3D_CXX_COMPILER_ID=\"GNU\" -DOPEN3D_CXX_COMPILER_VERSION=\"11.4.0\" -DOPEN3D_CXX_STANDARD=\"14\" -DUNIX -DUSE_BLAS -DWITH_IPPICV -DZMQ_STATIC -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=1 -D__TBB_LIB_NAME=tbb_static -Dpybind_EXPORTS -I/cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp/pybind/.. -I/cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/_deps/ext_pybind11-src/include -isystem /usr/include/python3.10 -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/3rdparty/glew/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/3rdparty/glfw/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/fmt/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/eigen/src/ext_eigen -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/parallelstl/src/ext_parallelstl/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -fstack-protector-strong -Wformat -Wformat-security -Wall -Wextra -Werror -Wno-unused-parameter -fdiagnostics-color=always -Wno-unknown-pragmas -flto -fno-fat-lto-objects -std=c++14 -MD -MT cpp/pybind/CMakeFiles/pybind.dir/core/tensor_converter.cpp.o -MF CMakeFiles/pybind.dir/core/tensor_converter.cpp.o.d -o CMakeFiles/pybind.dir/core/tensor_converter.cpp.o -c /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp/pybind/core/tensor_converter.cpp
[ 88%] Building CXX object cpp/pybind/CMakeFiles/pybind.dir/core/tensor_function.cpp.o
cd /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/cpp/pybind && /usr/bin/ccache /cache/brew/Library/Homebrew/shims/linux/super/g++ -DBUILD_ISPC_MODULE -DFMT_HEADER_ONLY=0 -DFMT_STRING_ALIAS=1 -DFMT_USE_WINDOWS_H=0 -DOPEN3D_CUDA_COMPILER_ID=\"\" -DOPEN3D_CUDA_COMPILER_VERSION=\"\" -DOPEN3D_CXX_COMPILER_ID=\"GNU\" -DOPEN3D_CXX_COMPILER_VERSION=\"11.4.0\" -DOPEN3D_CXX_STANDARD=\"14\" -DUNIX -DUSE_BLAS -DWITH_IPPICV -DZMQ_STATIC -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=1 -D__TBB_LIB_NAME=tbb_static -Dpybind_EXPORTS -I/cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp/pybind/.. -I/cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/_deps/ext_pybind11-src/include -isystem /usr/include/python3.10 -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/3rdparty/glew/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/3rdparty/glfw/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/fmt/include -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/eigen/src/ext_eigen -isystem /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/parallelstl/src/ext_parallelstl/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -fstack-protector-strong -Wformat -Wformat-security -Wall -Wextra -Werror -Wno-unused-parameter -fdiagnostics-color=always -Wno-unknown-pragmas -flto -fno-fat-lto-objects -std=c++14 -MD -MT cpp/pybind/CMakeFiles/pybind.dir/core/tensor_function.cpp.o -MF CMakeFiles/pybind.dir/core/tensor_function.cpp.o.d -o CMakeFiles/pybind.dir/core/tensor_function.cpp.o -c /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/cpp/pybind/core/tensor_function.cpp
[ 88%] Linking CXX executable ../../bin/MergeMesh
cd /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/cpp/tools && /usr/bin/cmake -E cmake_link_script CMakeFiles/MergeMesh.dir/link.txt --verbose=1
/cache/brew/Library/Homebrew/shims/linux/super/g++ -O3 -DNDEBUG -Wl,-z,noexecstack -Wl,-z,relro,-z,now -pie -Wl,--strip-debug CMakeFiles/MergeMesh.dir/MergeMesh.cpp.o -o ../../bin/MergeMesh -Wl,-rpath,/cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/lib/Release ../../lib/Release/libOpen3D.so -lstdc++fs
/usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `embree::avx2::BVH8Triangle4iMBIntersector4HybridPluecker()'
/usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `embree::avx2::BVH8Triangle4vMBIntersector8HybridPluecker()'
/usr/bin/ld: ../../lib/Release/libOpen3D.so: undefined reference to `embree::avx2::BVH8Triangle4iIntersector1Moeller()'...
< /code>
и еще 1000 больше строк с < /p>
../../lib/Release/libOpen3D.so: undefined reference to `embree::avx2::SOME_FUNCTION
[*] Это фактически работает, если я установил dbuild_shared_libs = off (я думаю, что проблема возникает из этого)
Если я запускаю Cmake и Code> (нет брю. Правильно....
-- Installing: /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/embree/lib/cmake/embree-3.13.0/embree_avx2-targets.cmake
-- Installing: /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/embree/lib/cmake/embree-3.13.0/embree_avx2-targets-release.cmake
-- Installing: /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/embree/lib/libembree3.a
-- Installing: /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/embree/lib/cmake/embree-3.13.0/embree-targets.cmake
-- Installing: /cache/brew.temp/ltu-open3d-20251001-205119-6fsqd9/Open3D-0.15.1/builds/embree/lib/cmake/embree-3.13.0/embree-targets-release.cmake
...
[ 41%] Completed 'ext_embree'
< /code>
Вопрос: что может измениться при строительстве с Brew? Я что -то упускаю?
Подробнее здесь: https://stackoverflow.com/questions/797 ... -with-brew
Мобильная версия