cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.37k stars 910 forks source link

Build on Mac (OS X 10.11, Homebrew) failed #310

Open SchmollTroll opened 6 years ago

SchmollTroll commented 6 years ago

Hi there,

I followed the build instructions carefully and all depencies installed well with homebrew and even the cmake part seems to work but make stopped with an error. I also reinstalled libtiff but with no success.

[ 17%] Built target Common [ 24%] Built target Math [ 25%] Building CXX object libs/IO/CMakeFiles/IO.dir/ImageTIFF.cpp.o In file included from /Users/dimo/Downloads/2018-03-23/3D/3D-Workflow/OpenMVS/openMVS/libs/IO/ImageTIFF.cpp:8: In file included from /Users/dimo/Downloads/2018-03-23/3D/3D-Workflow/OpenMVS/openMVS/libs/IO/Common.h:18: In file included from /Users/dimo/Downloads/2018-03-23/3D/3D-Workflow/OpenMVS/openMVS/libs/IO/../Common/Common.h:176: In file included from /Users/dimo/Downloads/2018-03-23/3D/3D-Workflow/OpenMVS/openMVS/libs/IO/../Common/Types.h:425: /Users/dimo/Downloads/2018-03-23/3D/3D-Workflow/OpenMVS/openMVS/libs/IO/../Common/SML.h:29:21: warning: cannot delete expression with pointer-to-'void' type 'void *' [-Wdelete-incomplete] ~SMLVALUE_TYPE() { delete data; } ^ ~~~~ In file included from /Users/dimo/Downloads/2018-03-23/3D/3D-Workflow/OpenMVS/openMVS/libs/IO/ImageTIFF.cpp:21: In file included from /Library/Frameworks/UnixImageIO.framework/Headers/tiffio.h:33: /Library/Frameworks/UnixImageIO.framework/Headers/tiff.h:77:23: error: typedef redefinition with different types ('long' vs 'int64_t' (aka 'long long')) typedef TIFF_INT64_T int64; ^ /usr/local/include/opencv2/core/hal/interface.h:61:20: note: previous definition is here typedef int64_t int64; ^ In file included from /Users/dimo/Downloads/2018-03-23/3D/3D-Workflow/OpenMVS/openMVS/libs/IO/ImageTIFF.cpp:21: In file included from /Library/Frameworks/UnixImageIO.framework/Headers/tiffio.h:33: /Library/Frameworks/UnixImageIO.framework/Headers/tiff.h:78:23: error: typedef redefinition with different types ('unsigned long' vs 'uint64_t' (aka 'unsigned long long')) typedef TIFF_UINT64_T uint64; ^ /usr/local/include/opencv2/core/hal/interface.h:62:21: note: previous definition is here typedef uint64_t uint64; ^ 1 warning and 2 errors generated. make[2]: [libs/IO/CMakeFiles/IO.dir/ImageTIFF.cpp.o] Error 1 make[1]: [libs/IO/CMakeFiles/IO.dir/all] Error 2 make: *** [all] Error 2

gmorain commented 6 years ago

Hello, just adding my 2 cents : I went past the TIFF error by following this (and disabling TIFF support obviously). Now stuck a little later with symbol(s) not found for architecture x86_64...

snowzurfer commented 6 years ago

Have you tried building with Xcode instead?

SchmollTroll commented 6 years ago

I really have no clue how to do this in xcode !?!

luli-git commented 4 years ago

I really have no clue how to do this in xcode !?!

I finally was able to install it after an immense amount of trial and error. You should specify to complie it with generator Xcode and then build it using Xcode. I think the instructions for building it on Mac in the BUILDING.md and building wiki should maybe include this.

 cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -G "Xcode"

xcodebuild -configuration Release

I found this from https://www.instructables.com/id/Free-Photogrammetry-on-Mac-OS-From-Photos-to-3D-Mo/, after a series of failures using the original instructions.

cdcseacave commented 4 years ago

Thx for your help; I'll add that to the building wiki