-------- Original Message --------
Subject: Failed to Compile lib-mad from source
Date: Tue, 23 Jul 2013 14:47:44 +0530
From: Anshul <anshul.maheshwari@einfochips.com>
To: mad-user@lists.mars.org





-------- Original Message --------
Subject: Failed to Compile lib-mad from source
Date: Tue, 23 Jul 2013 14:39:32 +0530
From: Anshul <anshul.maheshwari@einfochips.com>
To: mad-user@lists.mars.org


HI

I was trying to compile libmad-0.15.0b or libmad-0.15.1b,
both of them failed on my computer.
Actually -fforce-mem was deprecated option to gcc and has been removed, so I feel
There is need to update configure.ac

error was (sed -e '1s|.*|/*|' -e '1b' -e '$s|.*| */|' -e '$b'  \
        -e 's/^.*/ *&/' ./COPYRIGHT; echo;  \
echo "# ifdef __cplusplus";  \
echo 'extern "C" {';  \
echo "# endif"; echo;  \
if [ ".-DFPM_INTEL" != "." ]; then  \
        echo ".-DFPM_INTEL" | sed -e 's|^\.-D|# define |'; echo;  \
fi;  \
sed -ne 's/^# *define  *\(HAVE_.*_ASM\).*/# define \1/p'  \
        config.h; echo;  \
sed -ne 's/^# *define  *OPT_\(SPEED\|ACCURACY\).*/# define OPT_\1/p'  \
        config.h; echo;  \
sed -ne 's/^# *define  *\(SIZEOF_.*\)/# define \1/p'  \
        config.h; echo;  \
for header in version.h fixed.h bit.h timer.h stream.h frame.h synth.h decoder.h; do  \
        echo;  \
        sed -n -f ./mad.h.sed ./$header;  \
done; echo;  \
echo "# ifdef __cplusplus";  \
echo '}';  \
echo "# endif") >mad.h
make  all-recursive
make[1]: Entering directory `/home/anshul/work/libmad-0.15.0b'
make[2]: Entering directory `/home/anshul/work/libmad-0.15.0b'
if /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -DFPM_INTEL -DASO_ZEROCHECK    -Wall -march=i486 -g -O -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 -fstrength-reduce -MT version.lo -MD -MP -MF ".deps/version.Tpo" \
  -c -o version.lo `test -f 'version.c' || echo './'`version.c; \
then mv -f ".deps/version.Tpo" ".deps/version.Plo"; \
else rm -f ".deps/version.Tpo"; exit 1; \
fi
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -DFPM_INTEL -DASO_ZEROCHECK -Wall -march=i486 -g -O -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 -fstrength-reduce -MT version.lo -MD -MP -MF .deps/version.Tpo -c version.c  -fPIC -DPIC -o .libs/version.lo
gcc: error: unrecognized command line option '-fforce-mem'
make[2]: *** [version.lo] Error 1
make[2]: Leaving directory `/home/anshul/work/libmad-0.15.0b'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/anshul/work/libmad-0.15.0b'
make: *** [all] Error 2

I am trying to compile by removing -fforce-mem from configure.ac
any better idea are welcomed.


Thanks
Anshul

"Sorry if my sentence look arrogant, my english is bad"


HI

I tried to remove -fforce-mem and apply autoreconf but by that my bash itself crash.
I am using OpenSuse 12.3 linux 3.7.10-1.16-pae proccessor Intel
 
thanks
Anshul


HI

I was able to compile source code after removing -fforce-mem

I have to to some additional steps other than just removing -fforce-mem
I had to run libtoolize before i could complile, because only autoreconf
does not update libtool, I dont Know what version You people use
but for me i required macro directory

confure.ac Change
32c32
<
---
> AC_CONFIG_MACRO_DIR([m4])
143d142
<           optimize="$optimize -fforce-mem"

Makefile.am Change

23a24
> ACLOCAL_AMFLAGS = -I m4

Please help me if there is any other way than this work around.

Thanks
Anshul
---------------------------------------------------------------------------------------------
Notice: 
This message has been scanned by Trend Micro Mail Security scanner and is believed to be clean
---------------------------------------------------------------------------------------------