From owner-freebsd-current@FreeBSD.ORG Mon Sep 10 12:41:36 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2399816A418 for ; Mon, 10 Sep 2007 12:41:36 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id E67F813C494 for ; Mon, 10 Sep 2007 12:41:35 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l8ACeFZc046760; Mon, 10 Sep 2007 05:40:15 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l8ACeFAE046759; Mon, 10 Sep 2007 05:40:15 -0700 (PDT) (envelope-from rizzo) Date: Mon, 10 Sep 2007 05:40:15 -0700 From: Luigi Rizzo To: Ian FREISLICH Message-ID: <20070910054015.A46640@xorpc.icir.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from ianf@clue.co.za on Mon, Sep 10, 2007 at 02:35:30PM +0200 Cc: current@freebsd.org Subject: Re: Building asterisk - undefined reference to `__sync_fetch_and_add_4' 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, 10 Sep 2007 12:41:36 -0000 On Mon, Sep 10, 2007 at 02:35:30PM +0200, Ian FREISLICH wrote: > Luigi Rizzo wrote: > > On Mon, Sep 10, 2007 at 12:04:10PM +0200, Ian FREISLICH wrote: > > > Hi > > > > > > I was wondering if anyone else is having this problem building > > > asterisk on -CURRENT. The problem may not be with FreeBSD - it > > > looks like gnu configure is incorrectly detecting the CPU as "i386" > > > when it's actually a pentium3: > > > > > > configure: Package configured for: > > > configure: OS type : freebsd7.0 > > > configure: Host CPU : i386 > > > ===> Building for asterisk-1.4.11 > > > > > > The i386 doesn't have any atomic primatives or something like that > > > (maybe just according to gcc-4.2). If I frob the configured sources > > > and change the i386 to pentium3, then the build works, but I don't > > > have enough asterisk foo at this point to verify that it actually > > > works. ... > > Could it be that it's a compiler bug instead (or something in > > your /etc/make.conf which is forcing compiler-specific optimizations > > but only for a part of the build or the libraries) ? > > It builds if I don't set CPUTYPE=p3 in /etc/make.conf. So, I guess > that's the fix. and there's another curious thing here, which i realised after posting my email - asterisk uses gmake, not bmake, so does gmake read /etc/make.conf too ? Who else uses that file ? cheers luigi