cmd/go: Building a shared library in modules mode produces empty library #37675
Labels
FrozenDueToAge
modules
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?
Tried to build a shared library and a binary that links to that shared library in modules mode. A repository with reproducer: https://github.com/misha-ridge/splitlib
Packages:
github.com/misha-ridge/splitlib/a
(imports ./c)github.com/misha-ridge/splitlib/b
(imports ./c)github.com/misha-ridge/splitlib/c
github.com/misha-ridge/splitlib
(imports ./a, ./b, ./c)./a
and./c
ought to end up in a shared library,./b
andsplitlib
in binary.Build:
What did you expect to see?
libgithub.com-misha-ridge-splitlib-a.so
with code from./a
and./c
packages, dynamically linking tostd
.splitlib
binary with code from./b
andsplitlib
, dynamically linking tostd
andlibgithub.com-misha-ridge-splitlib-a.so
.What did you see instead?
libgithub.com-misha-ridge-splitlib-a.so
is empty:splitlib
contains code from./a
,./b
,./c
andsplitlib
and dynamically links only tostd
:Additional info
Trying to build the same using Go 1.13 triggers #35759.
The text was updated successfully, but these errors were encountered: