Giter Site home page Giter Site logo

Comments (11)

paulinus avatar paulinus commented on May 22, 2024

thanks for reporting. I have no osx 10.9 close to debug. According to this, it seems related to clang using libstdc++.

Can you try compiling with the option -stdlib=libc++ ?

from opensfm.

chenosaurus avatar chenosaurus commented on May 22, 2024

hmm, a different error that doesn't really make sense ;( Running that command directly works tho. It only fails when running thru "python setup.py build_ext --inplace"

running build_ext
building 'opensfm.csfm' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/eigen3 -Iopensfm/src/third_party -Iopensfm/src/third_party/akaze/lib -Iopensfm/src/third_party/vlfeat -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c opensfm/src/csfm.cc -o build/temp.macosx-10.6-intel-2.7/opensfm/src/csfm.o -stdlib=libc++
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
error: command '/usr/bin/clang' failed with exit status 1

from opensfm.

paulinus avatar paulinus commented on May 22, 2024

It seems the -std=c++11 is missing on the last command. Try using both -std=c++11 and -stdlib=libc++

from opensfm.

chenosaurus avatar chenosaurus commented on May 22, 2024

I updated setup.py ln 107 to be:
extra_compile_args=['-std=c++11', '-stdlib=libc++'],

still getting same error.

$ python setup.py build_ext --inplace
running build_ext
building 'opensfm.csfm' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/eigen3 -Iopensfm/src/third_party -Iopensfm/src/third_party/akaze/lib -Iopensfm/src/third_party/vlfeat -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c opensfm/src/csfm.cc -o build/temp.macosx-10.6-intel-2.7/opensfm/src/csfm.o -std=c++11 -stdlib=libc++
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
error: command '/usr/bin/clang' failed with exit status 1

from opensfm.

chenosaurus avatar chenosaurus commented on May 22, 2024

Perhaps OS X is not the best env for working on this, I will try this in linux

from opensfm.

paulinus avatar paulinus commented on May 22, 2024

We do use OS X, should be no problem. It is weird that running the compilation line manually works, and not within setup.py. Can you try building with cmake?

from opensfm.

chenosaurus avatar chenosaurus commented on May 22, 2024

This fixed the issue:

extra_compile_args=['-std=c++11', '-stdlib=libc++', '-mmacosx-version-min=10.7'],

now hitting a missing library, should be easier to fix:

/usr/bin/clang++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/opensfm/src/csfm.o -L/usr/local/lib -Lbuild/temp.macosx-10.6-intel-2.7 -lceres -lglog -lgflags -lboost_python -lvl -lmv -lakaze -o /Users/dchen/workspace/3rd-party/OpenSfM/opensfm/csfm.so
ld: library not found for -lvl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang++' failed with exit status 1

from opensfm.

chenosaurus avatar chenosaurus commented on May 22, 2024

Do you have any information on installing visualization library in os x?

from opensfm.

paulinus avatar paulinus commented on May 22, 2024

So vl is one of the static libraries generated by setup.py itself. Should be build when running

python setup.py build_clib

before

python setup.py build_ext --inplace

from opensfm.

chenosaurus avatar chenosaurus commented on May 22, 2024

Ah gotcha, got it built, thank you for the assistance!

from opensfm.

paulinus avatar paulinus commented on May 22, 2024

Cool, I've added the flags. Thanks for reporting!

from opensfm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.