What are the alternatives?
I need binary-only packages for packages that use cgo with non-standard environment variable values.
I have a package with C and Go files. I want to install that package. Then I want to import that package into a program, and build that program without recompiling the package. Because recompile fails.
How do I do that? This was an issue before, and the provided solution: after installation, mark the source as binary-only. That is a bit of a pain, but it works.
Starting with Go 1.13, Go is going to make its users work more difficult again. Why?
I just want to install a package and use it, without having to worry about external stuff.
This is not an option.
> The reason for the change is that binary packages are hard to support
correctly. There are many ways to modify how Go code is compiled,
with options like -buildmode and -gcflags. If those options do not
match exactly how the binary package was built, it's easy for there to
be a silent error in the resulting program. That is not a good
The only thing that changes in our situation is the location of dynamic libraries. Is there any way to specify at installation time where packages should look for resources? Or what options to use when importing the package?
go get -L /opt/foo/lib -I /opt/foo/include -Wl,-rpath=/opt/foo/lib github.com/some/gofoo
And then Go would know to add those options whenever it needs to compile the package?