Weston is not linking libm

darxus at chaosreigns.com darxus at chaosreigns.com
Sat May 26 05:45:04 PDT 2012


I can't get weston to build since the webm support for wcap (video capture)
was added.  With the latest wayland, weston, and vpx git masters (on ubuntu
oneric):

/home/darxus/source.test.master/weston/wcap/vpxenc.c:1388: undefined reference to `log'
wcap_decode-vpxenc.o: In function `vp8_mse2psnr':
/home/darxus/source.test.master/weston/wcap/vpxenc.c:1042: undefined reference to `log10'
/home/darxus/install.test.master/lib/libvpx.a(rdopt.c.o): In function `vp8_initialize_rd_consts':
(.text+0x3795): undefined reference to `pow'

08:06AM < thiago> you're missing -lm

That makes sense, but what should I do about it?  I have
/usr/lib/x86_64-linux-gnu/libm.so.  

Makefile:WCAP_LIBS = -L/home/darxus/install.test.master/lib -lcairo -lvpx  

That's missing -lm?  Just adding -lm to that line doesn't seem to get make
to work.  With "make V=1", no -lm:


/bin/bash ../libtool  --tag=CC   --mode=link gcc -pthread -I/home/darxus/install.test.master/include/cairo -I/home/darxus/install.test.master/include/pixman-1 -I/home/darxus/install.test.master/include -I/home/darxus/install.test.master/include/libdrm -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libpng12   -g -O2   -o wcap-decode wcap_decode-args.o wcap_decode-EbmlWriter.o wcap_decode-tools_common.o wcap_decode-vpxenc.o wcap_decode-y4minput.o wcap_decode-wcap-decode.o -L/home/darxus/install.test.master/lib -lcairo -lvpx   
libtool: link: gcc -pthread -I/home/darxus/install.test.master/include/cairo -I/home/darxus/install.test.master/include/pixman-1 -I/home/darxus/install.test.master/include -I/home/darxus/install.test.master/include/libdrm -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -o wcap-decode wcap_decode-args.o wcap_decode-EbmlWriter.o wcap_decode-tools_common.o wcap_decode-vpxenc.o wcap_decode-y4minput.o wcap_decode-wcap-decode.o  -L/home/darxus/install.test.master/lib /home/darxus/install.test.master/lib/libcairo.so -lvpx -pthread -Wl,-rpath -Wl,/home/darxus/install.test.master/lib -Wl,-rpath -Wl,/home/darxus/install.test.master/lib


Looks like WCAP_LIBS is defined by this line in configure:
  pkg_cv_WCAP_LIBS=`$PKG_CONFIG --libs "cairo vpx" 3>/dev/null`

When I run that:
$ pkg-config --libs "cairo vpx"
-L/home/darxus/install.test.master/lib -lcairo -lvpx  

It seems like it should be something like "cairo vpx m", but there doesn't
seem to be an m.pc for it to find.

-- 
"Let's just say that if complete and utter chaos was lightning, then
he'd be the sort to stand on a hilltop in a thunderstorm wearing wet
copper armour and shouting 'All gods are bastards'." - The Color of Magic
http://www.ChaosReigns.com


More information about the wayland-devel mailing list