Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#478 closed defect (fixed)

Build fails, when AMRLIBS is set in Makefile

Reported by: Wolfgang.Scherer@… Owned by: diego@…
Priority: normal Component: libavcodec
Version: unspecified Severity: normal
Keywords: VERIFIED Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

When AMR_NB or AMR_WB is set to yes, the build of libavcodec fails.

This is due to a change in version 1.242 of Makefile, where the special local
rule for library generation was replaced by the generic one.

The new extra dependency `$(LIB): $(AMRLIBS)' will cause the library generation
to fail.

Change History (14)

comment:1 Changed 14 years ago by diego@…

  • Resolution set to invalid
  • Status changed from new to closed

Works fine here. Have you followed the instructions in libavcodec/amr.c?

comment:2 Changed 14 years ago by diego@…

  • Resolution invalid deleted
  • Status changed from closed to reopened

Hmm, sorry, I think I can now reproduce the problem.

comment:3 Changed 14 years ago by diego@…

  • Status changed from reopened to assigned

comment:4 Changed 14 years ago by diego@…

  • Resolution set to worksforme
  • Status changed from assigned to closed

I cannot reproduce the problem. Please provide exact instructions for
triggering this issue.

comment:5 Changed 14 years ago by Wolfgang.Scherer@…

  • Resolution worksforme deleted
  • Status changed from closed to reopened

As you can see at the end:

ar: amrlibs: No such file or directory

a file called `amrlibs' is not found.

Here is my configure call:

./configure --prefix=/usr/local \

--enable-mp3lame \
--enable-libogg \
--enable-vorbis \
--enable-faad \
--enable-faac \
--enable-xvid \
--enable-a52 \
--enable-pp \
--enable-shared \
--enable-pthreads \
--enable-libgsm \
--enable-dts \
--enable-amr_nb \
--enable-amr_nb-fixed \
--enable-amr_wb \
--enable-amr_if2 \
--enable-dc1394 \
--enable-theora \
--enable-x264 \
--enable-gpl

This is the output from make on my system:

cd ~/develop/EXTERNAL/mplayer/ffmpeg/libavcodec/
(unset LANG; make -k )
make -C amr spclib fipoplib
make[1]: Entering directory
`/home/ws/develop/EXTERNAL/mplayer/ffmpeg/libavcodec/amr'
ar rc spc.a agc.o autocorr.o az_lsp.o bits2prm.o cl_ltp.o convolve.o c1035pf.o
d_plsf.o d_plsf_5.o d_gain_c.o d_gain_p.o dec_lag6.o d1035pf.o cor_h.o
enc_lag3.o enc_lag6.o g_code.o g_pitch.o int_lpc.o inter_36.o inv_sqrt.o
lag_wind.o levinson.o lsp_az.o lsp_lsf.o ol_ltp.o pitch_fr.o pitch_ol.o pow2.o
pre_big.o pre_proc.o pred_lt.o preemph.o prm2bits.o pstfilt.o q_gain_c.o
q_gain_p.o q_plsf.o q_plsf_5.o lsfwt.o reorder.o residu.o lsp.o lpc.o ec_gains.o
spreproc.o syn_filt.o weight_a.o qua_gain.o gc_pred.o q_plsf_3.o post_pro.o
dec_lag3.o dec_gain.o d_plsf_3.o d4_17pf.o c4_17pf.o d3_14pf.o c3_14pf.o
d2_11pf.o c2_11pf.o d2_9pf.o c2_9pf.o cbsearch.o spstproc.o gain_q.o cod_amr.o
dec_amr.o sp_enc.o sp_dec.o ph_disp.o g_adapt.o calc_en.o qgain795.o qgain475.o
sqrt_l.o set_sign.o s10_8pf.o bgnscd.o gmed_n.o mac_32.o ex_ctrl.o c_g_aver.o
lsp_avg.o int_lsf.o c8_31pf.o d8_31pf.o p_ol_wgh.o ton_stab.o vad1.o dtx_enc.o
dtx_dec.o a_refl.o b_cn_cod.o calc_cor.o hp_max.o vadname.o vad2.o r_fft.o
lflg_upd.o e_homing.o d_homing.o
ranlib spc.a
ar rc fipop.a basicop2.o count.o oper_32b.o copy.o log2.o set_zero.o strfunc.o
n_proc.o sid_sync.o
ranlib fipop.a
make[1]: Leaving directory `/home/ws/develop/EXTERNAL/mplayer/ffmpeg/libavcodec/amr'
rm -f libavcodec.a
ar rc libavcodec.a bitstream.o utils.o mem.o allcodecs.o mpegvideo.o jrevdct.o
jfdctfst.o jfdctint.o mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o
dsputil.o motion_est.o imgconvert.o imgresample.o mpeg12.o mpegaudiodec.o pcm.o
simple_idct.o ratecontrol.o adpcm.o eval.o error_resilience.o fft.o mdct.o raw.o
golomb.o cabac.o dpcm.o adx.o faandct.o parser.o g726.o vp3dsp.o h264idct.o
rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o opt.o aasc.o alac.o asv1.o avs.o
cinepak.o cook.o cljr.o cyuv.o dvbsubdec.o dvbsub.o dvdsub.o dvdsubenc.o dv.o
8bps.o ffv1.o flac.o flicvideo.o 4xm.o fraps.o h261.o h264.o huffyuv.o
idcinvideo.o indeo2.o indeo3.o interplayvideo.o kmvc.o lcl.o loco.o mace.o
msrle.o msvideo1.o png.o qdm2.o qdrw.o qpeg.o qtrle.o ra144.o ra288.o roqvideo.o
rpza.o rv10.o shorten.o smacker.o smc.o snow.o sonic.o svq1.o truemotion1.o
truemotion2.o truespeech.o tta.o tscc.o cscd.o lzo.o nuv.o rtjpeg.o ulti.o vc9.o
vcr1.o vmdav.o vorbis.o vp3.o vqavideo.o wmadec.o wnv1.o ws-snd1.o xan.o xl.o
bmp.o mmvideo.o zmbv.o pthread.o amrwb_float/dec_acelp.o amrwb_float/dec_dtx.o
amrwb_float/dec_gain.o amrwb_float/dec_if.o amrwb_float/dec_lpc.o
amrwb_float/dec_main.o amrwb_float/dec_rom.o amrwb_float/dec_util.o
amrwb_float/enc_acelp.o amrwb_float/enc_dtx.o amrwb_float/enc_gain.o
amrwb_float/enc_if.o amrwb_float/enc_lpc.o amrwb_float/enc_main.o
amrwb_float/enc_rom.o amrwb_float/enc_util.o amrwb_float/if_rom.o amr.o a52dec.o
liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o liba52/imdct.o
liba52/parse.o liba52/crc.o liba52/resample.o dtsdec.o faad.o faac.o xvidff.o
xvid_rc.o x264.o mp3lameaudio.o oggvorbis.o oggtheora.o libgsm.o i386/fdct_mmx.o
i386/cputest.o i386/dsputil_mmx.o i386/mpegvideo_mmx.o i386/idct_mmx.o
i386/motion_est_mmx.o i386/simple_idct_mmx.o i386/fft_sse.o i386/vp3dsp_mmx.o
i386/vp3dsp_sse2.o i386/fft_3dn.o i386/fft_3dn2.o i386/snowdsp_mmx.o
i386/idct_mmx_xvid.o amrlibs amr/*.o

ar: amrlibs: No such file or directory
make: * [libavcodec.a] Error 1
make: Target `all' not remade because of errors.

comment:6 Changed 14 years ago by diego@…

  • Status changed from reopened to assigned

OK, I figured this out. The problem only appears when you configure with *both*
--enable-amr_nb and --enable-amr_nb-fixed.

comment:7 Changed 14 years ago by diego@…

This is a dog to debug.. I'm under the impression that it never really worked.

Can you tell me a CVS date where amr_nb-fixed both compiled and produced sound?
I've tried 20060210 with no success.

comment:8 Changed 14 years ago by Wolfgang.Scherer@…

The last time it worked for me was on 2005-11-27.

The change was made on 20060213, so this version will not compile.

If you use 20060212, it should work.

This is how the library was created before:

-$(LIB): $(OBJS) $(AMRLIBS)

  • rm -f $@
  • $(AR) rc $@ $(OBJS) $(AMREXTRALIBS)
  • $(RANLIB) $@

-
-$(SLIBNAME): $(OBJS)

  • $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)

-ifeq ($(CONFIG_WIN32),yes)

  • -lib /machine:i386 /def:$(@:.dll=.def)

-endif
-

This works for me:

--- Makefile.~1.252.~ 2006-04-26 09:35:30.000000000 +0200
+++ Makefile 2006-04-26 20:47:34.000000000 +0200
@@ -420,9 +420,11 @@

EXTRAOBJS = $(AMREXTRALIBS)


+all: $(AMRLIBS)
+

include $(SRC_PATH)/common.mak


-$(LIB): $(AMRLIBS)
+#$(LIB): $(AMRLIBS)

amrlibs:

$(MAKE) -C amr spclib fipoplib

comment:9 Changed 14 years ago by diego@…

(In reply to comment #7)

The last time it worked for me was on 2005-11-27.

The change was made on 20060213, so this version will not compile.

If you use 20060212, it should work.

I repeat: I was using 20060210. No success.

This works for me:

--- Makefile.~1.252.~ 2006-04-26 09:35:30.000000000 +0200
+++ Makefile 2006-04-26 20:47:34.000000000 +0200
@@ -420,9 +420,11 @@

EXTRAOBJS = $(AMREXTRALIBS)


+all: $(AMRLIBS)
+

include $(SRC_PATH)/common.mak


-$(LIB): $(AMRLIBS)
+#$(LIB): $(AMRLIBS)

amrlibs:

$(MAKE) -C amr spclib fipoplib

This fails for me when linking:

gcc -Wl,--warn-common -rdynamic -g -o ffmpeg_g ffmpeg.o cmdutils.o
-L./libavformat -lavformat -L./libavcodec -lavcodec -L./libavutil -lavutil -lm
-lz -ldl
./libavcodec/libavcodec.a(amr.o)(.text+0x249): In function amr_nb_decode_frame':
/usr/src/mplayer/ffmpeg/libavcodec/amr.c:248: undefined reference to `UnpackBits?'
./libavcodec/libavcodec.a(amr.o)(.text+0x3b4): In function amr_nb_encode_frame':
/usr/src/mplayer/ffmpeg/libavcodec/amr.c:318: undefined reference to `PackBits?'
collect2: ld returned 1 exit status

comment:10 Changed 14 years ago by diego@…

(In reply to comment #7)

The last time it worked for me was on 2005-11-27.

I get the same linking failure with that CVS snapshot.

comment:11 Changed 14 years ago by diego@…

Scratch the comments about the linking failure, I can fully reproduce the
problem now and your patch does indeed fix it.

comment:12 Changed 14 years ago by diego@…

  • Resolution set to fixed
  • Status changed from assigned to closed

I just committed a fix for this issue to FFmpeg CVS.

comment:13 Changed 14 years ago by diego@…

And now it not only builds but works as well, another fix just went into CVS.

comment:14 Changed 14 years ago by Wolfgang.Scherer@…

  • Keywords VERIFIED added

Thanks

Note: See TracTickets for help on using tickets.