Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#56542 - [go] can't compile with the -linkshared option

Attached to Project: Arch Linux
Opened by David Raymond (djraymondnm) - Saturday, 02 December 2017, 18:47 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Sunday, 10 December 2017, 14:42 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
In Google's go compiler, compiling a go program with the -linkshared option fails. Without this option, binaries are very large (~2 MB for "hello world"). I found the solution at

https://stackoverflow.com/questions/1757090/shared-library-in-go

Basically, go system routines need themselves to be compiled correctly using the command

go install -buildmode=shared -linkshared std

This only needs to be done once, at least until an updated version of the go package is installed. However, it needs to be done as root, as the output goes into /usr/lib/go/pkg.

It would be desirable to do this compile as a part of the install, so the user wouldn't have to figure this out.

The current go package is go 2:1.9.2-2.
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Sunday, 10 December 2017, 14:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  go 2:1.9.2-3
Comment by Bartłomiej Piotrowski (Barthalion) - Saturday, 02 December 2017, 19:26 GMT
  • Field changed: Summary (In the go compiler, can't compile with the -linkshared option → [go] can't compile with the -linkshared option)
  • Field changed: Status (Unconfirmed → Assigned)
  • Task assigned to Bartłomiej Piotrowski (Barthalion)
Yes, that's one of the issues making our go package considered "tainted" in comparison to upstream's packaging. I will take care of this.

Loading...