From owner-freebsd-current@FreeBSD.ORG Mon Sep 10 10:05:10 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 3045316A46C for ; Mon, 10 Sep 2007 10:05:10 +0000 (UTC) (envelope-from ianf@clue.co.za) Received: from munchkin.clue.co.za (munchkin.clue.co.za [66.219.59.160]) by mx1.freebsd.org (Postfix) with ESMTP id D595C13C45A for ; Mon, 10 Sep 2007 10:05:09 +0000 (UTC) (envelope-from ianf@clue.co.za) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=20070313; d=clue.co.za; h=Received:Received:Received:To:Subject:From:X-Attribution:Date:Message-Id; b=My3QlJDVQ4IpEXFdc30zaoJtZmNcY8D6klEUCeuyCi0oPngr6BfI+/QiEDDRgDduG65XgIZyl1ZqeO/Y4Vwu/ZE9vz9mwMtjK+fD9CkEiw4VOecJcivsXNETqeM6ROSgafJXn1zCmWckiMvn+3MsO/Q+SpX3kbELyIkKguq9128aeZioMYqFYMHy/juKJojIZ0MF0IAihqrhd4//5CTj9tH9dGhMu7kAjpwG6ibD8FMWzFWIiFNZaqWn9bwnsksn; Received: from uucp by munchkin.clue.co.za with local-rmail (Exim 4.66) (envelope-from ) id 1IUg8j-0005St-I7 for current@freebsd.org; Mon, 10 Sep 2007 10:05:09 +0000 Received: from ianf.clue.co.za ([10.0.0.6] helo=clue.co.za) by urchin.clue.co.za with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1IUg7o-0006MD-5D for current@freebsd.org; Mon, 10 Sep 2007 10:04:12 +0000 Received: from localhost ([127.0.0.1] helo=clue.co.za) by clue.co.za with esmtp (Exim 4.68 (FreeBSD)) (envelope-from ) id 1IUg7m-0004n7-8M for current@freebsd.org; Mon, 10 Sep 2007 12:04:10 +0200 To: current@freebsd.org From: Ian FREISLICH X-Attribution: BOFH Date: Mon, 10 Sep 2007 12:04:10 +0200 Message-Id: Cc: Subject: 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 10:05:10 -0000 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. ast_expr2f.o asterisk.o astmm.o autoservice.o callerid.o cdr.o channel.o chanv ars.o cli.o config.o cryptostub.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o file.o fixedjitterbuf.o frame.o fskmodem.o http.o image.o indications.o io.o jitterbuf.o loader.o logger.o manager.o md5.o netsock.o pbx.o plc.o privacy .o rtp.o say.o sched.o sha1.o slinfactory.o srv.o stdtime/localtime.o strcompat. o tdd.o term.o threadstorage.o translate.o udptl.o ulaw.o utils.o editline/libed it.a -> asterisk channel.o(.text+0x2b52): In function `ast_channel_alloc': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi ned reference to `__sync_fetch_and_add_4' channel.o(.text+0x2ec1):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/ast erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4' cli.o(.text+0x3a4a): In function `ast_cli_command': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi ned reference to `__sync_fetch_and_add_4' dial.o(.text+0x3da): In function `ast_dial_append': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi ned reference to `__sync_fetch_and_add_4' loader.o(.text+0xe3c): In function `__ast_module_user_add': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi ned reference to `__sync_fetch_and_add_4' loader.o(.text+0xec9):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/aster isk/lock.h:775: more undefined references to `__sync_fetch_and_add_4' follow manager.o(.text+0x197): In function `process_events': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi ned reference to `__sync_sub_and_fetch_4' manager.o(.text+0x173e): In function `free_session': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi ned reference to `__sync_sub_and_fetch_4' manager.o(.text+0x18ab): In function `accept_thread': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi ned reference to `__sync_fetch_and_add_4' manager.o(.text+0x1962):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/ast erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4' manager.o(.text+0x1a67):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/ast erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4' manager.o(.text+0x1b15):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/ast erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4' manager.o(.text+0x4774): In function `action_waitevent': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi ned reference to `__sync_sub_and_fetch_4' manager.o(.text+0x5f81): In function `generic_http_callback': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi ned reference to `__sync_fetch_and_add_4' manager.o(.text+0x5f8f):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/ast erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4' manager.o(.text+0x6a65):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/ast erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4' manager.o(.text+0x70b5): In function `session_do': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi ned reference to `__sync_fetch_and_add_4' utils.o(.text+0xde8): In function `ast_atomic_dec_and_test': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi ned reference to `__sync_sub_and_fetch_4' utils.o(.text+0xe01): In function `ast_atomic_fetchadd_int': /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi ned reference to `__sync_fetch_and_add_4' gmake[1]: *** [asterisk] Error 1 gmake: *** [main] Error 2 *** Error code 2 Stop in /usr/ports/net/asterisk. *** Error code 1 Stop in /usr/ports/net/asterisk. -- Ian Freislich