fix: ensure -zlazy for systems that default to -znow#1729
Conversation
Adds -zlazy to the go build wrapper and the 'go run' command for generating completions. Some systems like Gentoo default to znow if it is left unset. See: containers#1729 Signed-off-by: Alexandra Parker <alex.iris.parker@gmail.com>
59be97f to
73ed56e
Compare
|
Build failed. ❌ unit-test FAILURE in 1m 37s |
|
Ping. |
debarshiray
left a comment
There was a problem hiding this comment.
Thanks for looking into this, @xandris , and my apologies for the delay! I always shudder at this linker hackery. :)
| $tags \ | ||
| -trimpath \ | ||
| -ldflags "-extldflags '-Wl,-dynamic-linker,$dynamic_linker -Wl,-rpath,/run/host$libc_dir_canonical_dirname -Wl,--export-dynamic -Wl,--unresolved-symbols=ignore-in-object-files' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$4" \ | ||
| -ldflags "-extldflags '-Wl,-z,lazy,-dynamic-linker,$dynamic_linker,-rpath,/run/host$libc_dir_canonical_dirname,--export-dynamic,--unresolved-symbols=ignore-in-object-files' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$4" \ |
There was a problem hiding this comment.
I suspect we have a typo here that explains the CI failures.
Shouldn't it be -Wl,-dynamic-linker,$dynamic_linker -Wl,-z,lazy?
There was a problem hiding this comment.
it's okay to stack up linker arguments in -Wl. the commas just separate successive argv elements that ld receives, so it's not necessary to have multiple -Wl flags... but it doesn't hurt either
i think the problem was actually a missing comma in my change to src/meson_generate_completions.py! that caused Python to concatenate the lazy with the . that was intended for go run. sorry about that
|
recheck |
debarshiray
left a comment
There was a problem hiding this comment.
It looks like this fixes #1706 Could you please link to the issue instead of the PR in the commit message?
Adds -zlazy to the go build wrapper and the 'go run' command for generating completions. Some systems like Gentoo default to znow if it is left unset. See: containers#1706 Signed-off-by: Alexandra Parker <alex.iris.parker@gmail.com>
73ed56e to
8811838
Compare
I see #1706 and #1722. this is more minimal change for systems that default to znow