cairomm fails to find/read/use cairo.pc files (as far as I can tell ) and so does not add relevant -I flags.
Build host is running 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE amd64, zpool v28.
Hw is dell vostro 460 with 8gb ram and corei7-2600.
(Same thing happens for a few other packages as well:
graphics/gstreamer-plugins-cairo
x11-toolkits/pango
graphics/poppler-glib
graphics/py-cairo
graphics/cairomm
sysutils/fusefs-kmod
print/libspectre
graphics/opencv
x11-drivers/xf86-video-vesa
x11-drivers/xf86-input-keyboard
x11-drivers/xf86-input-mouse)
I made a tarball containing my options-dir, my make.conf the logs and the list I used, which could probably be shortened somewhat just to produce the error. The tarball is available at http://benriach.widell.net/~andrnils/poudriere-pc.tar.gz
Best regards
Andreas
andrnils added on 2012-09-18 10:41:26 UTC:
I think I spotted what might be the problem:
On my desktop a config.log contains
pkg_cv_CAIROMM_CFLAGS='-I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include/cairo -D_REENTRANT -I/usr/l
ocal/include/glib-2.0 -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libdrm -I/usr/local/include/libpng1
5 -D_THREAD_SAFE -I/usr/local/include '
pkg_cv_CAIROMM_LIBS='-lsigc-2.0 -lfreetype -lpng15 -lz -lcairo -pthread -lXrender -L/usr/local/lib -lX11 '
and when build with poudriere
pkg_cv_CAIROMM_CFLAGS=''
pkg_cv_CAIROMM_LIBS='-lsigc-2.0 -lfreetype -lpng15 -lz -lcairo -pthread -lXrender -L/usr/local/lib -lX11 '
I believe this is due to Makefile.in being patched to have pkgconfigdir = $(prefix)/libdata/pkgconfig instead of pkgconfigdir = $(libdir)/pkgconfig
And then noticing that poudriere ( in a testport run ) calls configure as
$ ./configure --prefix=/tmp/cairomm-1.10.0_1 --mandir=/tmp/cairomm-1.10.0_1/man --infodir=/tmp/cairomm-1.10.0_1/info/ --build=amd64-portbld-freebsd9.1 so $(prefix)/libdata/pkgconfig will not exist.
For bulk build ./configure is called
$ ./configure --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --build=amd64-portbld-freebsd9.1 so why pkgconf fails to set pkg_cv_CAIROMM_CFLAGS in a bulk build I dont know.
Hope it helps.
andrnils added on 2012-09-18 21:43:28 UTC:
Well, I spent some more time on this.
There seems to be different categories:
1.) Port is broken, ie does not specify actual requirments.
2.) Port seems ok, but pkgconfig fails to do its thing. It works for libs but not cflags, so digging a bit in configure-scripts seems to indicate that an indication of "Package found" and no cflags being set is that ${PACKAGE}_CFLAGS is non-null.
Does this ring any bells?
bapt added on 2012-09-20 09:58:52 UTC:
do you have WITH_NEW_XORG activated?
andrnils added on 2012-09-21 14:52:04 UTC:
Yes, that I do.
If ones does modify the Makefile for the ports in question to specify the correct CPPFLAGS ( or often packate_CFLAGS in autotools ) builds does work.
andrnils added on 2012-09-21 19:43:38 UTC:
Update: without WITH_NEW_XORG=YES and WITH_KMS=YES in make.conf the build happily churned along past several ports that gave me troubles before. But the machine seems to have hanged ( a dedicated build machine ). I'll get back with more info when I reset it.
Main takeaway: WITH_NEW_XORG and WITH_KMS seems to break something related to pkg-config. Interesting.
andrnils added on 2012-09-21 20:01:18 UTC:
Another data-point, even though this seems not to be a poudriere bug:
I actually use xorg-dev as well, so not only WITH_NEW_XORG, but really new xorg ;)
andrnils added on 2012-09-23 21:35:29 UTC:
After doing another run without WITH_NEW_XORG that resulted in a hang ( out-of-swap ), I realized that I had enough.
I started a new build with WITH_NEW_XORG ( but no xorg-dev ports tree ) which fails on the same list of packages. This time I started looking at py-cairo. Just as ./configure was being started I did ^Z and then proceded to break into the specfic builder jail. I tried to run pkgconf --cflags cairo. Results: It wouldn't run as glproto was missing. After adding glproto (and deps ) I exited the jail and un-suspended the build. It completed!
Does WITH_NEW_XORG bring in pkgconf instead of pkgconfig? Why would ( from configure )
($PKG_CONFIG --exists --print-errors "cairo >= $cairo_required") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_CAIRO_CFLAGS=$PKG_CONFIG --cflags "cairo >= $cairo_required" 2>/dev/null
suddenly stop working. When I run just pkgconf --cflags cairo I got exit status 1.
Adding USE_XORG= glproto makes at least cairomm build.
bapt added on 2012-09-24 21:30:54 UTC:
Thanks for tracking this down, it them seems to be a bug, in the cairomm port :), I'll check with x11@ people
Thanks.
Bapt
andrnils added on 2012-09-24 22:05:17 UTC:
Thanks for not just writing it off as not a poudriere bug :)
I think it goes deeper than just cairomm. It affects at least ( off the top of my head, as I accidentally removed the fixed makefile :/ ): gtk-update-icon-cache pangomm cairomm py-cairo py-gobject firefox dconf gstreamer-plugin-{cairo,pango} gtk20 gtk-engines2 graphviz opencv
I think the underlying problem is that glproto should be list in LIB_PC_DEPENDS in bsd.xorg.mk and hopefully actually get picked up as a dependency in cairo. I just started a run in such a config, I'll get back with the results :)
andrnils added on 2012-09-25 06:04:41 UTC:
So, this patch fixes the problem:
--- Mk/bsd.xorg.mk.orig 2012-05-23 10:17:49.000000000 +0200
+++ Mk/bsd.xorg.mk 2012-09-24 23:53:03.254020147 +0200
@@ -166,7 +166,7 @@
fontenc_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/fontenc.pc:${PORTSDIR}/x11-fonts/libfontenc
fontsproto_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/fontsproto.pc:${PORTSDIR}/x11-fonts/fontsproto
fontutil_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/fontutil.pc:${PORTSDIR}/x11-fonts/font-util
-glproto_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/glproto.pc:${PORTSDIR}/x11/glproto
+glproto_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/glproto.pc:${PORTSDIR}/x11/glproto
ice_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/ice.pc:${PORTSDIR}/x11/libICE
inputproto_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/inputproto.pc:${PORTSDIR}/x11/inputproto
kbproto_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/kbproto.pc:${PORTSDIR}/x11/kbproto
The build finished correctly :)
andrnils added on 2012-09-25 06:40:00 UTC:
I filed a pr for this :)
bapt added on 2012-09-25 17:22:25 UTC:
Nope :), the right fix is to use:
USE_XORG= glproto:both
In the cairo ports in case the GL option is activated
andrnils added on 2012-09-25 20:11:26 UTC:
As side note: I ran a new build using xorg-dev tree as well. For the patch with glproto is not enough there, I think same modification is needed for dri2proto.
Build running.
bapt added on 2012-09-30 20:24:08 UTC:
Fixed in the ports tree