From owner-freebsd-ports@FreeBSD.ORG Fri Jul 13 19:09:16 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2282106566C; Fri, 13 Jul 2012 19:09:16 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6FE5A8FC19; Fri, 13 Jul 2012 19:09:16 +0000 (UTC) Received: by vbmv11 with SMTP id v11so3130689vbm.13 for ; Fri, 13 Jul 2012 12:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xx3riOR2sjyvMSSWX88leBJLx/Bo97cWoZn+fzw4gYw=; b=l06Is1+x7+xjampb25cuTZnmeTGJAspHvlTVjDt7My1FYfiN3P3aN5rUaMH+Klu1fv CLXcidR+yyITvGiTSoHLyhM6ntrP+6/AH8rXdp66k3xSfrog2jDZlap8jCRldJa2nnH5 XF3gBfx+Ez813WOrfFzvuWUHdYnZdwJ8HQ2LTk0KWLWNSiIhC70wbkGYW2zU2qa1FR5E mHhAiuiLewxj0NENl3GmFV/d9ZI/ccEl778PuK8gajlGeAg8sl9nXnrieWA7vR5BPngO ffte+xG7dEMa74R8PAqkx2f62qmzeCnM/duFXC2cyMFKp5ec+NkWIq4Nq8Tb99ZnqS0N DD9Q== MIME-Version: 1.0 Received: by 10.52.94.147 with SMTP id dc19mr987647vdb.74.1342206550412; Fri, 13 Jul 2012 12:09:10 -0700 (PDT) Received: by 10.52.160.129 with HTTP; Fri, 13 Jul 2012 12:09:10 -0700 (PDT) In-Reply-To: <4FF4AE4A.8060204@FreeBSD.org> References: <4FF4AE4A.8060204@FreeBSD.org> Date: Fri, 13 Jul 2012 22:09:10 +0300 Message-ID: From: Kimmo Paasiala To: Matthew Seaman Content-Type: text/plain; charset=UTF-8 Cc: bapt@freebsd.org, freebsd-ports@freebsd.org Subject: Re: PKGNG: SHLIBS causes pkg segfault on some ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 19:09:17 -0000 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 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 > > >