Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building the gitlab image fails #172

Open
RobinVanCauter opened this issue Oct 5, 2016 · 1 comment
Open

Building the gitlab image fails #172

RobinVanCauter opened this issue Oct 5, 2016 · 1 comment

Comments

@RobinVanCauter
Copy link

RobinVanCauter commented Oct 5, 2016

I've installed libgit2, I've setup LD_LIBRARY_PATH and running ld -v -lgit2 tells me the compiler is able to find it at /usr/local/lib/libgit2.so.

But when I run make build-gitlab or build/spread-linux-static gcc seems to fail.

I've not meddled around with Go before, so I might be missing something obvious here?

GOOS=linux go build -o build/spread-linux-static -i -v -ldflags "-X main.Version=v0.0.0 -extldflags "-static" --s -w" rsprd.com/spread/cmd/spread
rsprd.com/spread/cmd/spread
# rsprd.com/spread/cmd/spread
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lgit2
/tmp/go-link-587612200/000003.o: In function `mygetgrouplist':
/tmp/workdir/go/src/os/user/getgrouplist_unix.go:15: warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-587612200/000003.o: In function `mygetgrgid_r':
/tmp/workdir/go/src/os/user/lookup_unix.go:38: warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-587612200/000003.o: In function `mygetgrnam_r':
/tmp/workdir/go/src/os/user/lookup_unix.go:43: warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-587612200/000003.o: In function `mygetpwnam_r':
/tmp/workdir/go/src/os/user/lookup_unix.go:33: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-587612200/000003.o: In function `mygetpwuid_r':
/tmp/workdir/go/src/os/user/lookup_unix.go:28: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-587612200/000002.o: In function `_cgo_7a2d42f1a351_C2func_getaddrinfo':
/tmp/workdir/go/src/net/cgo_unix.go:66: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status

Makefile:100: recipe for target 'build/spread-linux-static' failed
make: *** [build/spread-linux-static] Error 2
@acaire
Copy link

acaire commented Feb 3, 2017

I'm running OSX and managed to get a build by adding -DBUILD_SHARED_LIBS=0 to the existing cmake flags in hack/build-libgit2.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants