Unable to install under Mac OSX #104

Closed
opened 2014-07-28 12:39:35 -05:00 by mattes · 4 comments
mattes commented 2014-07-28 12:39:35 -05:00 (Migrated from github.com)
$ go get github.com/libgit2/git2go
# github.com/libgit2/git2go
Undefined symbols for architecture x86_64:
  "_git_blob_create_frombuffer", referenced from:
      __cgo_bc0973baa668_Cfunc_git_blob_create_frombuffer in blob.cgo2.o
     (maybe you meant: __cgo_bc0973baa668_Cfunc_git_blob_create_frombuffer)
  "_git_blob_create_fromchunks", referenced from:
      __go_git_blob_create_fromchunks in wrapper.o
     (maybe you meant: __cgo_bc0973baa668_Cfunc__go_git_blob_create_fromchunks, __go_git_blob_create_fromchunks )
  "_git_blob_rawcontent", referenced from:
      __cgo_bc0973baa668_Cfunc_git_blob_rawcontent in blob.cgo2.o
     (maybe you meant: __cgo_bc0973baa668_Cfunc_git_blob_rawcontent)
  "_git_blob_rawsize", referenced from:
      __cgo_bc0973baa668_Cfunc_git_blob_rawsize in blob.cgo2.o
     (maybe you meant: __cgo_bc0973baa668_Cfunc_git_blob_rawsize)


.... full output here: https://gist.github.com/mattes/2511e7f3210bc2ec3300 ....


ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ go version
go version go1.3 darwin/amd64

$ cmake --version
cmake version 3.0.0

$ pkg-config --version
0.28

Mac osx v. 10.9.4

``` $ go get github.com/libgit2/git2go # github.com/libgit2/git2go Undefined symbols for architecture x86_64: "_git_blob_create_frombuffer", referenced from: __cgo_bc0973baa668_Cfunc_git_blob_create_frombuffer in blob.cgo2.o (maybe you meant: __cgo_bc0973baa668_Cfunc_git_blob_create_frombuffer) "_git_blob_create_fromchunks", referenced from: __go_git_blob_create_fromchunks in wrapper.o (maybe you meant: __cgo_bc0973baa668_Cfunc__go_git_blob_create_fromchunks, __go_git_blob_create_fromchunks ) "_git_blob_rawcontent", referenced from: __cgo_bc0973baa668_Cfunc_git_blob_rawcontent in blob.cgo2.o (maybe you meant: __cgo_bc0973baa668_Cfunc_git_blob_rawcontent) "_git_blob_rawsize", referenced from: __cgo_bc0973baa668_Cfunc_git_blob_rawsize in blob.cgo2.o (maybe you meant: __cgo_bc0973baa668_Cfunc_git_blob_rawsize) .... full output here: https://gist.github.com/mattes/2511e7f3210bc2ec3300 .... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` ``` $ go version go version go1.3 darwin/amd64 $ cmake --version cmake version 3.0.0 $ pkg-config --version 0.28 ``` Mac osx v. 10.9.4
chr4 commented 2014-07-30 06:11:00 -05:00 (Migrated from github.com)

Same here. git bisect tells me, that aabeb7f585 breaks it. Before that go build runs just fine.

Same here. `git bisect` tells me, that aabeb7f585da1cf966191886eab732db0020a41a breaks it. Before that `go build` runs just fine.
carlosmn commented 2014-07-30 06:34:00 -05:00 (Migrated from github.com)

go get and go build cannot build libgit2 C code, which is embedded into git2go. Instead, there's a Makefile which takes care of building it and linking to it statically. See the README.md for the commands.

`go get` and `go build` cannot build libgit2 C code, which is embedded into git2go. Instead, there's a Makefile which takes care of building it and linking to it statically. See the README.md for the commands.
chr4 commented 2014-07-30 06:38:48 -05:00 (Migrated from github.com)

Perfect, works for me! Thanks.

Perfect, works for me! Thanks.
mattes commented 2014-08-05 20:45:31 -05:00 (Migrated from github.com)

Works for me, too. Thanks!

BUT I get a warning:

# github.com/libgit2/git2go
ld: warning: directory not found for option '-L/Users/mattes/Developer/go/src/github.com/libgit2/git2go/vendor/libgit2/install/lib'
# github.com/libgit2/git2go
ld: warning: directory not found for option '-L/Users/mattes/Developer/go/src/github.com/libgit2/git2go/vendor/libgit2/install/lib'

(see full build log here https://gist.github.com/mattes/6624b09f1e67778b642b)

This warning appears even when I go run sth.go:

# command-line-arguments
ld: warning: directory not found for option '-L/Users/mattes/Developer/go/src/github.com/libgit2/git2go/vendor/libgit2/install/lib'
Works for me, too. Thanks! BUT I get a warning: ``` # github.com/libgit2/git2go ld: warning: directory not found for option '-L/Users/mattes/Developer/go/src/github.com/libgit2/git2go/vendor/libgit2/install/lib' # github.com/libgit2/git2go ld: warning: directory not found for option '-L/Users/mattes/Developer/go/src/github.com/libgit2/git2go/vendor/libgit2/install/lib' ``` (see full build log here https://gist.github.com/mattes/6624b09f1e67778b642b) This warning appears even when I `go run sth.go`: ``` # command-line-arguments ld: warning: directory not found for option '-L/Users/mattes/Developer/go/src/github.com/libgit2/git2go/vendor/libgit2/install/lib' ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#104
No description provided.