go-face icon indicating copy to clipboard operation
go-face copied to clipboard

Building with MacOSX 11

Open golanshy opened this issue 4 years ago • 3 comments

Running through your instructions I get the following error: sed: /usr/local/lib/pkgconfig/dlib-1.pc: in-place editing only works for regular files

after that tring to build I get an error: go build github.com/Kagami/go-face: invalid flag in pkg-config --libs: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libz.tbd

Any help will be appreciated.

golanshy avatar Nov 24 '20 19:11 golanshy

I have the same problem...

imishinist avatar Jan 30 '21 19:01 imishinist

I think this may be fixed by: https://github.com/Kagami/go-face/commit/4c3eb8d32ca816fdf71e514cde1047f7eaf916dc which removes the requirement of pkg-config.

After installing dlib with brew install dlib on macOS 11.1, pkg-config shows .tbd files in the output:

$ pkg-config --cflags --libs dlib-1
-I/usr/local/Cellar/dlib/19.21/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -L/usr/local/Cellar/dlib/19.21/lib -ldlib /usr/local/lib/libpng.dylib /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libz.tbd /usr/local/lib/libjpeg.dylib /usr/local/opt/openblas/lib/libopenblas.dylib /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libsqlite3.tbd

golang prohibits unrecognized linker flags, and does not currently match .tbd https://github.com/golang/go/blob/c7233dd063cd8bf24460b280e3929458e64f4315/src/cmd/go/internal/work/security.go#L211

I believe that is the cause of the error.

But https://github.com/Kagami/go-face/commit/4c3eb8d32ca816fdf71e514cde1047f7eaf916dc changes the cgo flags to no longer rely on pkg-config, so I think this may be resolved.

kevinAlbs avatar Feb 15 '21 00:02 kevinAlbs

I updated to the latest version and was able to build it. I think the problem has already been solved for me too.

imishinist avatar Mar 01 '21 10:03 imishinist

No interest

golanshy avatar Feb 24 '24 13:02 golanshy