snavely / bundler_sfm

Bundler Structure from Motion Toolkit
1.55k stars 483 forks source link

Build issues on Mac #29

Open pranny opened 9 years ago

pranny commented 9 years ago

While building on Mac, I faced following issues:

I have used ceres by setting USE_CERES=true

$ make
uname: illegal option -- o
usage: uname [-amnprsv]
cd lib/5point; /Applications/Xcode.app/Contents/Developer/usr/bin/make
make[1]: Nothing to be done for `all'.
cd lib/ann_1.1_char; /Applications/Xcode.app/Contents/Developer/usr/bin/make linux-g++-shared
cd src ; /Applications/Xcode.app/Contents/Developer/usr/bin/make linux-g++-shared
/Applications/Xcode.app/Contents/Developer/usr/bin/make targets \
    "ANNLIB = libANN_char.so" \
    "C++ = g++" \
    "CFLAGS = -g2 -fPIC" \
    "MAKELIB = g++ -shared -o " \
    "RANLIB = true"
make[3]: Nothing to be done for `targets'.
cd lib/imagelib; /Applications/Xcode.app/Contents/Developer/usr/bin/make
make[1]: Nothing to be done for `all'.
cd lib/matrix; /Applications/Xcode.app/Contents/Developer/usr/bin/make
make[1]: Nothing to be done for `all'.
cd lib/sba-1.5; /Applications/Xcode.app/Contents/Developer/usr/bin/make
make[1]: Nothing to be done for `all'.
cd lib/sfm-driver; /Applications/Xcode.app/Contents/Developer/usr/bin/make
make[1]: Nothing to be done for `all'.
cd lib/minpack; /Applications/Xcode.app/Contents/Developer/usr/bin/make
gcc -O2 -ffast-math  -c -o dpmpar.o dpmpar.f
error: invalid value 'f95' in '-x f95'
make[1]: *** [dpmpar.o] Error 1
make: *** [default] Error 2

How do I resolve this issue?

BDtheBD commented 9 years ago

You can change from gcc to gfortran in the minpack makefile, and that solves it. But then I got a problem with ld: ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation)

And this I have not been able to solve so far. Any ideas?