Bundler icon indicating copy to clipboard operation
Bundler copied to clipboard

MakeFile errors.

Open guerrerocarlos opened this issue 10 years ago • 9 comments

First failed with this error:

2 warnings generated.
ar r libsfmdrv.a sfm.o
ar: creating archive libsfmdrv.a
cp libsfmdrv.a ..
cd lib/minpack; /Library/Developer/CommandLineTools/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

But I could fix it by modifying the Makefile, with gfortran instead of gcc, but now this error presents:

1 warning generated.
ar rs libcblas.a cblas_dgemm.o cblas_globals.o cblas_xerbla.o xerbla.o
cp libcblas.a ../
cd lib/f2c; /Library/Developer/CommandLineTools/usr/bin/make
make[1]: *** No rule to make target `signal1.h0', needed by `signal1.h'.  Stop.
make: *** [default] Error 2

Is there other recomended way to do it?

guerrerocarlos avatar Nov 11 '14 22:11 guerrerocarlos

Please use the cmake build as it is explained here: https://github.com/TheFrenchLeaf/Bundler/blob/master/Readme_Build.txt

pmoulon avatar Nov 12 '14 08:11 pmoulon

I'm getting a build error with the cmake build:

make [ 33%] Built target cminpack [ 47%] Built target imagelib [ 49%] Built target matrix [ 58%] Built target zlib [ 60%] Built target cblas Linking CXX executable Bundle2PMVS /usr/bin/c++ -fopenmp CMakeFiles/Bundle2PMVS.dir/Bundle2PMVS.cpp.o CMakeFiles/Bundle2PMVS.dir/LoadJPEG.cpp.o -o Bundle2PMVS -rdynamic ../lib/imagelib/libimagelib.a ../lib/matrix/libmatrix.a -ljpeg ../lib/zlib/libzlib.a -llapack ../lib/cblas/libcblas.a ../lib/cminpack/libcminpack.a -lgfortran /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.so: undefined reference to symbol 'dgemm_' //usr/lib/libblas.so.3: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [src/Bundle2PMVS] Error 1 make[1]: *** [src/CMakeFiles/Bundle2PMVS.dir/all] Error 2 make: *** [all] Error 2

minusreality avatar Dec 08 '14 09:12 minusreality

Resolved by adding -lblas to the end of:

src/CMakeFiles/Bundle2PMVS.dir/link.txt src/CMakeFiles/Bundler.dir/link.txt src/CMakeFiles/RadialUndistort.dir/link.txt

minusreality avatar Dec 08 '14 10:12 minusreality

Thanks for having shared your fix. Seems that on some platform the embedded cbls is sufficient and on some other blas is required.

pmoulon avatar Dec 08 '14 10:12 pmoulon

Upon compiling with USE_CERES=true, and following what is mentioned at https://github.com/TheFrenchLeaf/Bundler/blob/master/Readme_Build.txt I get the error

Linking CXX executable Bundle2PMVS
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/Bundle2PMVS.dir/Bundle2PMVS.cpp.o CMakeFiles/Bundle2PMVS.dir/LoadJPEG.cpp.o  -o Bundle2PMVS  ../lib/imagelib/libimagelib.a ../lib/matrix/libmatrix.a /usr/local/lib/libjpeg.dylib ../lib/zlib/libzlib.a -llapack ../lib/cblas/libcblas.a ../lib/cminpack/libcminpack.a -lgfortran
ld: library not found for -lgfortran

I tried after installing gfortran from

  • https://gcc.gnu.org/wiki/GFortranBinaries#MacOS

But still it gives the same error. What could be going wrong here?

pranny avatar May 08 '15 12:05 pranny

This Bundler version does not support CERES. Please use Noah Snavely Github Bundler: https://github.com/snavely/bundler_sfm

Or consider other SfM pipeline alternative like OpenMVG http://imagine.enpc.fr/~moulonp/openMVG/

pmoulon avatar May 08 '15 12:05 pmoulon

My mistake. I did not do USE_CERES in this version. However, even after that i am still getting that linking error. Any leads?

pranny avatar May 08 '15 12:05 pranny

I'm not a MACOS expert and I cannot help on this point. Have you tried the Noah Snavely repository version to see it builds better?

pmoulon avatar May 08 '15 12:05 pmoulon

@guerrerocarlos How were you able to resolve the invalid value 'f95' in '-x f95' issue?

pranny avatar May 08 '15 13:05 pranny