Hello great BLFS team, I'm currently intensively working with libmad, and incidentally came across libmad build instructions in BLFS/CLFS. There is a problem with x86-64 compilation which is not properly addressed.
libmad -- is (considerably) old project (last commit around year 2004). So, configure.ac grew old, and don't support x86-64. As a result, if you run ./configure on x86-64 system -- it will complete without errors, but then compilation will fail with gcc complaining about "-fforce-mem". This is because ./configure incorrectly "guesses" target triplet. In BLFS this issue is not addressed at all (if I get it correctly), and in CLFS issue is addresses, but incorrectly. The later uses straight approach -- remove "-fforce-mem". That will make libmad compile -- but at the expense of significant quality degradation. With this "fix", running computational accuracy tests ( http://www.underbit.com/resources/mpeg/audio/compliance ; I can provide utility which runs the test if somebody is interested) results in both max deviation and RMS being 10^3 worse than expected. This is because wrong integer multiplication is used (LSBs are just truncated, FPM_DEFAULT used). The difference is well audible. The proper fix is to update configure.ac (and configure.in, of course, by running autoconf). This patch is "elaborated" from Ubuntu package: diff --git a/configure.ac b/configure.ac index 0541425..c7151b6 100644 --- a/configure.ac +++ b/configure.ac @@ -294,6 +230,7 @@ if test -z "$FPM" && test "$GCC" = yes then case "$host" in i?86-*) FPM="INTEL" ;; + x86_64*) FPM="64BIT" ;; arm*-*) FPM="ARM" ;; mips*-*) FPM="MIPS" ;; sparc*-*) FPM="SPARC" ;; /Mykyta
-- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
