Hi Im having difficult time installing openMVG on my mac os 10.12.02
I followed the build instruction doing :
1-git clone --recursive https://github.com/openMVG/openMVG.git
2-mkdir openMVG_Build
3- cd openMVG_Build
4- cmake -DCMAKE_BUILD_TYPE=RELEASE -G "Xcode" . ../openMVG/src/
5-xcodebuild -configuration Release
But then I get this error the build just fails ...tried it more then once ...am I missing something here?
The following build commands failed:
CompileC /Users/karimhassanieh/Desktop/Karim/Research/SFM/openMVG_Build/software/SfM/openMVG.build/Release/openMVG_main_openMVG2openMVS.build/Objects-normal/x86_64/main_openMVG2openMVS.o software/SfM/main_openMVG2openMVS.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Do you have a more detailled log ?
Can you try without the -G Xcode ? (ie: using normal makefile as you could done on linux)
@KarimHassanieh Any feedback?
log.txt
@rperrot @pmoulon Dears Still not working even if i used normal command file like in linux...i uploaded the log file if you would like to check it the build fails in the end ...any suggestions?
This issue is already known (only on osx). The fix is to uncomment the following lines (from the ifdef to the endif):
https://github.com/openMVG/openMVG/blob/master/src/software/SfM/InterfaceMVS.h#L154
Uncomment it then recompile (only make, cmake is not mandatory in this case).
Here the thread about the WIP fix
https://github.com/openMVG/openMVG/issues/713
As you see we are waiting the feedback of @stephane-lb about the potential fix
I got a similar compilation error on OSX Sierre the idea of @rperrot (using classical make, instead of Xcode) work for me to go further in the compilation stage but it still failed at 80%...
[ 80%] Linking CXX static library ../../../../lib/libceres.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(canonical_views_clustering.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(single_linkage_clustering.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(suitesparse.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(visibility.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(visibility_based_preconditioner.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(canonical_views_clustering.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(single_linkage_clustering.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(suitesparse.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(visibility.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(visibility_based_preconditioner.cc.o) has no symbols
[ 80%] Built target ceres
make: * [all] Error 2
Hey,
Sorry for the late reply. just deleted all my folder with openMVG, and do a fresh compile.
Works well with @rperrot fix.
@antochny master or develop ? Got a similar error a week ago. But was not able to isolate and reproduce.
-S-
@stephane-lb in debug mode, still stuck at 80% :
Finished prerequisites of target file lib/libceres.a'.
Must remake target
lib/libceres.a'.
Need a job token; we don't have children
Putting child 0x7fc0d60a5f70 (lib/libceres.a) PID 58680 on the chain.
Commands of lib/libceres.a' are being run.
Finished prerequisites of target file
third_party/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/build'.
The prerequisites of third_party/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/build' are being made.
Live child 0x7fc0d60a5f70 (lib/libceres.a) PID 58680
[ 80%] Linking CXX static library ../../../../lib/libceres.a
Reaping winning child 0x7fc0d60a5f70 PID 58680
Live child 0x7fc0d60a5f70 (lib/libceres.a) PID 58681
Reaping winning child 0x7fc0d60a5f70 PID 58681
Live child 0x7fc0d60a5f70 (lib/libceres.a) PID 58683
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(canonical_views_clustering.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(single_linkage_clustering.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(suitesparse.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(visibility.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(visibility_based_preconditioner.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(canonical_views_clustering.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(single_linkage_clustering.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(suitesparse.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(visibility.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../../lib/libceres.a(visibility_based_preconditioner.cc.o) has no symbols
Reaping winning child 0x7fc0d60a5f70 PID 58683
Removing child 0x7fc0d60a5f70 PID 58683 from chain.
Considering target file
third_party/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/build'.
File third_party/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/build' does not exist.
Considering target file
lib/libceres.a'.
File lib/libceres.a' was considered already.
Finished prerequisites of target file
third_party/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/build'.
Must remake target third_party/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/build'.
Successfully remade target file
third_party/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/build'.
Reaping winning child 0x7fbed29011f0 PID 57632
Live child 0x7fbed29011f0 (third_party/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/all) PID 58688
[ 80%] Built target ceres
Reaping winning child 0x7fbed29011f0 PID 58688
Removing child 0x7fbed29011f0 PID 58688 from chain.
Reaping losing child 0x7fdcbad007c0 PID 56568
make: * [all] Error 2
Removing child 0x7fdcbad007c0 PID 56568 from chain.
Ok so final fix for InterfaceMVS.h
#ifdef __APPLE__
#ifdef __clang__
ARCHIVE_DEFINE_TYPE(unsigned long)
#endif
#endif
Remember I got the similar error, but looks fine after a deep clean of all my openMVG directories.
I supposed it was because I try to change too many things ...
( by deep clean I mean rm -fr openMVG )
Tested on develop too : Works well.
Process
git cr https://github.com/openMVG/openMVG.git
cd openMVG
# git checkout develop
mkdir _build
cd _build
cmake ../src
make -j8
I did both but I'm still stuck at the same stage of compilation, I guess it could come from a warning I got in cmake, actually everything related to OpenMP failed during CMAKE :
CMake Warning at third_party/flann/CMakeLists.txt:75 (message):
OpenMP NOT found
This warning says that openmp could not be used on clang (so it is disabled : everything could run without it, it will only use one core of you CPU).
Do you already have ceres installed using others methods ? (manually, with macports or homebrew ?)
Did you start in a clean directory (create a new build dir, run cmake from it) ?
Could you compile using make (without the -j8) and post the full compile log (cmake output and make output). (copy the terminal output in a file if you want).
Don't think so, Mac doesn't support openMP but this is not a big deal.
Just checked, I also have ceres installed globally on my system, so might be the reason why It passed.
``
$ brew search ceres [±develop ●●]
homebrew/science/ceres-solver ✔
``
Ok so based on this : https://www.ruby-forum.com/topic/2937203
Could you try to clean your build dir and then make the project with make -j1 please ?
Hi im having a problem doing my first example, in fact the build was successful after un-commenting the lines in InterfaceMVS.h I just don't know how to run the first example..can anyone help with this?
would much appreciate it
I think this should help : https://github.com/openMVG/openMVG/issues/772
Otherwise, you might want to use :
Thanks a lot for your help, it was indeed because of ceres... I needed to update Xcode, to update Macports, to install ceres and finally process the compilation using cmake and make straightforwardly ;)
{{{Out-of-topic}}} For the record, I'm newbie to OpenMVG but I have a solid background in open-source photogrammetry (mostly using MicMac) and I'll work for the next few months on possible interoperability in between both solutions :) Keep in touch and thanks again !
@KarimHassanieh Go to the output build folder and you will see all the compiled binaries.
Else if you want to use the SfM pipeline I advise you to run the python script:
https://openmvg.readthedocs.io/en/latest/software/SfM/SfM/#openmvg-sfm-pipelines-demo
=> If you are on Mac you will perhaps to adjust the binary path in the python script (remove the release at the end of it)
@antochny Don't worry about the newbie stuff, everyone is welcomed and we are happy to have new testing user that will be able to compare OpenMVG to the software that they are using on the side.
FYI, @hcjghr Have already done some test to export OpenMVG result to MicMac
https://github.com/hcjghr/openMVG/blob/ac2e838b6d5d8b6e0b214771e63bcf57f640398a/src/software/SfM/main_openMVG2MICMAC.cpp
@KarimHassanieh Any feedback?
Closed due to inactivity.
Most helpful comment
{{{Out-of-topic}}} For the record, I'm newbie to OpenMVG but I have a solid background in open-source photogrammetry (mostly using MicMac) and I'll work for the next few months on possible interoperability in between both solutions :) Keep in touch and thanks again !