GNOME Bugzilla – Bug 595100
gtk-doc scans for installed libraries
Last modified: 2011-09-15 10:37:29 UTC
I was patching gnome-keyring to solve our downstream bug report [1] with patch from upstream report [2]. It's basically removing a bogus assert. Rebuilding packages still fails with the assertion though and trying to dig the issue deeper got me to strace the scanner, only to find if was opening already installed lib. [1] https://bugs.gentoo.org/show_bug.cgi?id=267957 [2] https://bugzilla.gnome.org/show_bug.cgi?id=553164 Strace output: $ LC_ALL="C" strace ./reference/gcr/.libs/gcr-scan [...] read(3, "0T\32\215g\375m)?\333o.\353\370\30G\3759\353\35\"\17\300\277\360\26$\t\304\270\227\200\21"..., 120) = 120 select(4, [3], NULL, NULL, {3, 0}) = 1 (in [3], left {2, 999996}) read(3, ">\27\306\246z@\254*\206\332\233\237v\330\316n\2200Y&\266\232\364\204\351u\277\301\357I\36j="..., 120) = 120 select(4, [3], NULL, NULL, {3, 0}) = 1 (in [3], left {2, 999996}) read(3, "UU\311\362\364\341\317\257\231\235\235\270\244\240>mO\340\245qNq\34\377\353n?\230\317\0\306\22\361"..., 120) = 120 select(4, [3], NULL, NULL, {3, 0}) = 1 (in [3], left {2, 999996}) read(3, "\36\25v2\303\1{\31\ng\364\244\235:\276&\214D\2027\333\225\334\375\36R+\22/\362h\264\307"..., 120) = 120 getrusage(RUSAGE_SELF, {ru_utime={0, 20000}, ru_stime={0, 20000}, ...}) = 0 times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 4299306762 stat("/usr/lib64/gnome-keyring/gnome-keyring-pkcs11.so", {st_mode=S_IFREG|0755, st_size=68328, ...}) = 0 futex(0x7fa2ed3c50ec, FUTEX_WAKE_PRIVATE, 2147483647) = 0 open("/usr/lib64/gnome-keyring/gnome-keyring-pkcs11.so", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220'\0\0\0\0\0\0@"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=68328, ...}) = 0 mmap(NULL, 2167856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fa2ebb63000 mprotect(0x7fa2ebb73000, 2093056, PROT_NONE) = 0 mmap(0x7fa2ebd72000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xf000) = 0x7fa2ebd72000 mmap(0x7fa2ebd74000, 1072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa2ebd74000 close(4) = 0 mprotect(0x7fa2ebd72000, 4096, PROT_READ) = 0 write(2, "gcr-scan: gck-rpc-module.c:228: c"..., 88gcr-scan: gck-rpc-module.c:228: call_connect: Assertion `pkcs11_socket_path[0]' failed. ) = 88 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 tgkill(7771, 7771, SIGABRT) = 0 --- SIGABRT (Aborted) @ 0 (0) --- +++ killed by SIGABRT +++
Could you please rephrase what you think is broken? For a start the bug title does not make sense to me - gtk-doc does not scan for installed libraries - gtk-doc scans sourcees code and builds docs.
As you can see in the strace output, gtk-doc scanner opens a system library instead of the one that you just built that is it checks what's in / instead of what's in the sandbox. Is it clearer now ?
Oh and as expected, after installing the fixed lib to the system, the scanner runs just fine now.
Hmm, if you mean "/usr/lib64/gnome-keyring/gnome-keyring-pkcs11.so" that is a plugin. Non much I can do from gtk-doc side. Can we reassign that to seahorse/gnome-keyring. If the have an env-var for the plugin path, that would need to be added to the Makefile.am.
adding gnome-keyring maintainers to CC
gnome-keyring issue is part of Bug #584802
I reassign. There is really nothing I can do about that in gtk-doc. This scenario works for e.g. gstreamer just fine with a path.
Reopening as I can't see any open question.
We no longer build the gtk-doc documentation in seahorse.
As we can see downstream at: https://bugs.gentoo.org/show_bug.cgi?id=298560 This looks to be a gtk-doc bug and, then, this should be reopened and reassigned to gtk-doc maintainers. Thans
Alright. Done.
I think I explained it already. When building the GTK_DOC scanner you need to export an environment variable to tell the gnome-keyring code that is introspectd to not load the plugins from "/usr/lib64/gnome-keyring/" but from e.g. $(top_builddir)/... Just to be clear, gtk-doc has no idea about gnome-keyring plugins and for sure is not the one that opens the plugins. The gnome-keyring code needs to be aware that it runs uninstalled and in this case load uninstalled plugins. If everyone agrees, this should be moved to gnome-keyring. Please let me know if my understanding of the situation is wrong.
I don't think this is an issue any longer, because libraries like libgcr no longer load those plugins on initialization. Instead they're loaded as needed. If anyone can duplicate with gnome-keyring master, then please reopen.Like I said, we no longer build documentation in seahorse. So if this isn't a bug, let's just close it.