Subject: Re: Fun with Xinerama, QT, kde3libs
To: Brian A. Seklecki <>
From: Mark Davies <>
List: tech-pkg
Date: 04/15/2003 14:57:50
	From:  "Brian A. Seklecki" <>
	Date:  Mon, 14 Apr 2003 19:49:19 -0400 (EDT)

> in pkgsrc/x11/qt3-libs/Makefile.common I see:

> .if !exists(${X11BASE}/lib/
> CONFIGURE_ARGS+=       -no-xinerama
> .endif

> ...however, I can't seem to find /any/ reference to shared object version
> of libXinerama /anywhere/, except for some random google hits mentioning
> some old version of linux and solaris.  It certainly doesn't get built on
> a -rHEAD version of Xfree86, and it's not included with a full install of
> RedHat, so I'm curious about this.

> ...regardless, i'm assuming it's there because QT screws up when compiling
> against it.  KDE3 won't configure properly against when it's
> enabled, complaining (from config.log):

Correct that there is nothing in the default NetBSD X setup that builds a but if you add the following line:

	#define SharedLibXinerama      YES

to your xsrc/xfree/xc/config/cf/xf86site.def then one is built and if you do 
have it built the Makefile.common fragment you quote above and the similar one 
in the KDE Makefiles cause Xinerama support to be built into KDE correctly. 
(I'm typing this from a KDE3.1.1 with Xinerama running on a twin head Matrox 
450 on NetBSD 1.6L)

I believe that you can't get this to work with the libXinerama.a that NetBSD 
builds as it doesn't contain position independent code, certainly back when I 
originally did it adding the above define was the simplest solution.
I think RedHat doesn't have this issue as the .a's have PIC anyway (I haven't 
actually confirmed this just seen a couple of things that implied it).

A similar problem happens with libxkbfile.a.  In kdebase 3.1.x the build of wants to link in a PIC libxkbfile but none exists.  This is 
further complicated by the fact that if you actually make the contents of 
libxkbfile.a PIC, then the NetBSD pkgsrc libtool won't use it - it wants a 
libxkbfile_pic.a or and in the playing that I did I couldn't 
convince the kdebase build to use a libxkbfile_pic.a.
Again this isn't a problem on Solaris as it has a and I don't 
think is a problem on Linux as I think the libxkbfile.a is PIC and libtool is 
happy to use it.  I haven't got a good solution for this.