2014年3月19日 星期三

Rapberry+ffmpeg+openmax+x264 cross complier at debian 7.1 issue

今天cross complier 出現下列錯誤,

1.

/libavcodec.a(iirfilter.o): undefined reference to symbol 'tan@@GLIBC_2.4'

解決方案:

在Makefile 加上-lm


2.

lib/libx264.a(opencl.o): undefined reference to symbol 'dlsym@@GLIBC_2.4'
lib/arm-linux-gnueabihf/libdl.so.2: error adding symbols: DSO missing from command line

解決方案:

在Makefile 加上-ldl

3.

/home/frank/ffmpeg/libavfilter/vf_pp.c:132: undefined reference to `pp_postprocess'
/home/frank/hpbProject/ffmpeg_RPi/rpi_app/opt/ffmpeg_RPi/stuff/lib/libavfilter.a(vf_pp.o): In function `pp_config_props':
/home/frank/ffmpeg/libavfilter/vf_pp.c:105: undefined reference to `pp_get_context'
/home/frank/hpbProject/ffmpeg_RPi/rpi_app/opt/ffmpeg_RPi/stuff/lib/libavfilter.a(vf_pp.o): In function `pp_uninit':
/home/frank/ffmpeg/libavfilter/vf_pp.c:151: undefined reference to `pp_free_mode'
/home/frank/ffmpeg/libavfilter/vf_pp.c:153: undefined reference to `pp_free_context'
/home/frank/hpbProject/ffmpeg_RPi/rpi_app/opt/ffmpeg_RPi/stuff/lib/libavfilter.a(vf_pp.o): In function `pp_init':
/home/frank/ffmpeg/libavfilter/vf_pp.c:56: undefined reference to `pp_get_mode_by_name_and_quality'
collect2: error: ld returned 1 exit status

解決方案:

在Makefile 加上-ldl

載入載入libb有順序要求

-L$(FFMPEG_DIR)/lib -lpostproc -lavcodec -lavdevice -lavfilter -lavformat -lavuti    l -lswresample -lswscale -lx264

from:
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-July/127433.html

Le quartidi 24 messidor, an CCXX, Chau Pham a écrit :
> LIBS = -lpostproc -lswresample -lswscale -lavfilter -lavdevice -lavformat -lavcodec -lavutil -lm -ldl -Wl

Since you are about tu use static libraries (you did not put --enable-shared
and the error messages show .a files), the -l options must be in dependency
order. For example, libavfilter uses libswresample and libswscale and is
used by libavdevice, so -lavfilter must come after -lavdevice but before
-lswscale and -lswresample. You need also to explicitly add the few system
libraries ffmpeg depends on in its default build; you already added -lm and
-ldl, but you probably need also libz, and possibly the ALSA, SDL, JACK,
etc., libraries, depending on what configure has found.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120711/0344cab9/attachment.asc>