"go libraries" I mean 3rd party go modules/projects like %{go_archdir}/github.com/shurcooL/sanitized_anchor_name.a I didn't read too many golang books, so if my saying is wrong, correct me please. For C I think static library is also library.
Okay, so the issue is that as far as I'm aware the Go compiler doesn't currently (officially) support using static libraries in this way. The way that we currently package static libraries is quite a bit of a hack, if you read the RFC for adding the ability to have proper static libraries with Go[1].
That is what I want to show you guys:
the things compiled with different versions of go can't be used to build further things with this version of go.
So the ABI consistence is a must. What do you think?
I'm not sure I actually understand what packages actually go through in OBS when building a Go program. I'll have to look -- because it looks like you're doing some hacks to get Go to use precompiled .a files. Currently this is not fully supported AFAIK and I remember seeing an RFC about making this an official thing.
And I would like to know why you guys didn't want "Requires: golang(API) = 1.6" there? Because compiled stuff doesn't need to runtime require golang itself? That is, Can I uninstall go package without breaking my existing go compiled binaries?
This is a slightly complicated question to answer. Traditionally, Go was completely statically compiled, so you don't need anything other than the binary itself. Unfortunately, this made things complicated and caused bugs with libc when you wanted to use DNS resolution functions. So if your binary doesn't use any network-related functions (and none of it's dependencies do), it will be entirely statically compiled. However, if your binary is not _entirely_ statically compiled all of the Go code *will* be statically compiled no matter what. The only question is whether or not some C libraries will be statically compiled into your code or not (this gets even more complicated with cgo). But all of this is handled by OBS already (it does and `ldd` of the binary to figure out what libraries the binary is using and then adds implict Requires to the final package). -- Aleksa Sarai Software Engineer (Containers) SUSE Linux GmbH https://www.cyphar.com/ -- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org