openMVG: Build fails on non-x86 systems
Build of version 1.6 fails on non-x86 systems because cpuid.h is not available:
[ 628s] [ 54%] Building CXX object openMVG/matching/CMakeFiles/openMVG_test_metric.dir/metric_test.cpp.o
[ 628s] cd /home/abuild/rpmbuild/BUILD/openMVG-1.6/build/openMVG/matching && /usr/bin/c++ -DOPENMVG_USE_OPENMP -DTHIS_SOURCE_DIR=\"/home/abuild/rpmbuild/BUILD/openMVG-1.6/src/openMVG/matching\" -I/home/abuild/rpmbuild/BUILD/openMVG-1.6/src/third_party -I/usr/include/flann -I/usr/include/eigen3 -I/home/abuild/rpmbuild/BUILD/openMVG-1.6/src -isystem /home/abuild/rpmbuild/BUILD/openMVG-1.6/src/dependencies/glfw/include -mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG -fopenmp -O2 -g -DNDEBUG -fPIE -mbranch-protection=standard -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG -fopenmp -pthread -std=c++11 -o CMakeFiles/openMVG_test_metric.dir/metric_test.cpp.o -c /home/abuild/rpmbuild/BUILD/openMVG-1.6/src/openMVG/matching/metric_test.cpp
[ 628s] In file included from /home/abuild/rpmbuild/BUILD/openMVG-1.6/src/openMVG/matching/metric_test.cpp:11:
[ 628s] /home/abuild/rpmbuild/BUILD/openMVG-1.6/src/openMVG/system/cpu_instruction_set.hpp:18:12: fatal error: cpuid.h: No such file or directory
[ 628s] 18 | #include <cpuid.h>
[ 628s] | ^~~~~~~~~
[ 628s] compilation terminated.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (10 by maintainers)
@liuyanghan @ggardet Could you help on this, I can’t repro on my side (despite being on a 64 bit distrib)
Could you guys, try to comment the cpuid.h line, and the code in the function
internal_cpuidand just return false there, for a quick test