Closed jyutzler closed 8 years ago
More diagnostics: I tried to "build" gogeos. but go build ./...
exits quietly. It wasn't until I tried go test
that I got anywhere.
JeffYutzler$ go test ./...
# github.com/paulsmith/gogeos/geos
In file included from geos/coordseq.go:4:
./geos.h:1:10: fatal error: 'geos_c.h' file not found
#include <geos_c.h>
^
1 error generated.
FAIL github.com/paulsmith/gogeos/geos [build failed]
There is geos_c.h in /usr/local/include
and that is the only copy in the filesystem. There is no /usr/include
directory. A call to cpp -v
lists the nonexistent /usr/include
and does not list /usr/local/include
. When I did export CPATH=/usr/local/include
that got /usr/local/include
onto the cpp list and got me past the missing header error and led to the first error message in the parent post.
There is no library called geos.*. In /usr/local/lib
there are a bunch of things like libgeos.a, libgeos_c.a, libgeos_c.dylib, etc.
JeffYutzler$ clang -v
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Naturally there is nothing relevant in the /Applications/... directory.
SOLUTION:
export LIBRARY_PATH=/usr/local/lib
export CPATH=/opt/homebrew/Cellar/geos/3.10.2/include/
helped me solve the issue.
I am getting the following error when trying to build:
/usr/local/Cellar/go/1.5.3/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1 ld: library not found for -lgeos_c clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is probably user error of some sort, but I can't work out what I could have done to cause it. I'm on El Capitan.
Steps I've taken today:
go get github.com/paulsmith/gogeos/geos
go build
Other things I have done:
Any suggestions on how I can proceed here?