AnsweredAssumed Answered

Compiling x264 as a dependency for linphone

Question asked by Nathan.Whittington on Mar 2, 2012
Latest reply on Mar 6, 2012 by StuH

I'm trying to compile linphone with support for video capture.  Linphone is compiling and running but I've been unable to compile x264 upon which it depends. 


I pulled down the latest x264 source and used the ffmpeg library makefile as a template.


I get a bunch of errors complaining about a missing reference to the log2f function:


make[4]: Entering directory `/home/na/source/gl/uclinux-dist/lib/cd_libx264/build'

bfin-linux-uclibc-gcc -o x264  x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/thread.o libx264.a  -mcpu=bf527-0.2 -lm -lpthread

make[4]: Entering directory `/home/na/source/gl/uclinux-dist/lib/cd_libv4l2/libv4l2'

make[4]: Nothing to be done for `all'.

make[4]: Leaving directory `/home/na/source/gl/uclinux-dist/lib/cd_libv4l2/libv4l2'

make[3]: Leaving directory `/home/na/source/gl/uclinux-dist/lib/cd_libv4l2'

libx264.a(set.o): In function `x264_sps_init':

/home/na/source/gl/uclinux-dist/lib/cd_libx264/x264/encoder/set.c:101: undefined reference to `_log2f'

libx264.a(encoder.o): In function `x264_validate_parameters':

/home/na/source/gl/uclinux-dist/lib/cd_libx264/x264/encoder/encoder.c:573: undefined reference to `_log2f'

/home/na/source/gl/uclinux-dist/lib/cd_libx264/x264/encoder/encoder.c:574: undefined reference to `_log2f'

libx264.a(analyse.o): In function `x264_analyse_prepare_costs':

/home/na/source/gl/uclinux-dist/lib/cd_libx264/x264/encoder/analyse.c:288: undefined reference to `_log2f'

libx264.a(ratecontrol.o): In function `qscale2qp':

/home/na/source/gl/uclinux-dist/lib/cd_libx264/x264/encoder/ratecontrol.c:192: undefined reference to `_log2f'

libx264.a(ratecontrol.o):/home/na/source/gl/uclinux-dist/lib/cd_libx264/x264/encoder/ratecontrol.c:192: more undefined references to `_log2f' follow

libx264.a(ratecontrol.o): In function `x264_ratecontrol_new':





I've seen the other posts discussing linking issues with x264 and math functions


But I'm not sure how to apply the information there to my problem.


I'm running the 2011R1 release of uclinux-dist, the kernel, and the toolchain (from mid-January).  I've attached my Makefile. 


Can you tell me what I need to do to my Makefile to get x264 to build?