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

cmd/go: go install buildmode=shared doesn't work without first building the standard library #12136

Open
aaronbee opened this Issue Aug 13, 2015 · 1 comment

Comments

Projects
None yet
4 participants
@aaronbee

aaronbee commented Aug 13, 2015

What version of Go are you using (go version)?
go1.5rc1

What operating system and processor architecture are you using?
linux 3.4 & amd64

What did you do?
'go install -buildmode=shared ./...' in my package directory

What did you expect to see?
Clean build of my package and a resulting shared library.

What did you see instead?
An error message:
multiple roots /home/aaronb/go/pkg/linux_amd64_dynlink & /home/aaronb/gosrc/pkg/linux_amd64_dynlink

I started a discussion on golang-nuts and was told that I need to build the standard library as a shared library first and then build my package, linking it to the standard library.

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Aug 13, 2015

@ianlancetaylor ianlancetaylor changed the title from buildmode=shared doesn't work without first building the standard library to cmd/go: go install buildmode=shared doesn't work without first building the standard library Aug 13, 2015

@rsc rsc modified the milestones: Go1.6Maybe, Go1.6 Dec 17, 2015

@rsc rsc modified the milestones: Unplanned, Go1.6Maybe Jan 6, 2016

@rhim

This comment has been minimized.

rhim commented Jul 27, 2016

@aaronbee @rsc any update here folks? Does this mean that I have to link against the shared object of both std and my library? Can I selectively choose which lib to link against statically (e.g., std) and which lib to link against dynamically (e.g mylib). Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment