Kagami/go-face

Macos compilation

Closed this issue · 1 comments

I was trying to build on mac and it threw some errors build errors due to missing symbols, which I was able to fix by modifying ldflags. Maybe we can add it to readme.
Steps

  1. install dlib using homebrew
  2. Modify face.go to add the blas and lapack dependencies
// #cgo LDFLAGS: -ljpeg -lblas -llapack

PS: I think you have these 2 dependencies in the pkgconfig file on linux, but I find it easier to add here than to modify pkgconfig.

Hi. Thanks, I added it to readme.

Not sure how to deal with pkgconfig issues best. It provides convenient cross-distributive set of flags, on the other hand on many systems dlib's pkgconfig is not complete and misses required libraries.

We can't add -lblas -llapack to source code because some may use e.g. -lopenblas instead… Debian has update-alternatives mechanism for that, but it's not cross-distributive again.