pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/44471: graphics/cairo compile failure - renderproto / x11-links issue (NetBSD 5.0)
>Number: 44471
>Category: pkg
>Synopsis: graphics/cairo compile failure - renderproto / x11-links issue
>(netBSD 5.0)
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 27 09:25:00 +0000 2011
>Originator: Robert Elz
>Release: NetBSD 5.0 (pkgsrc current(HEAD): 2011-01-27)
>Organization:
Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 5.1 NetBSD 5.1 (JADE-1.12-20101117) #5: Wed
Nov 17 05:30:55 ICT 2010
kre%jade.coe.psu.ac.th@localhost:/usr/obj/5.1/kernels/i386/JADE i386
Architecture: i386
Machine: i386
>Description:
Attempting to build graphics/cairo fails on NetBSD 5.0
(and I assume 5.0.* though I have not tested that)
because of a renderproto problem brought about by
faulty logic in x11-links.
>How-To-Repeat:
Using NetBSD 5.0 (none of 4.* 5.1 nor current will do to see this)
(I have no idea how this affects non-NetBSD systems, if at all)
attempt to build graphics/cairo using pkgsrc head (current
versions of everything).
I use pkg_comp with NetBSD 5.0 release sets installed (I want to
build binary packages I can install on any NetBSD 5* system of
the appropriate architecture). I'm using i386 for this, but I
doubt that matters. I'm also using libkver so we get a proper
NetBSD 5.0 environment, though for this problem I doubt that
matters, what counts is that 5.0 release sets are installed.
In that environment (with native X11, not pkgsrc modular)
expect to see ...
CC cairo-deflate-stream.lo
CC cairo-xlib-display.lo
In file included from cairo-xlib-private.h:41,
from cairo-xlib-display.c:38:
cairo-xlib-xrender-private.h:105: error: redefinition of 'struct _XCircle'
cairo-xlib-xrender-private.h:109: error: redefinition of typedef 'XCircle'
/pkg_comp/obj/pkgsrc/graphics/cairo/5/.x11-buildlink/include/X11/extensions/Xrender.h:150:
error: previous declaration of 'XCircle' was here
cairo-xlib-xrender-private.h:110: error: redefinition of 'struct
_XLinearGradient'
cairo-xlib-xrender-private.h:113: error: redefinition of typedef
'XLinearGradient'
/pkg_comp/obj/pkgsrc/graphics/cairo/5/.x11-buildlink/include/X11/extensions/Xrender.h:189:
error: previous declaration of 'XLinearGradient' was here
cairo-xlib-xrender-private.h:115: error: redefinition of 'struct
_XRadialGradient'
cairo-xlib-xrender-private.h:118: error: redefinition of typedef
'XRadialGradient'
/pkg_comp/obj/pkgsrc/graphics/cairo/5/.x11-buildlink/include/X11/extensions/Xrender.h:194:
error: previous declaration of 'XRadialGradient' was here
cairo-xlib-xrender-private.h:120: error: redefinition of 'struct
_XConicalGradient'
cairo-xlib-xrender-private.h:123: error: redefinition of typedef
'XConicalGradient'
/pkg_comp/obj/pkgsrc/graphics/cairo/5/.x11-buildlink/include/X11/extensions/Xrender.h:199:
error: previous declaration of 'XConicalGradient' was here
*** Error code 1
Stop.
make: stopped in /pkg_comp/obj/pkgsrc/graphics/cairo/5/cairo-1.10.2/src
*** Error code 1
Stop.
A workaround for this is to (effectively) revert x11/renderproto
to its state before the fix to allow systems still based on the
old XFree to work, I used the following patch ...
Index: buildlink3.mk
===================================================================
RCS file: /cvsroot/NetBSD/pkgsrc/x11/renderproto/buildlink3.mk,v
retrieving revision 1.14
diff -u -r1.14 buildlink3.mk
--- buildlink3.mk 22 Dec 2010 23:41:30 -0000 1.14
+++ buildlink3.mk 27 Jan 2011 08:24:50 -0000
@@ -10,7 +10,7 @@
.if ${X11_TYPE} == "native"
. include "../../mk/x11.buildlink3.mk"
. if ${BUILTIN_X11_TYPE.native} == "XFree86"
-RENDERPROTO_RENDERPROTO9=1
+# RENDERPROTO_RENDERPROTO9=1
. endif
.endif
( And then rebuild x11-links ).
Obviously (I hope) I am not expecting anyone to install
that (or anything like it) - that would just be breaking other
systems to fix this one (it works for me because I don't have
those other systems - if I compile for NetBSD 4 I'm using
pkgsrc modular X11 instead of the native version).
The underlying cause of the problem seems to be the following logic
in pkgtools/x11-links/version.mk
BUILTIN_X11_TYPE.XFree86= XFree86
BUILTIN_FIND_FILES_VAR:= CF_XFREE86 CF_XFREE86_VERSION
BUILTIN_FIND_FILES.CF_XFREE86= ${X11BASE}/lib/X11/config/xfree86.cf
BUILTIN_FIND_FILES.CF_XFREE86_VERSION= ${X11BASE}/lib/X11/config/version.def
.include "../../mk/buildlink3/find-files.mk"
.if !defined(BUILTIN_X11_VERSION.XFree86) && \
exists(${CF_XFREE86}) && exists(${CF_XFREE86_VERSION})
BUILTIN_X11_VERSION.XFree86!= \
....
The awk script that sets BUILTIN_X11_VERSION.XFree86 omitted
here as that's not the problem.
The assumption in that test is that if both xfree86.cf and
version.def exist (in the appropriate place) then the system is
an old XFree86 based X11, and for NetBSD 5.0 that's just not true.
It has both of those files, but is xorg based (it also has xorg.cf)
The version in version.def is 4.3.99.902.
This problem isn't seen on 5.1 or current, as in those version.def
has been removed, and a new file, xorgversion.def has appeared in
its place.
But pkgsrc is supposed to still be supporting 5.0 so I think we
need a fix, but I don't feel qualified to work out what the
proper fix should be.
One possibility would be to test for xorg.cf and if it exists,
than we know it is not XFree86 (I think...)
>Fix:
The workaround above works for me, but is clearly bogus.
ps: around Christmas or New year, when renderproto was causing
cairo build failures for similar reasons, I had half of this
analysis done (when the problem was depected as a Makefile
syntax error, or something) but didnt have time to look into it
enough to send any comments - but even then, the base cause of
the problem looked to me to be that x11-links (though I was not
yet sure then that's where it happened) was mis-identifying the
X version, and doig XFree86 things to an xorg based system.
Home |
Main Index |
Thread Index |
Old Index