User Details
- User Since
- Apr 12 2021, 12:01 AM (193 w, 3 d)
- Availability
- Available
Sep 1 2022
Thanks, I really appreciate having this fixed in gpgrt-config! I backported the commit to gentoo and can confirm that fixes the build issue with slibtool.
Aug 23 2022
Aug 22 2022
The -L${libdir} is standard in nearly all applicable .pc files on my system. In the case of pkgconf the -L linker path is removed from the output if its the standard linker path. Of course however you think its best to fix this would be fine though.
Or maybe it would be better to only check the standard libdir paths as in the libgpg-error configure.ac?
--- gpgrt-config.orig 2022-08-21 23:14:40.017298485 -0700 +++ gpgrt-config 2022-08-22 08:28:16.339977281 -0700 @@ -210,6 +210,7 @@ # the resulted list is in reverse order for __arg; do case "$__arg" in + -L/usr/lib|-L/usr/lib64|-L/lib|-L/lib64) ;; -l*) # As-is __rev_list="$__arg${__rev_list:+ }$__rev_list"
I suggest simply removing any -L linker path from the output if it matches the $libdir in gpgrt-config.
Even without libassuan-config installed in libassuan-2.5.5.
$ gpgrt-config --libdir=/usr/lib64 libassuan --libs -L/usr/lib64 -lassuan
gpg-error is not affected at least.
gpgrt-config --libdir=/usr/lib64 gpg-error --libs -lgpg-error
In lang/qt/tests/Makefile:
LIBASSUAN_CONFIG = /usr/bin/gpgrt-config --libdir=/usr/lib64 libassuan LIBASSUAN_LIBS = -L/usr/lib64 -lassuan
It seems the issue is also in libassuan-config.
$ libassuan-config --libs -L/usr/lib64 -lassuan -lgpg-error
The shell logic here does not seem quite right to me.
Aug 14 2022
Maybe the solution would be to stop using gpg-error-config and start using pkgconfig instead?
$ pkgconf --libs gpg-error -lgpg-error
Aug 13 2022
One idea would be that gpgme installs its libraries in a directory like /usr/lib64/gpgme/, but that might be too disruptive?
Yes, you are correct.
[pid 1252] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 [pid 1252] access("../../cpp/src/.libs/libqgpgme.so", F_OK) = -1 ENOENT (No such file or directory) [pid 1252] access("../../cpp/src/.libs/libqgpgme.a", F_OK) = -1 ENOENT (No such file or directory) [pid 1252] access("../../cpp/src/../../../src/.libs/libqgpgme.so", F_OK) = -1 ENOENT (No such file or directory) [pid 1252] access("../../cpp/src/../../../src/.libs/libqgpgme.a", F_OK) = -1 ENOENT (No such file or directory) [pid 1252] access("/usr/lib64/libqgpgme.so", F_OK) = 0 [pid 1252] openat(AT_FDCWD, "/usr/lib64/libqgpgme.so", O_RDONLY|O_CLOEXEC) = 3 [pid 1252] newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1253896, ...}, AT_EMPTY_PATH) = 0 [pid 1252] mmap(NULL, 1253896, PROT_READ, MAP_PRIVATE|MAP_NORESERVE, 3, 0) = 0x7fe6f6ffa000 [pid 1252] rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0 [pid 1252] close(3) = 0
As it shows it checks the linker path in the order they are passed to the compiler and then finds the old system library before the newly built library. GNU libtool also sets the /usr/lib64 path before the using libqgpgme library, but avoids this by using the .so file directly. Presumably this is only on compatible platforms and maybe even a problem on less compatible platforms? I'm not sure the ramifications of slibtool trying to reorder the library paths itself. Hopefully the slibtool dev has some time to also share their thought soon.
I attached the strace log of the failing clang command, but I am not seeing anywhere where it finds libqgpgme on the system, Maybe I'm doing something wrong?
In retrospect this might be better handled in slibtool itself. I'll try to contact the main dev behind the slibtool project, but they have been very busy lately so it might take some time.
Additionally, moving the -L../src/.libs -lqgpgme earlier in the command line works.
clang++ t-revokekey.o t-support.o -g -O2 -L../../cpp/src/.libs -lgpgmepp -L../../cpp/src/../../../src/.libs -lgpgme -L../src/.libs -lqgpgme -L/usr/lib64 -lassuan -lgpg-error -lassuan -L../src/../../cpp/src/.libs -lgpgmepp -L../src/../../cpp/src/../../../src/.libs -lgpgme -lassuan -lgpg-error -L../src/../../../src/.libs -lQt5Core -L../../../src/.libs -lgpgme -lassuan -lgpg-error -lQt5Test -lQt5Core -lstdc++ -o .libs/t-revokekey
After some experimenting I found how GNU libtool avoids this.
Another interesting detail is that this is reproduced when trying to update to 1.18.0 from 1.17.1 which is installed on the system, but if 1.17.1 is built without qt5 support and 1.18.0 is then this issue is not reproducible.
revokekeyjob.moc is included by job.cpp (as many other *job.moc files). The missing symbols should be available in the built libqgpgme.so
Aug 12 2022
Apr 13 2021
Regarding your patch, I am personally not opposed to it, but apparently Debian’s policy says the library/module should be called scute while Gentoo’s policy says it should be called libscute… What should an upstream developer do?
Apr 12 2021
This is a patch that fixes the build, I am not sure why -module is not used when HAVE_DARWIN_SYSTEM is defined, but I preserved that behavior. If its not intentional it could be added directly to libscute_la_LDFLAGS instead.