Date: Fri, 13 Jul 2012 22:09:10 +0300 From: Kimmo Paasiala <kpaasial@gmail.com> To: Matthew Seaman <matthew@freebsd.org> Cc: bapt@freebsd.org, freebsd-ports@freebsd.org Subject: Re: PKGNG: SHLIBS causes pkg segfault on some ports Message-ID: <CA%2B7WWSezKLs5-5H59tYBtRf97cmLz%2BNdYPawLEWrT0Sh3j6kmw@mail.gmail.com> In-Reply-To: <4FF4AE4A.8060204@FreeBSD.org> References: <CA%2B7WWSckWBXS8n%2B3CE6DiUkQBwApnidVpPuLHLVZxXsK2vD42g@mail.gmail.com> <4FF4AE4A.8060204@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I have an idea that could be a solution to this problem. Instead of using dlopen(3) on the library and using dlinfo (...,RTLD_DI_LINKMAP,...) to find the path of the library could you use the output of 'ldconfig -r' and parse the path information from that? Regards, Kimmo Paasiala On Wed, Jul 4, 2012 at 11:57 PM, Matthew Seaman <matthew@freebsd.org> wrote: > On 04/07/2012 20:32, Kimmo Paasiala wrote: >> I have the SHLIBS feature turned on in /usr/local/etc/pkg.conf and I'm >> getting segfaults in the final stage of installation with some ports. >> >> Here is the tail end of a log from building databases/db42 with SHLIBS on: >> >> http://pastebin.com/3AqMdptc >> >> Backtrace from gdb: >> >> http://pastebin.com/V3QY1Mmm >> >> What seems to be common for ports that cause pkg to segfault is that >> they have at least some C++ code in them. Another thing in common is >> that the backtrace always shows "libm.so.5" in test_depends () before >> dlopen () and the _rtld_get_stack_prot () frames. >> >> Operating system is FreeBDS 9-STABLE r237674 amd64. I have the whole >> system compiled with CLANG including ports, /usr/bin/cc is CLANG. >> >> I'm not seeing the same problem on 9.0-RELEASE powerpc with the system >> and ports compiled with the stock gcc if that helps. > > Thank you very much for your report. > > This is a known problem: https://github.com/pkgng/pkgng/issues/263 > > If you know of any other ports that segfault in the same way, please let > us know by updating that issue on github. It could be C++ related, but > there are a lot of C++ ports that can be built perfectly well with > SHLIBS enabled, so it's a bit more subtle than that. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. > PGP: http://www.infracaninophile.co.uk/pgpkey > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B7WWSezKLs5-5H59tYBtRf97cmLz%2BNdYPawLEWrT0Sh3j6kmw>