Summary: | app-portage/portage-utils-0.94.3[qmanifest, static]: undefined reference to `gpgrt_lock_unlock' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | Fabian Groffen <grobian> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | b4b1, base-system, soap |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 876889 | ||
Attachments: | build.log |
Description
Sam James
![]() ![]() ![]() ![]() The build is missing -lgpg-error and -lassuan. But only libgpg-error is available as a static library, libassuan does not even provide the option to build statically in the ebuild. After building and installing a static libassuan.a: root@store:/var/tmp/portage/app-portage/portage-utils-0.94.3/work/portage-utils-0.94.3 # x86_64-pc-linux-gnu-gcc -Wall -O2 -march=nocona -mtune=core2 -fomit-frame-pointer -Wunused -Wimplicit -Wshadow -Wformat=2 -Wmissing-declarations -Wwrite-strings -Wbad-function-cast -Wnested-externs -Wcomment -Winline -Wchar-subscripts -Wcast-align -Wsequence-point -Wold-style-definition -Wextra -Wno-format-nonliteral -Wno-expansion-to-defined -Wl,-O1 -Wl,--as-needed -static -o q q-main.o q-q.o q-qatom.o q-qcheck.o q-qdepends.o q-qfile.o q-qgrep.o q-qkeyword.o q-qlist.o q-qlop.o q-qmerge.o q-qpkg.o q-qsearch.o q-qsize.o q-qtbz2.o q-quse.o q-qwhich.o q-qxpak.o q-qmanifest.o q-qtegrity.o ./libq/libq.a ./autotools/gnulib/libgnu.a -fopenmp -lcrypto -lb2 -lz -lgpgme -lgpg-error -lassuan /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/libgomp.a(oacc-profiling.o): in function `goacc_profiling_initialize': (.text+0x824): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../lib64/libgpg-error.a(libgpg_error_la-sysutils.o): in function `_gpgrt_getpwdir': (.text+0x2da): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x2f8): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking root@store:/var/tmp/portage/app-portage/portage-utils-0.94.3/work/portage-utils-0.94.3 # ls -l q -rwxr-xr-x 1 root root 2483952 Nov 7 22:09 q root@store:/var/tmp/portage/app-portage/portage-utils-0.94.3/work/portage-utils-0.94.3 # ./q usage: q <applet> <args> : invoke a portage utility applet currently defined applets: q <applet> <args> : virtual applet qatom <pkg> : split atom strings qcheck <pkgname> : verify integrity of installed packages qdepends <pkgname> : show dependency info qfile <filename> : list all pkgs owning files qgrep <expr> [pkg ...]: grep in ebuilds qkeyword <action> <args> : list packages based on keywords qlist <pkgname> : list files owned by pkgname qlop <pkgname> : emerge log analyzer qmanifest <misc args> : verify or generate thick Manifest files qmerge <pkgnames> : fetch and merge binary package qpkg <misc args> : create or manipulate Gentoo binpkgs qsearch <regex> : search pkgname/desc qsize <pkgname> : calculate size usage qtbz2 <misc args> : manipulate tbz2 packages qtegrity <misc args> : verify files with IMA quse <useflag> : find pkgs using useflags qwhich <pkg ...> : find path to pkg qxpak <misc args> : manipulate xpak archives options: -[ioemvqChV] -i, --install * Install symlinks for applets -o, --overlays * Print available overlays (read from repos.conf) -e, --envvar * Print used variables and their found values -m, --masks * Print (package.)masks for the current profile --root <arg> * Set the ROOT env var -v, --verbose * Report full package versions, emit more elaborate output -q, --quiet * Tighter output; suppress warnings -C, --nocolor * Don't output color --color * Force color in output -h, --help * Print this help and exit -V, --version * Print version and exit root@store:/var/tmp/portage/app-portage/portage-utils-0.94.3/work/portage-utils-0.94.3 # ldd q not a dynamic executable I wonder if we should restrict static not to allow qmanifest in that case. How is static enabled these days, I thought the USE-flag was dropped. (In reply to Fabian Groffen from comment #3) > I wonder if we should restrict static not to allow qmanifest in that case. > How is static enabled these days, I thought the USE-flag was dropped. USE-flag here. For me, the question was: is this a regression in 0.94.3? (It looks like) then is this supposed to work at all? was it ever tested by the authors? (I really doubt that, as it does not compile without libassuan.a, and that thing is simply not produced by the ebuild without change) Static usage is not very often tested. The issue likely was exposed when qmanifest was added (which requires gnupg support via gpgme). Feels like we need a static-libs on libassuan, which apparently isn't required by app-crypt/gpgme[static-libs]. gpgme needs gpgrt_lock_unlock, but it can't find it. Cc-ing gpgme maintainer, perhaps they have an idea how to resolve this elegantly. That said, what does `pkg-config gpgme --libs` return for you? (In reply to Fabian Groffen from comment #5) > Static usage is not very often tested. The issue likely was exposed when > qmanifest was added (which requires gnupg support via gpgme). Feels like we > need a static-libs on libassuan, which apparently isn't required by > app-crypt/gpgme[static-libs]. > > gpgme needs gpgrt_lock_unlock, but it can't find it. Cc-ing gpgme > maintainer, perhaps they have an idea how to resolve this elegantly. > > That said, what does `pkg-config gpgme --libs` return for you? # pkg-config gpgme --libs -lgpgme # gpgme-config --libs -L/usr/lib64 -lgpgme -lassuan -lgpg-error # Hm... (In reply to Fabian Groffen from comment #5) > Static usage is not very often tested. The issue likely was exposed when > qmanifest was added (which requires gnupg support via gpgme). Feels like we > need a static-libs on libassuan, which apparently isn't required by > app-crypt/gpgme[static-libs]. Yeah the deps in the gpgme ebuild seem to be incomplete. > gpgme needs gpgrt_lock_unlock, but it can't find it. Cc-ing gpgme > maintainer, perhaps they have an idea how to resolve this elegantly. > > That said, what does `pkg-config gpgme --libs` return for you? gpgme.pc has this: > Requires.private: gpg-error, libassuan If you run pkg-config --libs --static, you'll get the right result: > % pkg-config --libs --static gpgme > -lgpgme -lgpg-error -lassuan Note: Problem still exists with app-portage:portage-utils-0.96.1. so this would mean we'd have to call PKG_CHECK_MODULES_STATIC or something, hmmm Ok, that PKG_CHECK_MODULES_STATIC basically adds --static to $PKG_CONFIG. Given that portage-utils' configure doesn't have --enable-static or something, it doesn't have any idea of doing static stuff, other then what you pass it on. I think you'd have to export PKG_CONFIG="pkg-config --static" yourself to get this going. |