Mailing List Archive

libspf2 on OSX: 'make' fails @ libreplace w/ "ar: no archive members specified"
hi all,

i'n attempting to build libspf2 on OSX 10.4.1.

a simple:

% ./configure \
--prefix=/usr/local/libspf2 \
--with-bind=/usr/local/bind9

is error-free, but a subsequent:

% make

fails w/:

make all-recursive
Making all in src
Making all in include
make[4]: Nothing to be done for `all-am'.
Making all in libreplace
/bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -Wall
-I/usr/local/bind9/include -L/usr/local/bind9/lib
-Wl,-L/usr/local/bind9/lib -o libreplace.la -lpthread -lintl -lbind
ar cru .libs/libreplace.a
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
make[4]: *** [libreplace.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

looking, i find:

% ls -al src/libreplace/.libs/
total 0
drwxr-xr-x 2 root 100 68 Jun 1 21:31 .
drwxrwxrwx 19 500 100 646 Jun 1 21:31 ..

quick-Googling, there's reference to (relevant?) problems with Darwin's "ar"
here:

<http://groups-beta.google.com/group/lucky.openbsd.misc/browse_thread/thread/6e3cea8e3273c5bd/b40aadd46768de3c?q=%22ar:+no+archive+members+specified%22&rnum=8&hl=en#b40aadd46768de3c>

poking aroud in "src/libreplace/Makefile", nothing's immediately obvious ...

any suggestios here?

thx!

richard

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: libspf2 on OSX: 'make' fails @ libreplace w/ "ar: no archive members specified" [ In reply to ]
Hi,

Apparently, the ar command on your mac requires different arguments as
compared to the operating systems the makefile takes into account.

Perhaps you can request the man page for ar by using 'man ar' (i don't
know if macos has this manpage, i know it's not great on manpages..), or
use ar --help to find out more. You can do the same for ar on for
example freebsd:
http://www.freebsd.org/cgi/man.cgi?query=ar&apropos=0&sektion=0&manpath=FreeBSD+5.3-RELEASE+and+Ports&format=html

and linux:

http://man.he.net/?topic=ar&section=1

I think that ought to be enough to figure out what to change the
invocation in the makefile to to make it work on macos..

Hope this helps,

Koen

On Wed, Jun 01, 2005 at 09:35:49PM -0700, OpenMacNews wrote:
> hi all,
>
> i'n attempting to build libspf2 on OSX 10.4.1.
>
> a simple:
>
> % ./configure \
> --prefix=/usr/local/libspf2 \
> --with-bind=/usr/local/bind9
>
> is error-free, but a subsequent:
>
> % make
>
> fails w/:
>
> make all-recursive
> Making all in src
> Making all in include
> make[4]: Nothing to be done for `all-am'.
> Making all in libreplace
> /bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -Wall
> -I/usr/local/bind9/include -L/usr/local/bind9/lib
> -Wl,-L/usr/local/bind9/lib -o libreplace.la -lpthread -lintl -lbind
> ar cru .libs/libreplace.a
> ar: no archive members specified
> usage: ar -d [-TLsv] archive file ...
> ar -m [-TLsv] archive file ...
> ar -m [-abiTLsv] position archive file ...
> ar -p [-TLsv] archive [file ...]
> ar -q [-cTLsv] archive file ...
> ar -r [-cuTLsv] archive file ...
> ar -r [-abciuTLsv] position archive file ...
> ar -t [-TLsv] archive [file ...]
> ar -x [-ouTLsv] archive [file ...]
> make[4]: *** [libreplace.la] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> looking, i find:
>
> % ls -al src/libreplace/.libs/
> total 0
> drwxr-xr-x 2 root 100 68 Jun 1 21:31 .
> drwxrwxrwx 19 500 100 646 Jun 1 21:31 ..
>
> quick-Googling, there's reference to (relevant?) problems with Darwin's
> "ar" here:
>
> <http://groups-beta.google.com/group/lucky.openbsd.misc/browse_thread/thread/6e3cea8e3273c5bd/b40aadd46768de3c?q=%22ar:+no+archive+members+specified%22&rnum=8&hl=en#b40aadd46768de3c>
>
> poking aroud in "src/libreplace/Makefile", nothing's immediately obvious ...
>
> any suggestios here?
>
> thx!
>
> richard
>
> -------
> To unsubscribe, change your address, or temporarily deactivate your
> subscription, please go to
> http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com

--
K.F.J. Martens, Sonologic, http://www.sonologic.nl/
Networking, hosting, embedded systems, unix, artificial intelligence.
Public PGP key: http://www.metro.cx/pubkey-gmc.asc
Wondering about the funny attachment your mail program
can't read? Visit http://www.openpgp.org/

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: libspf2 on OSX: 'make' fails @ libreplace w/ "ar: no archive members specified" [ In reply to ]
hi koen,

thx for the reply =)

> Apparently, the ar command on your mac requires different arguments as
> compared to the operating systems the makefile takes into account.
>
> Perhaps you can request the man page for ar by using 'man ar'

ok.

i'd been looking at:

> ar cru .libs/libreplace.a
> ar: no archive members specified

and fretting over the libreplace.a not being found, rather than the "ar"
invocation.

so, per your (good) suggestion, checking the FreeBSD man pages for the relevant
flags:
...
r Insert the files member... into archive (with replacement). This
operation differs from q in that any previously existing members
are deleted if their names match those being added.

If one of the files named in member... does not exist, ar displays
an error message, and leaves undisturbed any existing members of
the archive matching that name.

By default, new members are added at the end of the file; but you
may use one of the modifiers a, b, or i to request placement rela-
tive to some existing member.

The modifier v used with this operation elicits a line of output
for each file inserted, along with one of the letters a or r to
indicate whether the file was appended (no old member deleted) or
replaced.
...
c Create the archive. The specified archive is always created if it
did not exist, when you request an update. But a warning is issued
unless you specify in advance that you expect to create it, by
using this modifier.
...
u Normally, ar r... inserts all files listed into the archive. If
you would like to insert only those of the files you list that are
newer than existing members of the same names, use this modifier.
The u modifier is allowed only for the operation r (replace). In
particular, the combination qu is not allowed, since checking the
timestamps would lose any speed advantage from the operation q.

as well as checking the OSX man pages (note the BSD reference ...)
AR(1) BSD General Commands Manual AR(1)
...
-c Whenever an archive is created, an informational message to that
effect is written to standard error. If the -c option is speci-
fied, ar creates the archive silently.
...
-r Replace or add the specified files to the archive. If the ar-
chive does not exist a new archive file is created. Files that
replace existing files do not change the order of the files
within the archive. New files are appended to the archive unless
one of the options -a, -b or -i is specified.
...
-u Update files. When used with the -r option, files in the archive
will be replaced only if the disk file has a newer modification
time than the file in the archive. When used with the -x option,
files in the archive will be extracted only if the archive file
has a newer modification time than the file on disk.

looks the same & OK, but ... notice the "-" signs b4 the flags ? different
from FreedBSD.

hmmm .... let's see:

% cd /usr/ports/exim/libspf2-1.2.5

1st, just cleaning up a couple of things:

% perl -pi -e 's/autoreconf -v/autoreconf --install --force -v/g'
/usr/ports/exim/libspf2-1.2.5/bootstrap

to make sure 'libtoolize' gets run by autoreconf (--install); also must ensure
that "setenv LIBTOOLIZE glibtoolize", as 'libtoolize' on OSX is sed'd to
'glibtoolize' ...

and,

% perl -pi -e 's/AC_PROG_RANLIB/AC_PROG_LIBTOOL/g' configure.ac

as AC_PROG_RANLIB is deprecated w/ newer libtools ...

then,

% ./bootstrap

now, checking for instances of ar_flags --> "cru":

% grep cru `grep -rln cru .`
./aclocal.m4:test -z "$AR_FLAGS" && AR_FLAGS=cru
./autom4te.cache/output.0:test -z "$AR_FLAGS" && AR_FLAGS=cru
./autom4te.cache/output.1:test -z "$AR_FLAGS" && AR_FLAGS=cru
./autom4te.cache/traces.0:test -z "$AR_FLAGS" && AR_FLAGS=cru
./configure:test -z "$AR_FLAGS" && AR_FLAGS=cru
./docs/draft-mengwong-spf-00.txt: variables in an SPF client. It is
crucial that they be interpreted
./docs/draft-mengwong-spf-00.txt: but MAY subject it to a higher
transaction cost, deeper scrutiny,
./src/include/spf_response.h: * but MAY subject it to a higher
transaction cost, deeper scrutiny,

so the chages i'd make are:

% perl -pi -e 's/=cru/=-cru/g' {aclocal.m4,configure}
% grep cru {aclocal.m4,configure}

unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL LANG
LINGUAS

./configure \
--prefix=/usr/local/libspf2 \
--with-bind=/usr/local/bind9

however,

% make

still fails with -- now the mod'd ar flags:

ar -cru .libs/libreplace.a
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
make[4]: *** [libreplace.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

argh!

hmmm ... note: the usage msg right there (above):

there is NO "ar -c" or "ar -u" ... tho, "ar -r" is supposedly 'equiv' to "ar
-cuTLsv".

so, let's instead try, just:
% perl -pi -e 's/=cru/=-r/g' {aclocal.m4,configure}

so that:
% grep "=\-r" {aclocal.m4,configure}
aclocal.m4:test -z "$AR_FLAGS" && AR_FLAGS=-r
configure:test -z "$AR_FLAGS" && AR_FLAGS=-r

... % make

ar -r .libs/libreplace.a
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
make[4]: *** [libreplace.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

still a problem ... are you certain its the invocation?

richard

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com