Link of libdefaultmodule fails on OS X because of missing archive members
Brought to you by:
sobukus
Got this error when tried to build mpg123 from source with dummy audio module:
/bin/sh ./libtool --tag=CC --mode=link gcc -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -g -O2 -o src/libout123/modules/libdefaultmodule.la
libtool: link: ar cr src/libout123/modules/.libs/libdefaultmodule.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: *** [src/libout123/modules/libdefaultmodule.la] Error 1
This scenario is used by the Conan packet manager recipe for mpg123-1.26.4. So I tried previous versions till the 1.27.0 and they are affected (
Steps to reproduce:
./configure --disable-modules --with-audio=dummy && make
I confirm that
is not trying to link any sources to libdefaultmodule and also fails on
Linux, in a slightly different way. It is an unusual build, but not
totally unreasonable, if you just want a plain decoder without actual
live audio.
I'll fix it, but not tonight.
OK, fix in trunk is incoming. The workaround is this:
The dummy output is excluded from the list of outputs to try by default for a usual module build, to give the user an error if no working output is found. Silent dummy would be a surprise, usually.
Thanks a lot, Thomas!
Can you motivate the conan receipe to use this form? I don't know when we'll do the next release around here, still pondering a replacement of the HTTP access that enables HTTPS streams.
For now Conan repository contains only recipe for version 1.26.4 (which is not affected). So, there is no hurry in creating the recipe for a newer version.
Well, it would be better to be explicit withe default module, anyway;-) But of course, please check if the current https://mpg123.org/snapshot works as-is.