Closed yetiiil closed 2 years ago
Can you tell us more about your mac (is it a ARM one)?
Could you try comment this part https://github.com/openMVG/openMVG/blob/develop/src/openMVG/matching/CMakeLists.txt#L50-L62 and run cmake and compile again?
Can you tell us more about your mac (is it a ARM one)?
Could you try comment this part https://github.com/openMVG/openMVG/blob/develop/src/openMVG/matching/CMakeLists.txt#L50-L62 and run cmake and compile again?
Thank you for your reply! mine is indeed a M1 one, and I also tried comment that part and it returned the same result.
Can you try to remove the CmakeCache file? If you comment those part, reported compilation error should be different since metric_simd should not be included
Can you try to remove the CmakeCache file? If you comment those part, reported compilation error should be different since metric_simd should not be included
I tried to remove the cmakecache, and here is what I obtained:
Build files have been written to: /Users/xiao/openMVG_Build
(base) xiao@tsf-436-wpa-1-138 openMVG_Build % cmake --build . --target install
Consolidate compiler generated dependencies of target lib_CoinUtils
[ 10%] Built target lib_CoinUtils
Consolidate compiler generated dependencies of target lib_Osi
[ 12%] Built target lib_Osi
Consolidate compiler generated dependencies of target lib_clp
[ 21%] Built target lib_clp
Consolidate compiler generated dependencies of target lib_OsiClpSolver
[ 21%] Built target lib_OsiClpSolver
Consolidate compiler generated dependencies of target openMVG_stlplus
[ 22%] Built target openMVG_stlplus
Consolidate compiler generated dependencies of target main_svgSample
[ 22%] Built target main_svgSample
Consolidate compiler generated dependencies of target openMVG_cxsparse
[ 31%] Built target openMVG_cxsparse
Consolidate compiler generated dependencies of target openMVG_ceres
[ 53%] Built target openMVG_ceres
Consolidate compiler generated dependencies of target openMVG_easyexif
[ 53%] Built target openMVG_easyexif
Consolidate compiler generated dependencies of target openMVG_fast
[ 54%] Built target openMVG_fast
Consolidate compiler generated dependencies of target openMVG_exif
[ 55%] Built target openMVG_exif
Consolidate compiler generated dependencies of target openMVG_features
[ 55%] Building CXX object openMVG/features/CMakeFiles/openMVG_features.dir/akaze/image_describer_akaze.cpp.o
In file included from /Users/xiao/openMVG/src/openMVG/features/akaze/image_describer_akaze.cpp:7:
In file included from /Users/xiao/openMVG/src/openMVG/features/akaze/image_describer_akaze.hpp:13:
In file included from /Users/xiao/openMVG/src/openMVG/features/regions_factory.hpp:12:
In file included from /Users/xiao/openMVG/src/openMVG/features/binary_regions.hpp:17:
In file included from /Users/xiao/openMVG/src/openMVG/matching/metric.hpp:12:
In file included from /Users/xiao/openMVG/src/openMVG/matching/metric_simd.hpp:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/immintrin.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/x86gprintrin.h:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/hresetintrin.h:42:27: error: invalid input constraint 'a' in asm
__asm__ ("hreset $0" :: "a"(__eax));
^
In file included from /Users/xiao/openMVG/src/openMVG/features/akaze/image_describer_akaze.cpp:7:
In file included from /Users/xiao/openMVG/src/openMVG/features/akaze/image_describer_akaze.hpp:13:
In file included from /Users/xiao/openMVG/src/openMVG/features/regions_factory.hpp:12:
In file included from /Users/xiao/openMVG/src/openMVG/features/binary_regions.hpp:17:
In file included from /Users/xiao/openMVG/src/openMVG/matching/metric.hpp:12:
In file included from /Users/xiao/openMVG/src/openMVG/matching/metric_simd.hpp:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/immintrin.h:17:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
__builtin_ia32_emms();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/math.h:649:12: note: '__builtin_isless' declared here
return isless(__lcpp_x, __lcpp_y);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/math.h:545:22: note: expanded from macro 'isless'
#define isless(x, y) __builtin_isless((x),(y))
^
In file included from /Users/xiao/openMVG/src/openMVG/features/akaze/image_describer_akaze.cpp:7:
In file included from /Users/xiao/openMVG/src/openMVG/features/akaze/image_describer_akaze.hpp:13:
In file included from /Users/xiao/openMVG/src/openMVG/features/regions_factory.hpp:12:
In file included from /Users/xiao/openMVG/src/openMVG/features/binary_regions.hpp:17:
In file included from /Users/xiao/openMVG/src/openMVG/matching/metric.hpp:12:
In file included from /Users/xiao/openMVG/src/openMVG/matching/metric_simd.hpp:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/immintrin.h:17:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:33:25: error: too few arguments to function call, expected 2, have 0
__builtin_ia32_emms();
~~~~~~~~~~~~~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:50:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:67:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:129:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:159:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:189:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:216:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:239:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd'
return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:260:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq'
return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:287:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw'
return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:310:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd'
return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:331:19: error: use of undeclared identifier '__builtin_ia32_punpckldq'
return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:352:19: error: use of undeclared identifier '__builtin_ia32_paddb'; did you mean '__builtin_arm_addg'?
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:352:19: note: '__builtin_arm_addg' declared here
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:352:19: error: first argument of MTE builtin function must be a pointer ('__v8qi' (vector of 8 'char' values) invalid)
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
^ ~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:373:19: error: use of undeclared identifier '__builtin_ia32_paddw'; did you mean '__builtin_arm_addg'?
return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:352:19: note: '__builtin_arm_addg' declared here
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:373:19: error: first argument of MTE builtin function must be a pointer ('__v4hi' (vector of 4 'short' values) invalid)
return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
^ ~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:394:19: error: use of undeclared identifier '__builtin_ia32_paddd'; did you mean '__builtin_arm_addg'?
return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/mmintrin.h:352:19: note: '__builtin_arm_addg' declared here
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [openMVG/features/CMakeFiles/openMVG_features.dir/akaze/image_describer_akaze.cpp.o] Error 1
make[1]: *** [openMVG/features/CMakeFiles/openMVG_features.dir/all] Error 2
make: *** [all] Error 2
(base) xiao@tsf-436-wpa-1-138 openMVG_Build %
As you see In file included from /Users/xiao/openMVG/src/openMVG/matching/metric_simd.hpp:20:
the metric_simd is still compiled despite it should not, since you commented its activation in the CMakeLists.txt
Let's try to understand why this file is still used... despite it should not
I had a similar error also on an M1 MacBook, and managed to get a successful compile by commenting out the following line:
#include "openMVG/matching/metric_simd.hpp"
in src/openMVG/matching/metric.hpp:12
.
@tkarv could you try https://github.com/openMVG/openMVG/pull/1971#issuecomment-985972213
@pmoulon with 5f34f562f3932988b91610f433a22963fbb96e76 everything seems to compile fine! Just for completeness' sake here's the commands I used to build:
git clone --recursive https://github.com/openMVG/openMVG.git
cd openMVG
git checkout 5f34f562f3932988b91610f433a22963fbb96e76
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=~/.local/ ../src/
make -j10
make install
There was a separate issue with make install
and Eigen's INCLUDE_INSTALL_DIR
path being set wrong, which I forgot I had previously fixed by commenting out lines 68-78 in third_party/eigen/CMakeLists.txt
.
Thank you @tkarv for running the commit and sharing your command line. Will merge it to develop! How is your experience of OpenMVG on arm?
Unfortunately haven't been able to do any runs yet, just set it up over the weekend. Eager to see how the performance is compared to my x86_64 workstation, though!
Closing due to lack of feedback, feel free to re-open as needed. Hoping performance are still ok on those new mac ;-)
Hello! I tried to compile openMVG on my macbook, however, i met a lot of troubles and i really have no idea what i should do, Could anyone give some suggestions?