Subject: Fun with Xinerama, QT, kde3libs
To: None <>
From: Brian A. Seklecki <>
List: tech-pkg
Date: 04/14/2003 19:49:19
in pkgsrc/x11/qt3-libs/Makefile.common I see:

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

...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):


configure:25404: rm -rf SunWS_cache; c++ -o conftest -Wnon-virtual-dtor
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith
es -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O2 -march=pentiumpro
-I/usr/pkg/include -I/usr/X11R6/include -march=pentiumpro -fno-exceptions
k-new -I/usr/X11R6/qt3/include -I/usr/X11R6/include  -DQT_THREAD_SUPPORT
-I/usr/pkg/include -I/usr/X11R6/include  -L/usr/X11R6/qt3/lib -Wl,-R/usr/
X11R6/qt3/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib  -Wl,-R/usr/X11R6/lib
-L/usr/X11R6/lib -L/usr/X11R6/qt3/lib -L/usr/X11R6/lib
-L/usr/X11R6/qt3/lib -
Wl,-R/usr/X11R6/qt3/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
-Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-E -lqt-mt -lpng
-lz -lm -ljpeg
-lXext -lX11 -lSM -lICE  -lpthread 1>&5
undefined reference to `XineramaIsActive'
undefined reference to `XineramaQueryScreens'
undefined reference to `XineramaQueryExtension'
configure:25407: $? = 1
configure: failed program was:
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <qcursor.h>
#include <qstylefactory.h>
#include <private/qucomextra_p.h>
#if ! (QT_VERSION >= 0x030100)
#error 1

int main() {
    QCursor c(Qt::WhatsThisCursor);
    return 0;
configure:25446: error: Qt (>= Qt 3.1.0) (library qt-mt) not found. Please
check your installation!
For more details about this problem, look at the end of config.log.
Make sure that you have compiled Qt with thread support!


However these functions are clearly present in the static library archive
version of libXinerama:

bash-2.05b# nm --demangle=auto /usr/X11R6/lib/libXinerama.a |egrep -i
0000056c T XineramaIsActive
00000534 T XineramaQueryExtension
00000654 T XineramaQueryScreens

...however they are unresolved in (if i'm reading nm(1) output

bash-2.05b# nm /usr/X11R6/qt3/lib/|grep -i Xiner
         U XineramaIsActive
         U XineramaQueryExtension
         U XineramaQueryScreens

from nm(1):

           "U" The symbol is undefined.

so the problem is burried in QT somewhere.  I'm sure if we can track that
down we can get kde to link properly, and hence get Xinerama functional in
our KDE (important IMHO)