[opensuse-go] OBS build fails with "flag provided but not defined: -s"
Hello, I noticed today some of my Go packages's build have failed in OBS with the following error: [ 32s] + go install -s -v -p 4 -x -buildmode=pie github.com/prometheus/promu [ 32s] flag provided but not defined: -s Example: https://build.opensuse.org/package/live_build_log/systemsmanagement:sumaform... Any ideas about what is wrong here? Thanks in advance, -- Silvio Moioli SUSE Manager Development Team -- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
Hi Silvio, sorry I don't know what could be wrong, but you may want to try to build with a different version of go, for example go1.9, to see if the issue is in the latest package. regards On 05/24/2018 11:49 AM, Silvio Moioli wrote:
Hello,
I noticed today some of my Go packages's build have failed in OBS with the following error:
[ 32s] + go install -s -v -p 4 -x -buildmode=pie github.com/prometheus/promu [ 32s] flag provided but not defined: -s
Example:
https://build.opensuse.org/package/live_build_log/systemsmanagement:sumaform...
Any ideas about what is wrong here?
Thanks in advance,
-- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
On 05/25/2018 12:58 PM, Jordi Massaguer Pla wrote:
Hi Silvio,
sorry I don't know what could be wrong, but you may want to try to build with a different version of go, for example go1.9, to see if the issue is in the latest package.
I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something. Thanks, -- Silvio Moioli SUSE Manager Development Team -- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
On 2018-05-28, Silvio Moioli
sorry I don't know what could be wrong, but you may want to try to build with a different version of go, for example go1.9, to see if the issue is in the latest package. I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something.
-s means strip. For a variety of reasons, GNU strip has caused Go binaries to break in the past. However, I'm not sure that -s works with 'go install' (we use it for go build though). -- Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH https://www.cyphar.com/
On 05/28/2018 02:35 PM, Aleksa Sarai wrote:
-s means strip. For a variety of reasons, GNU strip has caused Go binaries to break in the past. However, I'm not sure that -s works with 'go install' (we use it for go build though).
OK, so `-s` is a linker flag (`go tool link`). I still did not figure out why `go install` used to pass this parameter to the linker and since 1.10 that does not happen any more, anyway I suggest we simply use the self-explainatory `-ldflags` flag instead: https://github.com/openSUSE/golang-packaging/pull/20/files Jordi: can you take a look and perhaps merge this? I tested it locally and my build does not fail any more. I suspect a lot of packages are currently affected. Thanks, -- Silvio Moioli SUSE Manager Development Team
On 05/28/2018 02:35 PM, Aleksa Sarai wrote:
On 2018-05-28, Silvio Moioli
wrote: sorry I don't know what could be wrong, but you may want to try to build with a different version of go, for example go1.9, to see if the issue is in the latest package. I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something. -s means strip. For a variety of reasons, GNU strip has caused Go binaries to break in the past. However, I'm not sure that -s works with 'go install' (we use it for go build though).
:) We just created the same PR. We are packaging it right now. Thanks Silvio jordi -- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
On 05/29/2018 12:13 PM, Jordi Massaguer Pla wrote:
On 05/28/2018 02:35 PM, Aleksa Sarai wrote:
On 2018-05-28, Silvio Moioli
wrote: sorry I don't know what could be wrong, but you may want to try to build with a different version of go, for example go1.9, to see if the issue is in the latest package. I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something. -s means strip. For a variety of reasons, GNU strip has caused Go binaries to break in the past. However, I'm not sure that -s works with 'go install' (we use it for go build though).
:) We just created the same PR.
We are packaging it right now.
Thanks Silvio
jordi
updated in obs://devel:languages:go submitted to factory: https://build.opensuse.org/request/show/612827 -- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
On 05/29/2018 12:46 PM, Jordi Massaguer Pla wrote:
On 05/29/2018 12:13 PM, Jordi Massaguer Pla wrote:
On 05/28/2018 02:35 PM, Aleksa Sarai wrote:
On 2018-05-28, Silvio Moioli
wrote: sorry I don't know what could be wrong, but you may want to try to build with a different version of go, for example go1.9, to see if the issue is in the latest package. I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something. -s means strip. For a variety of reasons, GNU strip has caused Go binaries to break in the past. However, I'm not sure that -s works with 'go install' (we use it for go build though).
:) We just created the same PR.
We are packaging it right now.
Thanks Silvio
jordi
updated in obs://devel:languages:go
submitted to factory:
This fix breaks building for go1.9. I've opened an issue upstream: https://github.com/golang/go/issues/25648 -- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
On 05/28/2018 11:07 AM, Silvio Moioli wrote:
On 05/25/2018 12:58 PM, Jordi Massaguer Pla wrote:
Hi Silvio,
sorry I don't know what could be wrong, but you may want to try to build with a different version of go, for example go1.9, to see if the issue is in the latest package.
I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something.
Thanks,
Hi Silvio, we just faced the same issue when building flannel. -- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
On 05/28/2018 11:07 AM, Silvio Moioli wrote:
I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something.
Self-responding: -s was added by an openSUSE-specific patch, that's why it did not show up in official Go documentation or source code. Either we forward-port this patch to go 1.10 or we find another workaround, I guess. https://build.opensuse.org/package/view_file/devel:languages:go/go1.9/go-1.5... See line 34. Hth, -- Silvio Moioli SUSE Manager Development Team -- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
Fixed in: https://github.com/openSUSE/golang-packaging/pull/25 Please review On 05/31/2018 08:07 AM, Silvio Moioli wrote:
On 05/28/2018 11:07 AM, Silvio Moioli wrote:
I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something. Self-responding: -s was added by an openSUSE-specific patch, that's why it did not show up in official Go documentation or source code. Either we forward-port this patch to go 1.10 or we find another workaround, I guess.
https://build.opensuse.org/package/view_file/devel:languages:go/go1.9/go-1.5...
See line 34.
Hth,
-- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
Submit request to Factory: https://build.opensuse.org/request/show/613321 Thanks to Silvio for reporting this and finding out what was wrong exactly :) Kudos to Darix for discovering that the previous fix was breaking go1.9 builds. On 05/31/2018 01:11 PM, Jordi Massaguer Pla wrote:
Fixed in:
https://github.com/openSUSE/golang-packaging/pull/25
Please review
On 05/31/2018 08:07 AM, Silvio Moioli wrote:
On 05/28/2018 11:07 AM, Silvio Moioli wrote:
I confirm the problem only appears with go 1.10, go 1.9 compiles fine. I really wonder where that "-s" flag comes from and what it means - I can't find any documentation about it, not even for go 1.9. I even looked at sources but I must miss something. Self-responding: -s was added by an openSUSE-specific patch, that's why it did not show up in official Go documentation or source code. Either we forward-port this patch to go 1.10 or we find another workaround, I guess.
https://build.opensuse.org/package/view_file/devel:languages:go/go1.9/go-1.5...
See line 34.
Hth,
-- To unsubscribe, e-mail: opensuse-go+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-go+owner@opensuse.org
participants (3)
-
Aleksa Sarai
-
Jordi Massaguer Pla
-
Silvio Moioli