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

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

Closed
aaronbee opened this issue Aug 13, 2015 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@aaronbee
Copy link

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 buildmode=shared doesn't work without first building the standard library 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
Copy link

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.

@bcmills
Copy link
Contributor

bcmills commented Jan 23, 2019

Still reproducible with go1.12beta2.

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 23, 2019
@seankhliao
Copy link
Member

Obsoleted by #47788

@golang golang locked and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

7 participants