PKGNG: SHLIBS causes pkg segfault on some ports

Kimmo Paasiala kpaasial at gmail.com
Fri Jul 13 19:09:17 UTC 2012


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 at 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
>
>
>


More information about the freebsd-ports mailing list