From owner-freebsd-ports@FreeBSD.ORG Thu May 8 22:11:21 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8073B236; Thu, 8 May 2014 22:11:21 +0000 (UTC) Received: from mail.iXsystems.com (newknight.ixsystems.com [206.40.55.70]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DBFCAEC; Thu, 8 May 2014 22:11:21 +0000 (UTC) Received: from localhost (mail.ixsystems.com [10.2.55.1]) by mail.iXsystems.com (Postfix) with ESMTP id 7B64F62C8F; Thu, 8 May 2014 15:11:20 -0700 (PDT) Received: from mail.iXsystems.com ([10.2.55.1]) by localhost (mail.ixsystems.com [10.2.55.1]) (maiad, port 10024) with ESMTP id 12781-01-10; Thu, 8 May 2014 15:11:04 -0700 (PDT) Received: from thinkbsd.divinix.org (unknown [10.8.0.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id B1D4362C0A; Thu, 8 May 2014 15:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ixsystems.com; s=newknight0; t=1399587012; bh=ngMJvLMBZzx1As4p2EyLe6HLpci8fQ6Mh+JqrZBGA3o=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fLRK06qUYCfv7sooGAlc4l/OD3OpwP8VGmJcd26cxl+lNR9MKUmuu9dGaQAKdPklJ 6K9iwcChuA56Zx2FMFlM/NgFSISfLIvdYyXmOSSZCxW53XaVjlQNnv/oT/KjHRdOaE HRPLnUtEatVt03I18LtGFDexOZd+oxJtiNoQ75d8= Date: Thu, 8 May 2014 15:10:07 -0700 From: John Hixson To: Konstantin Belousov Subject: Re: net/samba41 port compiles nmbd as a shared object, not executable Message-ID: <20140508221006.GP58138@thinkbsd.divinix.org> References: <536BB61A.7000307@ixsystems.com> <20140508194227.GB74331@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20140508194227.GB74331@kib.kiev.ua> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: Craig Rodrigues , Developers iXsystems , timur@freebsd.org, freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 22:11:21 -0000 On Thu, May 08, 2014 at 10:42:27PM +0300, Konstantin Belousov wrote: > On Thu, May 08, 2014 at 09:51:38AM -0700, Craig Rodrigues wrote: > > Timur, > > > > John Hixson at iXsystems pointed out the following problem to me, and I > > noticed it as well. > What is the problem, exactly ? Does something mis-function ? > > > > > When compiling the net/samba41 port on a FreeBSD-CURRENT host, > > I notice that all binaries seem to be compiled as shared objects, and > > not as proper executables. > > > > % file usr/local/sbin/nmbd > > usr/local/sbin/nmbd: ELF 64-bit LSB shared object, x86-64, version 1 > > (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 11.0 > > (1100013), not stripped > This is normal for PIE binaries. > > > > > > > If I look at the link line for nmbd for example, I see that linker flags > > such as: > > -Wl,--export-dynamic > > -Wl,-Bdynamic > > > > are being passed which force this to be linked together as a shared > > object, not as an executable. > This has nothing to do with the output object type. > > > > > Do you have any idea as to how to fix this? > > So, fix what ? We were seeing that smbd was not dumping core. It would claim to be dumping core but wasn't. It appears this is completely unrelated. The issue turns out to be the kern.sugid_coredump sysctl. Once this is set, smbd will core fine. - John