Summary: | app-portage/portage-utils static USE flag does not create a static q binary | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | genBTC |
Component: | Current packages | Assignee: | Fabian Groffen <grobian> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sam |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/gentoo/portage-utils/pull/17 | ||
See Also: | https://github.com/gentoo/gentoo/pull/27044 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log with static USE flag - did not produce static binary
emerge --info recent patch does not solve. build.log showing no -static |
Description
genBTC
2022-05-01 02:32:06 UTC
Created attachment 775715 [details]
build.log with static USE flag - did not produce static binary
(I always print the ./configure --help in my /etc/portage/bashrc)
Other than that, its a very normal default build with static use flag.
For completeness, please include emerge --info. Created attachment 775721 [details]
emerge --info
from the system the build.log is from.
the bug is confirmed on a 3rd system also.
I don't see the static libtool mode kicking in either, clueless at the moment as to why can you try this: diff --git a/Makefile.am b/Makefile.am index 90c868b..b9f7729 100644 --- a/Makefile.am +++ b/Makefile.am @@ -86,6 +86,7 @@ q_LDADD = \ $(LIB_EACCESS) \ $(SENDFILE_LIBS) \ $(NULL) +q_LDFLAGS = $(LDFLAGS_EXEC) if QMANIFEST_ENABLED q_SOURCES += qmanifest.c diff --git a/configure.ac b/configure.ac index 013e831..344516b 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,13 @@ AC_DEFINE_UNQUOTED([CONFIG_EPREFIX], ["$with_eprefix"], [Gentoo Prefix offset path]) AC_SUBST([CONFIG_EPREFIX], ["$with_eprefix"]) +AC_ARG_ENABLE([static-bin], [AS_HELP_STRING([--enable-static-bin], + [link static q executable])]) +if test "x${enable_static_bin}" = xyes ; then + LDFLAGS_EXEC="-static" +fi +AC_SUBST([LDFLAGS_EXEC]) + AC_ARG_ENABLE([qmanifest], [AS_HELP_STRING([--enable-qmanifest], [support qmanifest applet])], [], [enable_qmanifest=auto]) (autoreconf and then ./configure --enable-static-bin) Created attachment 799991 [details]
recent patch does not solve. build.log showing no -static
The last patch for adding the --enable-static-bin option did not actually produce a static binary.
I have ensured the patch merged as you intended, but with no result.
I have tested recent portage-utils 0.94.1 now too and uploaded the build.log.
# file /usr/bin/q
/usr/bin/q: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1ad6040d95a9c8733cec4388ac6cb3c73e8ddf0d commit 1ad6040d95a9c8733cec4388ac6cb3c73e8ddf0d Author: David Seifert <soap@gentoo.org> AuthorDate: 2022-08-28 11:40:31 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2022-08-28 11:51:06 +0000 Remove libtool * Libtool was only used for convenience libraries, which can be done in vanilla Automake. This allows passing `static` in LDFLAGS. Bug: https://bugs.gentoo.org/841898 Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Fabian Groffen <grobian@gentoo.org> Makefile.am | 2 +- configure.ac | 3 +-- libq/Makefile.am | 6 +++--- tests/atom_explode/Makefile.am | 2 +- tests/copy_file/Makefile.am | 2 +- tests/mkdir/Makefile.am | 2 +- tests/rmspace/Makefile.am | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=152cba16dd90e36b4e8abd4c4445adee321a37d3 commit 152cba16dd90e36b4e8abd4c4445adee321a37d3 Author: David Seifert <soap@gentoo.org> AuthorDate: 2022-08-28 21:42:45 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2022-08-28 21:42:45 +0000 app-portage/portage-utils: add 0.94.2 Closes: https://bugs.gentoo.org/867076 Bug: https://bugs.gentoo.org/841898 Signed-off-by: David Seifert <soap@gentoo.org> app-portage/portage-utils/Manifest | 1 + .../portage-utils/portage-utils-0.94.2.ebuild | 75 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) 0.94.2 should do it with -static in LDFLAGS. |