Asterisk-addons compilation: format_mp3 on 64 bit platform

My system is a Gentoo 64-bit (amd64) Intel EM64T.

I get the following compilation error:

cd /usr/src/asterisk-addons-1.2/

make clean

rm -f *.so *.o .depend
make -C format_mp3 clean
make[1]: Entering directory /usr/src/asterisk-addons-1.2/format_mp3' rm -f *.o *.so *~ make[1]: Leaving directory/usr/src/asterisk-addons-1.2/format_mp3’


./mkdep -fPIC -I…/asterisk -D_GNU_SOURCE -I/usr/include/mysql ls *.c
make -C format_mp3 all
make[1]: Entering directory /usr/src/asterisk-addons-1.2/format_mp3' gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -m64 -c -o common.o common.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -m64 -c -o dct64_i386.o dct64_i386.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -m64 -c -o decode_ntom.o decode_ntom.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -m64 -c -o layer3.o layer3.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -m64 -c -o tabinit.o tabinit.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -m64 -c -o interface.o interface.c gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -m64 -c -o format_mp3.o format_mp3.c format_mp3.c:46: error: redefinition ofstruct ast_filestream’
format_mp3.c: In function load_module': format_mp3.c:336: warning: passing arg 1 ofast_format_register’ from incompatible pointer type
format_mp3.c:336: error: too many arguments to function ast_format_register' make[1]: *** [format_mp3.o] Error 1 make[1]: Leaving directory/usr/src/asterisk-addons-1.2/format_mp3’
make: *** [format_mp3/] Error 2

svn info

Path: .
Repository UUID: bbbafe65-6c06-0410-a0a5-c710d232821c
Revision: 204
Node Kind: directory
Schedule: normal
Last Changed Author: objsys
Last Changed Rev: 202
Last Changed Date: 2006-03-02 23:56:17 +0100 (Thu, 02 Mar 2006)
Properties Last Updated: 2006-04-06 12:53:35 +0200 (Thu, 06 Apr 2006)

Compilation on a 32 bit Gentoo system completed fine.

Any clues?

This is just a guess, but some mp3 decoders use low level tricks / assembly tweeks to make things run faster. These will typically decrease the portability of the code.

In short, this code may just not work on 64 bit processors.

Has anyone gotten this to work on 64 bit processors?


Can I skip MP3 Format installation and just use mpg123 for reading mp3 files?

As a side question, I am currently using mpg123 0.59s-r9 (Gentoo ebuild). Is the warning about using nothing more recent than mpg123 0.59r still valid?

As I tell most people with questions about MP3, don’t use it unless you really have to.

For most standard applications (on hold music, playing messages, etc) you are better off converting your MP3 files to some other format like wav or raw audio first. It will free up some processor cycles as you will not have to be decoding MP3’s all the time. … hlight=mp3

To answer your question about mpg123, I think that the warning about versions is still valid, as I believe that it checks the version number when compiling.


Thanks for the suggestion and the link.

Hi. I have the same problem on a P3 733 I32. Pls let me know if you need more info. Cheers Rick.

Nu difference between Asterisk-Addons-1.2.2 and the SVN version.