Giter Site home page Giter Site logo

build issue on OSX about cyflann HOT 4 CLOSED

djsutherland avatar djsutherland commented on May 30, 2024
build issue on OSX

from cyflann.

Comments (4)

djsutherland avatar djsutherland commented on May 30, 2024

This looks a lot like #11, though apparently you're on OSX so not precisely the same problem.

  • How is flann installed, and what version?
  • Can you post the output of pkg-config --libs flann and otool -L /Users/wgmueller/anaconda/envs/py-sdm2/lib/python2.7/site-packages/cyflann/index.so?

from cyflann.

wgmueller1 avatar wgmueller1 commented on May 30, 2024

I installed flann by brew install flann ... the version is 1.8.4.

pkg-config --libs flann
-L/usr/local/Cellar/flann/1.8.4/lib -lflann_cpp

otool -L /Users/wgmueller/anaconda/envs/py-sdm2/lib/python2.7/site-packages/cyflann/index.so

/usr/local/lib/libflann_cpp.1.8.4.dylib (compatibility version 1.8.0, current version 1.8.4)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0)

from cyflann.

djsutherland avatar djsutherland commented on May 30, 2024

Yeah, okay, it is actually the same problem as #11 then. There hasn't been a flann release since flann-lib/flann@0fba4ec, which fixed this problem. I guess the flann formula doesn't have a HEAD reference either.

The way I have it installed is: I added the line head 'https://github.com/dougalsutherland/flann.git', :branch => 'conditional-openmp' to the initial block of /usr/local/Library/Formula/flann.rb (just after the sha1 line), and installed with brew install flann --HEAD --use-gcc (you may need to brew uninstall flann first). That uses my fork of flann that works around a conflict with py-sdm's use of OpenMP, and compiles with gcc to get OpenMP support in flann (which py-sdm sometimes wants).

You could also use the official repository for flann with head 'https://github.com/mariusmuja/flann.git' instead, and install without --use-gcc (so it uses the system-default clang, which doesn't have OpenMP support at all). py-sdm does sometimes assume flann has multithreading support built in, though, so if you're using non-tiny datasets you'll probably have the best experience with the other approach.

Let me know how your experience with py-sdm goes!

from cyflann.

djsutherland avatar djsutherland commented on May 30, 2024

Note that this problem can be worked around now in two easier ways:

  • set the environment variable FLANN_DIR to eg /usr/local before running setup.py. This avoids using pkg-config and allows flann 1.8.4 to be used (though it doesn't address the OpenMP issues).
  • use the conda package manager and follow the instructions in the py-sdm readme to install py-sdm and its dependencies, including flann/cyflann, from a binary distribution. I compiled that with gcc-4.8 so the OpenMP issues are addressed.

from cyflann.

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.