GNOME Bugzilla – Bug 578358
FTBS on MacOS X: no sources listed for archive
Last modified: 2009-05-03 01:27:12 UTC
Please describe the problem: totem-pl-parser-2.24.4/lib $ make /bin/sh ../libtool --tag=CC --mode=link /usr/bin/gcc-4.0 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -fno-strict-aliasing -O2 -L/opt/local/lib -o libtotem_glibc.la libtool: link: ar cru .libs/libtotem_glibc.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: *** [libtotem_glibc.la] Error 1 Steps to reproduce: configure and build Actual results: build fails in lib Expected results: succeed Does this happen every time? yes Other information: libtotem_glibc_la_SOURCES is empty, so there's nothing to put in the lib... why is this being built?
It's empty if your system has an implementation of asprintf. What system are you running this on?
This is on darwin. The workaround we're using in MacPorts is adding stub.c to the sources list with just: int ___stub_so_lib_is_not_empty() { return 0; }
Which version of libtool are you using? Because Linux/glibc doesn't need this function either and manages to do just fine without building the library.
The problem isn't the version of libtool. The problem is with ar. With binutils on linux, it's fine being told to create an archive with nothing in it: linux $ ar cru libnada.a #works but that is not portable and does not work on darwin: darwin $ ar cru libnada.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 ...]
Fixed on master commit 311e1f342d16c7edef0565473382066403b8eda5 Author: Bastien Nocera <hadess@hadess.net> Date: Sun May 3 02:25:06 2009 +0100 Bug 578358 – FTBS on MacOS X: no sources listed for archive 2009-05-03 Bastien Nocera <hadess@hadess.net> * lib/stub.c (___stub_so_lib_is_not_empty): Add a stub file to allow compiling on MacOS X (Closes: #578358)