[Nix-dev] I think I've found an ar archive bug

Tony White tonywhite100 at googlemail.com
Sat Oct 17 11:04:43 CEST 2009


Hi guys,
I've been trying to get audacity to build, with some interesting
results. However, I think I've found a problem and I need someone else
to confirm it.
The problem is with the libmad package (An optional dependency of
audacity) and possibly any other src archive that uses the ar archive
format to gather .o files into a single lib.
http://en.wikipedia.org/wiki/Ar_(Unix)
With libmad there should be a lib/libmad.a file created as a result of
the compilation but it is not. I used fedora 12 here to do a test and
the output result should be :

include/mad.h
lib/libmad.a
lib/libmad.la
lib/libmad.so (A symlink to lib/libmad.so.0.2.1)
lib/libmad.so.0 (A symlink to lib/libmad.so.0.2.1)
lib/libmad.so.0.2.1

Using NixOs with binutils added as a buildInput the ouput is :

include/mad.h
lib/libmad.la
lib/libmad.so (A symlink to lib/libmad.so.0.2.1)
lib/libmad.so.0 (A symlink to lib/libmad.so.0.2.1)
lib/libmad.so.0.2.1

And lib/libmad.a does not get created.

The worst thing about all this is that where the .o files are created
for libmad isn't even clear. They get created in a folder called .libs
in the build dir, so you can't even see the folder in normal directory
output in a console or without showing hidden files in kde's dolphin
file manager.

libmad is quite a quick compile and nice as a test case, so could
anyone please investigate why the ar archive doesn't get created
please? I've managed to workaround it but I think I'm seeing the same
thing with portaudio and if this is system wide, there could be
potential for problems. Who knows how many developers want to bundle
.o files as a .a ar archives?

So my questions are : Is this a bug or just bad build scripts? If I
manually create the libmad.a and copy it to lib/, do I need to run
patchelf on it seperately?

Thanks,
Tony



More information about the nix-dev mailing list