tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

some x11 stuff in pkgsrc is hopelessly broken for slightly older systems



So I have this collection of machines (well, two, but they're Xen
servers), and several of them, including the dom0s run a NetBSD-7.99.5
from about March of last year.

Now they happen to have X11 native (i.e. XFree86).  (I.e. they were
built before XFree86 was nuked, and that was what I used because it
works for me and I have some local patches and fixes in it.)

At the moment I cannot replace that X11 install or otherwise upgrade
these systems (especially not the dom0 hosts).

I've been trying to build some packages from pkgsrc-current for them
though but I've been running into no end of major brokenness with some
X11 related stuff.

The new regime for X11 packages seems to be to rely on pkg-config files,
but this is severely broken for systems without the base xsrc .pc files
because of the fact that the almost forever-supported standard options
for setting the X11 "system" header and library flags are gone
(i.e. there's no more standard support for -x-includes=DIR and
-x-libraries=DIR in autoconf for X11 packages).  Unfortunately I guess
there's not much that can be done about that -- it seems to be a fait
accompli.

Now it wouldn't be so bad if packages were actually tested on machines
with "native" X11 before they're committed and fixed/patched to support
x11-native if it doesn't work, but that doesn't seem to be happening.

Maybe x11-links should fake up the missing pkg-config files instead
though.  That would solve the problem universally without per-package
hacking (because there's no such thing as a standard here, like there
used to be with -x-includes=DIR and -x-libraries=DIR).

So far I've encountered problems with x11/libXaw3d, x11/libXft, and
x11/libXrender..

I worked around the configure issues only to be faced with compile
failures.

libXaw3d blows up compiling with something that may be related to yacc
or bison.  I can work around that, i.e. avoid it entirely by switching
my XAW_TYPE back to xpm.

However libXft blows up as follows and I've no clue why:

  CC       xftglyphs.lo
xftglyphs.c:25:10: error: #include expects "FILENAME" or <FILENAME>
 #include FT_LCD_FILTER_H
          ^
xftglyphs.c: In function 'XftFontLoadGlyphs':
xftglyphs.c:410:2: error: implicit declaration of function 'FT_Library_SetLcdFilter' [-Werror=implicit-function-declaration]
  FT_Library_SetLcdFilter( _XftFTlibrary, font->info.lcd_filter);
  ^
xftglyphs.c:410:2: warning: nested extern declaration of 'FT_Library_SetLcdFilter' [-Wnested-externs]
xftglyphs.c:529:42: error: 'FT_LCD_FILTER_NONE' undeclared (first use in this function)
  FT_Library_SetLcdFilter( _XftFTlibrary, FT_LCD_FILTER_NONE );
                                          ^
xftglyphs.c:529:42: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
*** Error code 1

Stop.


I Can't find any other mention of FT_LDC_FILTER_H in its source.

Here's what I've done so far to get the configure step to to work.

Index: mk/x11.buildlink3.mk
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/mk/x11.buildlink3.mk,v
retrieving revision 1.11
diff -u -r1.11 x11.buildlink3.mk
--- mk/x11.buildlink3.mk	2 Dec 2007 12:57:32 -0000	1.11
+++ mk/x11.buildlink3.mk	20 Jul 2016 05:04:50 -0000
@@ -29,9 +29,12 @@
 
 .  if defined(GNU_CONFIGURE)
 CONFIGURE_ARGS+=	--x-includes=${X11BASE:Q}/include
+CONFIGURE_ENV+=		X11_CFLAGS=-I${X11BASE:Q}/include
 CONFIGURE_ARGS+=	--x-libraries=${X11BASE:Q}/lib${LIBABISUFFIX:Q}
+CONFIGURE_ENV+=		X11_LIBS=-L${X11BASE:Q}/lib${LIBABISUFFIX:Q}
 .  endif
 
+X11_CFLAGS+=	-I${X11BASE}/include
 X11_LDFLAGS+=	${COMPILER_RPATH_FLAG}${X11BASE}/lib${LIBABISUFFIX}
 X11_LDFLAGS+=	-L${X11BASE}/lib${LIBABISUFFIX}
 .endif	# _X11_BUILDLINK3_MK
Index: www/curl/options.mk
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/www/curl/options.mk,v
retrieving revision 1.14
diff -u -r1.14 options.mk
--- www/curl/options.mk	26 Feb 2016 10:57:45 -0000	1.14
+++ www/curl/options.mk	15 Jul 2016 03:39:44 -0000
@@ -5,7 +5,7 @@
 PKG_SUGGESTED_OPTIONS=	inet6 libidn
 
 # Kerberos is built in - no additional dependency
-PKG_SUGGESTED_OPTIONS.NetBSD+=	gssapi
+#PKG_SUGGESTED_OPTIONS.NetBSD+=	gssapi
 
 .include "../../mk/bsd.options.mk"
 
Index: x11/libXft/Makefile
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/x11/libXft/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- x11/libXft/Makefile	9 Oct 2014 14:07:14 -0000	1.17
+++ x11/libXft/Makefile	20 Jul 2016 06:41:15 -0000
@@ -15,6 +15,8 @@
 USE_LIBTOOL=		YES
 USE_TOOLS+=		pkg-config
 PKGCONFIG_OVERRIDE=	xft.pc.in
+CONFIGURE_ENV+=		XRENDER_CFLAGS=${X11_CFLAGS:Q}
+CONFIGURE_ENV+=		XRENDER_LIBS=${X11_LDFLAGS:Q}
 
 .include "../../devel/zlib/buildlink3.mk"
 BUILDLINK_API_DEPENDS.fontconfig+=	fontconfig>=2.6
Index: x11/libXrender/buildlink3.mk
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/x11/libXrender/buildlink3.mk,v
retrieving revision 1.5
diff -u -r1.5 buildlink3.mk
--- x11/libXrender/buildlink3.mk	10 Mar 2014 11:05:52 -0000	1.5
+++ x11/libXrender/buildlink3.mk	20 Jul 2016 07:00:32 -0000
@@ -2,6 +2,10 @@
 
 .include "../../mk/bsd.fast.prefs.mk"
 
+.if ${X11_TYPE} != "modular"
+. include "../../pkgtools/x11-links/buildlink3.mk"
+.endif
+
 .if ${X11_TYPE} != "modular" && \
     !exists(${X11BASE}/lib/pkgconfig/xrender.pc) && \
     !exists(${X11BASE}/lib${LIBABISUFFIX}/pkgconfig/xrender.pc)
@@ -10,15 +14,15 @@
 
 BUILDLINK_TREE+=	libXrender
 
-.if !defined(LIBXRENDER_BUILDLINK3_MK)
+. if !defined(LIBXRENDER_BUILDLINK3_MK)
 LIBXRENDER_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.libXrender+=	libXrender>=0.9.2
 BUILDLINK_PKGSRCDIR.libXrender?=	../../x11/libXrender
 
-.include "../../x11/renderproto/buildlink3.mk"
-.include "../../x11/libX11/buildlink3.mk"
-.endif # LIBXRENDER_BUILDLINK3_MK
+.  include "../../x11/renderproto/buildlink3.mk"
+.  include "../../x11/libX11/buildlink3.mk"
+. endif # LIBXRENDER_BUILDLINK3_MK
 
 BUILDLINK_TREE+=	-libXrender
 

-- 
						Greg A. Woods
						Planix, Inc.

<woods%planix.com@localhost>       +1 250 762-7675        http://www.planix.com/

Attachment: pgpdbHJ1lpnye.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index