From owner-freebsd-current@FreeBSD.ORG Mon May 21 01:36:01 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6BF616A468 for ; Mon, 21 May 2007 01:36:01 +0000 (UTC) (envelope-from morganw@chemikals.org) Received: from smtp2.sccoast.net (smtp2.sccoast.net [66.153.203.174]) by mx1.freebsd.org (Postfix) with ESMTP id A9B7B13C44C for ; Mon, 21 May 2007 01:36:01 +0000 (UTC) (envelope-from morganw@chemikals.org) Received: from 34.158-pool-avail-mi.sccoast.net ([66.153.158.34]:52570 helo=volatile.chemikals.org) by smtp2.sccoast.net with esmtp (Exim 4.60) (envelope-from ) id 1Hpwoa-0006nu-Hn; Sun, 20 May 2007 21:36:00 -0400 Received: from localhost (morganw@localhost [127.0.0.1]) by volatile.chemikals.org (8.13.8/8.13.8) with ESMTP id l4L1ZxkC044326; Sun, 20 May 2007 21:35:59 -0400 (EDT) (envelope-from morganw@chemikals.org) Date: Sun, 20 May 2007 21:35:59 -0400 (EDT) From: Wes Morgan To: Kris Kennaway In-Reply-To: <20070521012910.GA46689@xor.obsecurity.org> Message-ID: <20070520213204.O44264@volatile.chemikals.org> References: <200705201954.00476.h.schmalzbauer@omnisec.de> <868xbjib8t.fsf@dwp.des.no> <200705202130.55833.h.schmalzbauer@omnisec.de> <20070520184710.75db1335@kan.dnsalias.net> <20070520210704.H33354@volatile.chemikals.org> <20070521012910.GA46689@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Dag-Erling Sm??rgrav , freebsd-current@freebsd.org, Harald Schmalzbauer Subject: Re: strange "Exec format error" (gcc4.2 suspicious) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 01:36:02 -0000 On Sun, 20 May 2007, Kris Kennaway wrote: > On Sun, May 20, 2007 at 09:07:24PM -0400, Wes Morgan wrote: >> On Sun, 20 May 2007, Alexander Kabaev wrote: >> >>> On Sun, 20 May 2007 21:30:55 +0200 >>> Harald Schmalzbauer wrote: >>> >>>> Am Sonntag, 20. Mai 2007 schrieb Dag-Erling Sm?rgrav: >>>>> Harald Schmalzbauer writes: >>>>>> I compiled samba on a fresh -current and I'm seeing strange >>>>>> errors. When I try to execute 'net' I get this error: >>>>>> /usr/local/bin/net: Exec format error. Binary file not executable. >>>>> >>>>> If you're running amd64, there was briefly a bug that caused the >>>>> 32-bit >>>> >>>> It was my very first thought too, but it's i386. It's a xeon 3050 >>>> (core2, thus EM64-T) processor but world alwys was i386 and also is >>>> for that jail. Could it be possible that there's any runtime >>>> detection which made me 64-bit binaries on a 32-bit base system? >>>> >>> Samba auto-detected -fpie support in GCC 4.3 and tried to use it. >>> FreeBSD kernel does not know how to deal with binaries created by this >>> option yet, so it freaks out. >>> >>> Add --disable-pie to CONFIGURE_ARGS in sambe3 port for now. >> >> This same problem exists for kdelibs3, maybe other kde ports >> (investigating now). > > Are you sure, they do not appear to compile with -fPIE. kdelibs and kdebase compile several binaries with -pie: start_kdeinit (kdelibs) kgrantpty (kdelibs) kpac_dhcp_helper (kdelibs) kcheckpass (kdebase) kdesud (kdebase) Running "find . -name Makefile | xargs grep '(KDE_USE_PIE)'" will track them down for you: ./kcheckpass/Makefile:kcheckpass_LDFLAGS = $(KDE_USE_PIE) $(all_libraries) Passing --disable-pie forces KDE_USE_PIE blank as would be expected. I haven't searched any other of the kde ports yet. -- This .signature sanitized for your protection