I am the original author of the autotools build.
Most of this work I had done in 2005, and for some years I kept all of it working on x86 Linux, Solaris, and also Mac. I can no longer invest this amount of time in trying to follow all the different OSs, and so I am glad for anybody submitting patches or improving the build for their systems.
Macs proved to be particularly irksome, since compiler behavior changed significantly based on environment variable setting (...DEPLOYMENT_TARGET, if I remember), and later on the issue of allowing multi architecture binaries. The correct way for linking against PERL libraries, was to query the local perl installation for the correct compilation and linker flags. The current solution in the autotools script is only a workaround which tries to get rid of the correct extra architectures... but this could (should) be done better.
The distinction between shared libs and modules was a problem to which I pointed early on. But this used to be a deeper problem in the xrootd build organization, where sometimes deliverables were used for both. Libtool offers a "-module" switch which correctly should build a module also on Macs. Maybe it is used once too much... would need to investigate.
From: [log in to unmask] on behalf of Lukasz Janyst
Sent: Sat 9/18/2010 1:25 PM
To: Alden Stradling
Cc: [log in to unmask]
Subject: Re: Dutifully reporting...
Yes, indeed. The autotools build is broken on 64 bits Macs because,
contrary to the assumption of the autoconf script, the compiling
toolchain supports three architectures there and not just two. You can
workaround this problem by disabling the perl interface if you don't
need it (--disable-perlint parameter of the configure script) or by
using the classical build. There are also two other problems with the
autotools stuff. The first one is the missing libtoolize binary called
from the bootstrap.sh script (on Mac it's called glibtoolize). Also,
the autotools build tries to link the xrootd binary to a dynamically
loadable module which results with a linking error. On Mac there is a
clear distinction between loadable modules and shared libraries which
is not the case for the ELF systems where both are the same and this
is why this problems has been introduced and not spotted earlier.
Anyways, thanks for reporting. I will be fixing that on Monday.
On Sat, Sep 18, 2010 at 7:22 AM, Alden Stradling
<[log in to unmask]> wrote:
> as the config file requested --
> ./getAutotools.sh -i /opt/xrootd
> ./configure -h
> ./configure --prefix=/opt/xrootd --enable-pwd --enable-posix --enable-mon --enable-apps --enable-doc --enable--gsi
> configure: WARNING: perl says it was linked with multiple -arch flags (-arch i386 -arch ppc)! Will try to remove one
> configure: WARNING: perl says it was compiled with multiple -arch flags (-arch i386 -arch ppc)! Will try to remove one
> configure: error: Failed to remove extra -arch flags
> LD: -arch x86_64 -arch i386
> CC: -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE
> !!!!!! Please notify maintainers at [log in to unmask] !!!!!!
> OS X 10.6.4, Mac Pro x86_64