alicevision / AliceVision

Photogrammetric Computer Vision Framework
http://alicevision.org
Other
3k stars 827 forks source link

macOS 13 build symbol(s) not found for architecture arm64 #1293

Closed maxmadzz closed 7 months ago

maxmadzz commented 2 years ago
[ 12%] Built target OpenMesh
[ 12%] Built target MeshSDFilter
[ 12%] Built target MeshDenoiser
[ 14%] Built target lemon
[ 14%] Built target main_svgSample
[ 15%] Built target flann_cpp_s
[ 19%] Built target vlsift
[ 21%] Built target aliceVision_system
[ 22%] Built target aliceVision_numeric
[ 23%] Built target aliceVision_image
[ 27%] Built target aliceVision_panorama
[ 28%] Built target aliceVision_gpu
[ 30%] Built target aliceVision_feature
[ 30%] Built target aliceVision_geometry
[ 32%] Built target aliceVision_matching
[ 33%] Built target aliceVision_colorHarmonization
[ 34%] Built target aliceVision_sfmData
[ 37%] Built target aliceVision_sfmDataIO
[ 38%] Built target aliceVision_dataio
[ 39%] Built target aliceVision_voctree
[ 40%] Built target aliceVision_imageMatching
[ 41%] Built target aliceVision_sensorDB
[ 42%] Built target aliceVision_keyframe
[ 42%] Linking CXX shared library ../../../../Darwin-arm64/libaliceVision_lInftyComputerVision.dylib
Undefined symbols for architecture arm64:
  "OsiClpSolverInterface::setLogLevel(int)", referenced from:
      aliceVision::lInfinityCV::kernel::l1SixPointResectionSolver::solve(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, std::__1::vector<aliceVision::robustEstimation::MatrixModel<Eigen::Matrix<double, 3, 4, 0, 3, 4> >, std::__1::allocator<aliceVision::robustEstimation::MatrixModel<Eigen::Matrix<double, 3, 4, 0, 3, 4> > > >&) const in resection_kernel.cpp.o
  "OsiClpSolverInterface::OsiClpSolverInterface()", referenced from:
      aliceVision::lInfinityCV::kernel::l1SixPointResectionSolver::solve(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, std::__1::vector<aliceVision::robustEstimation::MatrixModel<Eigen::Matrix<double, 3, 4, 0, 3, 4> >, std::__1::allocator<aliceVision::robustEstimation::MatrixModel<Eigen::Matrix<double, 3, 4, 0, 3, 4> > > >&) const in resection_kernel.cpp.o
  "OsiClpSolverInterface::getModelPtr() const", referenced from:
      aliceVision::linearProgramming::OSIXSolver<OsiClpSolverInterface>::solve() in resection_kernel.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Darwin-arm64/libaliceVision_lInftyComputerVision.2.4.dylib] Error 1
make[1]: *** [src/aliceVision/linearProgramming/lInfinityCV/CMakeFiles/aliceVision_lInftyComputerVision.dir/all] Error 2
make: *** [all] Error 2
hrehfeld commented 1 year ago

Same on Linux x64 plus some lz4 undefined refs:

FAILED: Linux-x86_64/aliceVision_imageMatching-1.0 
: && /usr/bin/c++ -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -march=znver1 -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4a -mavx -mfma -mbmi2 -mavx2 -mno-xop -mno-fma4 -mno-avx512f -mno-avx512vl -mno-avx512pf -mno-avx512er -mno-avx512cd -mno-avx512dq -mno-avx512bw -mno-avx512ifma -mno-avx512vbmi -Werror=return-type -Werror=switch -Werror=return-local-addr -fopenmp -O3 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now src/software/pipeline/CMakeFiles/aliceVision_imageMatching_exe.dir/main_imageMatching.cpp.o -o Linux-x86_64/aliceVision_imageMatching-1.0 -L/home/hrehfeld/.cache/pikaur/build/alice-vision-git/src/ute_bin/lib/libuncertaintyTE.so -Wl,-rpath,/home/hrehfeld/.cache/pikaur/build/alice-vision-git/src/ute_bin/lib/libuncertaintyTE.so:/home/hrehfeld/.cache/pikaur/build/alice-vision-git/src/build/Linux-x86_64:/opt/cuda/lib64:/opt/intel/oneapi/mkl/latest/lib/intel64:  Linux-x86_64/libaliceVision_imageMatching.so.2.4  Linux-x86_64/libaliceVision_matchingImageCollection.so.2.4  Linux-x86_64/libaliceVision_sfm.so.2.4  Linux-x86_64/libaliceVision_sfmDataIO.so.2.4  Linux-x86_64/libaliceVision_voctree.so.2.4  Linux-x86_64/libaliceVision_sfmData.so.2.4  Linux-x86_64/libaliceVision_multiview.so.2.4  Linux-x86_64/libaliceVision_robustEstimation.so.2.4  Linux-x86_64/libaliceVision_track.so.2.4  Linux-x86_64/libaliceVision_matching.so.2.4  Linux-x86_64/libaliceVision_feature.so.2.4  Linux-x86_64/libaliceVision_gpu.so.2.4  Linux-x86_64/libvlsift.so.2.4  /usr/lib/libCCTag.so.1.0.3  /usr/lib/libboost_timer.so.1.81.0  /usr/lib/libboost_serialization.so.1.81.0  /usr/lib/libboost_math_c99.so.1.81.0  /usr/lib/libtbb.so.12.8  /usr/lib/libopencv_mcc.so.4.7.0  /usr/lib/libopencv_gapi.so.4.7.0  /usr/lib/libopencv_stitching.so.4.7.0  /usr/lib/libopencv_alphamat.so.4.7.0  /usr/lib/libopencv_aruco.so.4.7.0  /usr/lib/libopencv_barcode.so.4.7.0  /usr/lib/libopencv_bgsegm.so.4.7.0  /usr/lib/libopencv_bioinspired.so.4.7.0  /usr/lib/libopencv_ccalib.so.4.7.0  /usr/lib/libopencv_cvv.so.4.7.0  /usr/lib/libopencv_dnn_objdetect.so.4.7.0  /usr/lib/libopencv_dnn_superres.so.4.7.0  /usr/lib/libopencv_dpm.so.4.7.0  /usr/lib/libopencv_face.so.4.7.0  /usr/lib/libopencv_freetype.so.4.7.0  /usr/lib/libopencv_fuzzy.so.4.7.0  /usr/lib/libopencv_hdf.so.4.7.0  /usr/lib/libopencv_hfs.so.4.7.0  /usr/lib/libopencv_img_hash.so.4.7.0  /usr/lib/libopencv_intensity_transform.so.4.7.0  /usr/lib/libopencv_line_descriptor.so.4.7.0  /usr/lib/libopencv_quality.so.4.7.0  /usr/lib/libopencv_rapid.so.4.7.0  /usr/lib/libopencv_reg.so.4.7.0  /usr/lib/libopencv_rgbd.so.4.7.0  /usr/lib/libopencv_saliency.so.4.7.0  /usr/lib/libopencv_stereo.so.4.7.0  /usr/lib/libopencv_structured_light.so.4.7.0  /usr/lib/libopencv_phase_unwrapping.so.4.7.0  /usr/lib/libopencv_superres.so.4.7.0  /usr/lib/libopencv_optflow.so.4.7.0  /usr/lib/libopencv_surface_matching.so.4.7.0  /usr/lib/libopencv_tracking.so.4.7.0  /usr/lib/libopencv_highgui.so.4.7.0  /usr/lib/libopencv_datasets.so.4.7.0  /usr/lib/libopencv_plot.so.4.7.0  /usr/lib/libopencv_text.so.4.7.0  /usr/lib/libopencv_videostab.so.4.7.0  /usr/lib/libopencv_videoio.so.4.7.0  /usr/lib/libopencv_viz.so.4.7.0  /usr/lib/libopencv_wechat_qrcode.so.4.7.0  /usr/lib/libopencv_xfeatures2d.so.4.7.0  /usr/lib/libopencv_ml.so.4.7.0  /usr/lib/libopencv_shape.so.4.7.0  /usr/lib/libopencv_ximgproc.so.4.7.0  /usr/lib/libopencv_video.so.4.7.0  /usr/lib/libopencv_xobjdetect.so.4.7.0  /usr/lib/libopencv_imgcodecs.so.4.7.0  /usr/lib/libopencv_objdetect.so.4.7.0  /usr/lib/libopencv_calib3d.so.4.7.0  /usr/lib/libopencv_features2d.so.4.7.0  /usr/lib/libopencv_dnn.so.4.7.0  /usr/lib/libopencv_flann.so.4.7.0  /usr/lib/libopencv_xphoto.so.4.7.0  /usr/lib/libopencv_photo.so.4.7.0  /usr/lib/libopencv_imgproc.so.4.7.0  /usr/lib/libopencv_core.so.4.7.0  /opt/cuda/lib64/libcudart.so  /opt/cuda/lib64/libcudadevrt.a  -lpthread  -ldl  Linux-x86_64/libaliceVision_geometry.so.2.4  Linux-x86_64/libaliceVision_image.so.2.4  /usr/lib/libOpenImageIO.so.2.4.9  /usr/lib/libOpenImageIO_Util.so.2.4.9  /usr/lib/libImath-3_1.so.30.0.1  -lm  /usr/lib/libboost_container.so.1.81.0  /usr/lib/libemon.so  Linux-x86_64/libaliceVision_lInftyComputerVision.so.2.4  Linux-x86_64/libaliceVision_system.so.2.4  /usr/lib/libboost_program_options.so.1.81.0  /usr/lib/libboost_system.so.1.81.0  /usr/lib/libboost_date_time.so.1.81.0  Linux-x86_64/libaliceVision_numeric.so.2.4  /usr/lib/libboost_log_setup.so.1.81.0  /usr/lib/libboost_log.so.1.81.0  /usr/lib/libboost_filesystem.so.1.81.0  /usr/lib/libboost_thread.so.1.81.0  /usr/lib/libboost_atomic.so.1.81.0  /usr/lib/libboost_chrono.so.1.81.0  /usr/lib/libboost_regex.so.1.81.0  /usr/lib/libClpSolver.so  /usr/lib/libClp.so  /usr/lib/libcoinasl.so  /usr/lib/libOsi.so  /usr/lib/libCoinUtils.so  /usr/lib/libbz2.so  /usr/lib/libz.so  /usr/lib/libglpk.so  /usr/lib/liblapack.so  /usr/lib/libblas.so  -lm  /usr/lib/libceres.so.2.1.0  /usr/lib/libglog.so.0.6.0  /usr/lib/libgflags.so.2.2.2  -lpthread  /usr/lib/libspqr.so  /usr/lib/libtbb.so  /usr/lib/libtbbmalloc.so  /usr/lib/libcholmod.so  /usr/lib/libccolamd.so  /usr/lib/libcamd.so  /usr/lib/libcolamd.so  /usr/lib/libamd.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_sequential.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -lm  -ldl  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_sequential.so  /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so  -lm  -ldl  /usr/lib/libsuitesparseconfig.so  /usr/lib/librt.a  /usr/lib/libmetis.so  -Wl,-rpath-link,/opt/cuda/lib64 && :
/usr/bin/ld: Linux-x86_64/libaliceVision_matching.so.2.4: undefined reference to `LZ4_resetStreamHC'
/usr/bin/ld: Linux-x86_64/libaliceVision_matching.so.2.4: undefined reference to `LZ4_setStreamDecode'
/usr/bin/ld: Linux-x86_64/libaliceVision_sfm.so.2.4: undefined reference to `OsiClpSolverInterface::OsiClpSolverInterface()'
/usr/bin/ld: Linux-x86_64/libaliceVision_sfm.so.2.4: undefined reference to `OsiClpSolverInterface::setLogLevel(int)'
/usr/bin/ld: Linux-x86_64/libaliceVision_matching.so.2.4: undefined reference to `LZ4_decompress_safe'
/usr/bin/ld: Linux-x86_64/libaliceVision_sfm.so.2.4: undefined reference to `OsiClpSolverInterface::getModelPtr() const'
/usr/bin/ld: Linux-x86_64/libaliceVision_matching.so.2.4: undefined reference to `LZ4_decompress_safe_continue'
/usr/bin/ld: Linux-x86_64/libaliceVision_matching.so.2.4: undefined reference to `LZ4_compress_HC_continue'
collect2: error: ld returned 1 exit status
maxmadzz commented 1 year ago

AliceVision version: 3.0.0 Target architecture: arm64 Build Shared libs: ON Build SfM part: ON Build MVS part: ON Build AliceVision tests: OFF Build AliceVision documentation: 0 Build AliceVision samples programs: OFF Build AliceVision+OpenCV samples programs: 0 Build UncertaintyTE: 0 Build MeshSDFilter: 0 Build Alembic exporter: 0 Enable code coverage generation: OFF Enable OpenMP parallelization: 1 Use CUDA: 0 Use OpenCV SIFT features: 0 Use PopSift feature extractor: 0 Use CCTAG markers: 0 Use AprilTag markers: 0 Use OpenGV for rig localization: 0

EIGEN: CERES: 2.1.0 FLANN: 1.8.4 (internal) CLP: 1.17.7 COINUTILS: 2.11.6 OSI: 0.108.7 LEMON: 1.3 (internal)

image

I have been able to natively compile and successfully run alicevision with this configuration on m1 MacOS with arm64, but this error will occur after turning on the alembic option.

[ 22%] Linking CXX shared library ../../../Darwin-arm64/libaliceVision_sfmDataIO.dylib
Undefined symbols for architecture arm64:
  "Alembic::AbcGeom::v12::XformSample::setMatrix(Imath_3_1::Matrix44<double> const&)", referenced from:
      aliceVision::sfmDataIO::AlembicExporter::DataImpl::addCamera(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aliceVision::sfmData::View const&, aliceVision::sfmData::CameraPose const*, std::__1::shared_ptr<aliceVision::camera::IntrinsicBase>, Eigen::Matrix<double, 6, 1, 0, 6, 1> const*, Alembic::Abc::v12::OObject*) in AlembicExporter.cpp.o
      aliceVision::sfmDataIO::AlembicExporter::addSfMCameraRig(aliceVision::sfmData::SfMData const&, unsigned int, std::__1::vector<unsigned int, std::__1::allocator<unsigned int> > const&, aliceVision::sfmDataIO::ESfMData) in AlembicExporter.cpp.o
      aliceVision::sfmDataIO::AlembicExporter::addCameraKeyframe(aliceVision::geometry::Pose3 const&, aliceVision::camera::Pinhole const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int, float) in AlembicExporter.cpp.o
ld: symbol(s) not found for architecture arm64
github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.