Discussion:
[mad-user] compile error on linux
Yamamoto Kazuko
2006-06-08 00:25:09 UTC
Permalink
I have problem in compiling madplay on linux(RedHat Linux7.3).
I've found similar problem in this archive, but it didn't help.

1. I downloaded libid3tag-0.15.1b.tar.gz, libmad-0.15.1b.tar.gz, madplay-0.15.1b.tar.gz

2. I configured, maked and installed libid3tag and libmad, which were successful.
I also confirmed that there are mad.h and id3tag.h under /usr/local/include.

3. I tried to make madplay, then I got following messages.

-----compile messages starts here
gcc -Wall -march=i486 -g -O2 -pg -pg -o madplay madplay.o getopt.o getopt1.o version.o
resample.o filter.o tag.o crc.o player.o audio.o audio_aiff.o audio_cdda.o audio_hex.o
audio_null.o audio_raw.o audio_snd.o audio_wave.o audio_esd.o audio_oss.o
/usr/lib/libesd.so -L/usr/lib -laudiofile -lmad -lid3tag -lm
resample.o: In function `resample_init':
/home/kazu/mad/madplay-0.15.1b/resample.c:46: undefined reference to `mad_f_div'
player.o: In function `show_id3':
/home/kazu/mad/madplay-0.15.1b/player.c:644: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:678: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:684: undefined reference to `id3_frame_field'
player.o: In function `process_id3':
/home/kazu/mad/madplay-0.15.1b/player.c:1232: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1278: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1278: undefined reference to `id3_field_getlatin1'
/home/kazu/mad/madplay-0.15.1b/player.c:1279: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1342: undefined reference to `id3_frame_field'
/usr/lib/libid3tag.a(util.o): In function `id3_util_compress':
util.o(.text+0x12f): undefined reference to `compress2'
/usr/lib/libid3tag.a(util.o): In function `id3_util_decompress':
util.o(.text+0x196): undefined reference to `uncompress'
collect2: ld returned 1 exit status
make[2]: *** [madplay] $B%(%i!<(B 1
make[2]: $B=P$^$9(B $B%G%#%l%/%H%j(B `/home/kazu/mad/madplay-0.15.1b'
make[1]: *** [all-recursive] $B%(%i!<(B 1
make[1]: $B=P$^$9(B $B%G%#%l%/%H%j(B `/home/kazu/mad/madplay-0.15.1b'
make: *** [all] $B%(%i!<(B 2
----compile message end

If someone know the solution, please give me advise.
Thank you in advance,
Kazu
Rob Leslie
2006-06-08 01:59:45 UTC
Permalink
Post by Yamamoto Kazuko
I have problem in compiling madplay on linux(RedHat Linux7.3).
I've found similar problem in this archive, but it didn't help.
1. I downloaded libid3tag-0.15.1b.tar.gz, libmad-0.15.1b.tar.gz, madplay-0.15.1b.tar.gz
2. I configured, maked and installed libid3tag and libmad, which were successful.
I also confirmed that there are mad.h and id3tag.h under /usr/
local/include.
3. I tried to make madplay, then I got following messages.
-----compile messages starts here
gcc -Wall -march=i486 -g -O2 -pg -pg -o madplay madplay.o getopt.o
getopt1.o version.o resample.o filter.o tag.o crc.o player.o
audio.o audio_aiff.o audio_cdda.o audio_hex.o audio_null.o
audio_raw.o audio_snd.o audio_wave.o audio_esd.o audio_oss.o /usr/
lib/libesd.so -L/usr/lib -laudiofile -lmad -lid3tag -lm
/home/kazu/mad/madplay-0.15.1b/resample.c:46: undefined reference to `mad_f_div'
/home/kazu/mad/madplay-0.15.1b/player.c:644: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:678: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:684: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1232: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1278: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1278: undefined reference to `id3_field_getlatin1'
/home/kazu/mad/madplay-0.15.1b/player.c:1279: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1342: undefined reference to `id3_frame_field'
util.o(.text+0x12f): undefined reference to `compress2'
util.o(.text+0x196): undefined reference to `uncompress'
collect2: ld returned 1 exit status
You are probably linking against older versions of the libid3tag and
libmad libraries, rather than your newly installed ones.

If you installed shared libraries, you may need to run ldconfig to
update the shared library cache, after verifying the library
installation directory is in the ld.so search path. See the ldconfig
(8) man page for details.

As a last resort, you can explicitly specify the location of the
newly installed libraries when running configure for madplay, e.g.:

./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/
lib"
--
Rob Leslie
***@mars.org
Yamamoto Kazuko
2006-06-09 06:33:52 UTC
Permalink
Dear Leslie-san,

Thank you very much for your quick response.
My linux machine(RedHat Linux7.3 ) has no copy of MAD. It is a
new machine. Anyway I tried ldconfig but it was not successful.

I used another machine with RHEL3 and I succedded to build
madplay.exe.
Maybe gcc2.96 is too old.

Thank you again!

----- Original Message -----
From: "Rob Leslie" <***@mars.org>
To: <mad-***@lists.mars.org>
Sent: Thursday, June 08, 2006 10:59 AM
Subject: Re: [mad-user] compile error on linux
Post by Rob Leslie
Post by Yamamoto Kazuko
I have problem in compiling madplay on linux(RedHat Linux7.3).
I've found similar problem in this archive, but it didn't help.
1. I downloaded libid3tag-0.15.1b.tar.gz, libmad-0.15.1b.tar.gz, madplay-0.15.1b.tar.gz
2. I configured, maked and installed libid3tag and libmad, which were successful.
I also confirmed that there are mad.h and id3tag.h under /usr/
local/include.
3. I tried to make madplay, then I got following messages.
-----compile messages starts here
gcc -Wall -march=i486 -g -O2 -pg -pg -o madplay madplay.o getopt.o
getopt1.o version.o resample.o filter.o tag.o crc.o player.o
audio.o audio_aiff.o audio_cdda.o audio_hex.o audio_null.o
audio_raw.o audio_snd.o audio_wave.o audio_esd.o audio_oss.o /usr/
lib/libesd.so -L/usr/lib -laudiofile -lmad -lid3tag -lm
/home/kazu/mad/madplay-0.15.1b/resample.c:46: undefined reference to `mad_f_div'
/home/kazu/mad/madplay-0.15.1b/player.c:644: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:678: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:684: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1232: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1278: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1278: undefined reference
to `id3_field_getlatin1'
/home/kazu/mad/madplay-0.15.1b/player.c:1279: undefined reference to `id3_frame_field'
/home/kazu/mad/madplay-0.15.1b/player.c:1342: undefined reference to `id3_frame_field'
util.o(.text+0x12f): undefined reference to `compress2'
util.o(.text+0x196): undefined reference to `uncompress'
collect2: ld returned 1 exit status
You are probably linking against older versions of the libid3tag and
libmad libraries, rather than your newly installed ones.
If you installed shared libraries, you may need to run ldconfig to
update the shared library cache, after verifying the library
installation directory is in the ld.so search path. See the ldconfig
(8) man page for details.
As a last resort, you can explicitly specify the location of the
./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/
lib"
--
Rob Leslie
Loading...