Error installing p5-net-libidn

Ryan Schmidt ryandesign at
Thu Feb 11 19:36:59 PST 2010

On Feb 11, 2010, at 21:32, Scott Haneda wrote:

> On Feb 11, 2010, at 7:30 PM, Joshua Root wrote:
>> On 2010-2-12 14:28 , Joshua Root wrote:
>>> On 2010-2-12 07:32 , Scott Haneda wrote:
>>>> --->  Configuring p5-net-libidn
>>>> DEBUG: Using compiler 'Mac OS X gcc 4.2'
>>>> DEBUG: Executing org.macports.configure (p5-net-libidn)
>>>> DEBUG: Environment: CFLAGS='-O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-O2 -arch x86_64' MACOSX_DEPLOYMENT_TARGET='10.6' LIBRARY_PATH='/opt/local/lib' CXX='/usr/bin/g++-4.2' F90FLAGS='-O2 -m64' LDFLAGS='-L/opt/local/lib' FCFLAGS='-O2 -m64' OBJC='/usr/bin/gcc-4.2' INSTALL='/usr/bin/install -c' C_INCLUDE_PATH='/opt/local/include' OBJCFLAGS='-O2 -arch x86_64' FFLAGS='-O2 -m64' 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_perl_p5-net-libidn/work/Net-LibIDN-0.12" && /opt/local/bin/perl Makefile.PL INSTALLDIRS=vendor'
>>>> ld: warning: in /opt/local/lib/libidn.dylib, file is not of required architecture
>>>> Undefined symbols for architecture i386:
>>>> "_idna_to_ascii_8z", referenced from:
>>>>     _main in ccxpo2bY.o
>>>> ld: symbol(s) not found for architecture i386
>>> Why is it building for i386?

Oooh. I missed that.

>> Answer: it's linking for i386 because there's no -arch x86_64 in LDFLAGS.
> So should I proceed with Ryan's steps in his third past email, or is this the bug in this scenario?

Hmm. Well, the lack of -arch flags in LDFLAGS is a bug in MacPorts 1.8.0 through 1.8.2. You can install MacPorts from the 1.8 branch to get the fix for this. But I don't understand why it would default to i386. gcc should be defaulting to x86_64 on a 64-bit Mac running Snow Leopard.

More information about the macports-users mailing list