cmd/link: buildmode=shared with many packages produces "file name too long" error #38330
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I want to build a shared library with a subset of the standard library, but many packages. This is the command I'm using, which seems to be the appropriate way to attempt this according to "go help buildmode".
This is the failure I get:
What did you expect to see?
This to succeed and produce a library file.
What did you see instead?
"File name too long" error. The problem is the package names are all concatenated into the file name, which bloats up quickly. I can manually work around this with "go tool link" but is there a more canonical way?
More context:
I want to split a large executable into plugins to reduce memory footprint at run time under certain circumstances. The plan is:
The text was updated successfully, but these errors were encountered: