[MacPorts] #24391: Asterisk 1.6.1.12: build failure: Undefined symbols: ___sync_fetch_and_add_4
MacPorts
noreply at macports.org
Sun Jan 16 03:57:08 PST 2011
#24391: Asterisk 1.6.1.12: build failure: Undefined symbols:
___sync_fetch_and_add_4
---------------------------------+------------------------------------------
Reporter: reg@… | Owner: mr_bond@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.2
Keywords: | Port: asterisk
---------------------------------+------------------------------------------
Comment(by don@…):
Replying to [comment:8 stefan.van.der.eijk@…]:
> I don't see the build issues on my system. I build the following
Portfile (version 1.6.2.14) with the +jabber variant.
I found a work-around for this problem -- turn off the define for
HAVE_GCC_ATOMICS.
FYI - The build works on a new macair with xcode 3.2.5 installed.
So I went back to my failing mac mini, I removed /opt, and reinstalled
macports and xcode 3.2.5 from apple. Still failed the same way.
I then ran "port clean asterisk", "port config asterisk", then commented
out the define of HAVE_GCC_ATOMICS in include/asterisk/autoconfig.h in the
asterisk work directory, and then ran "port build asterisk". No build
problems.
So whatever compiler + options configure is using isn't the same as is
being used to build in the utils directory.
The config phase reports (extraneous stuff cut out)::
<cut>
configure: build-cpu:vendor:os: i386 : apple : darwin10.6.0 :
<cut>
DEBUG: Using compiler 'Mac OS X gcc 4.2'
DEBUG: configure phase started at Sun Jan 16 11:12:00 CET 2011
DEBUG: Executing org.macports.configure (asterisk)
DEBUG: Environment: CPATH='/opt/local/include' CFLAGS='-pipe -O2 -arch
i386' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-pipe -O2 -arch i386'
LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.6'
CXX='/usr/bin/g++-4.2'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_asterisk/work/.CC_PRINT_OPTIONS'
F90FLAGS='-pipe -O2 -m32' LDFLAGS='-L/opt/local/lib -arch i386'
OBJC='/usr/bin/gcc-4.2' FCFLAGS='-pipe -O2 -m32' INSTALL='/usr/bin/install
-c' OBJCFLAGS='-pipe -O2 -arch i386' FFLAGS='-pipe -O2 -m32'
CC_PRINT_OPTIONS='YES' CC='/usr/bin/gcc-4.2'
DEBUG: Assembled command: 'cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_asterisk/work/asterisk-1.6.2.10"
&& ./configure --prefix=/opt/local --without-h323'
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking for gcc... /usr/bin/gcc-4.2
<cut>
checking for compiler atomic operations... yes
<cut>
I verified that the code:
main()
{
int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);
}
compiles and links successfully with /usr/bin/gcc-4.2, which the build
above claims CC is set to.
Given I'm not an active developer under macports, just a user, and the
multilevel build environment of macports and asterisk is complex, I don't
really want to spend the time to grok it well enough to break this down
further ... if somebody has a request for a particular test, I'd be happy
to perform it.
--
Ticket URL: <https://trac.macports.org/ticket/24391#comment:9>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list