[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Qt-3.1.1 under RedHat 8.0
From:       John Bell <jhbell () tpg ! com ! au>
Date:       2002-12-23 22:58:13
[Download RAW message or body]

The following is what's actually required:

Firstly, DON'T make a libXft.so link to libXft2!  This will only cause further 
confusion.

Attached are some patches and a build script I used.  Note that the script 
expects the source archive to be in /usr/local/src/sources and the patches in 
/usr/local/src/sources/qt-x11-free-3.1.1-patches.  I have my installscripts 
in /usr/local/src/sources/installscripts.  The build installs under 
/usr/local/qt.  The odd recopying of the archive files is to get over a 
shortcoming of qmake (it stupidly strips symbols from .a archives).

I'm pretty sure this is all that I did and it works fine for me on RH8.0.

John

On Tuesday 24 December 2002 03:59, Olaf Mueller wrote:
> Hello,
>
> is there a way to compile qt-x11-free-3.1.1 under Redhat 8.0
> (gcc-3.2-7)? I tried this for a week now, but get no solution to solve
> the problems I'm running in. It seems to me that there's an
> incompatibility between the libXft Qt wants and the installed packages
> Xft2 and Xft from XFree86-libs installed from RedHat by default.
>
> At the moment I'm runnung Qt-3.1 and Kde-3.1 sources compiled on my
> previous Redhat 7.1 system before upgrading it to RedHat 8.0. This Kde
> is really great working, but to install newer versions of Kde packages
> or other Kde programs, I've got to compile Qt and Kde once again cause
> of the gcc-3.2-7.
>
> On Qt- Configure everything seems pretty well:
>
> Xft auto-detection... ()
>  Found libXft in /usr/X11R6/lib
>  Found X11/Xft/Xft.h in /usr/X11R6/include
>  Found X11/Xft/XftCompat.h in /usr/X11R6/include
>  Found freetype2/freetype/freetype.h in /usr/include
> Xft enabled.
>
> But Qt- Make doesn't find the libXft:
>
> -L/usr/X11R6/lib -L/usr/X11R6/lib -lpng -lGL -lXmu -lXrender -lXft
> -lfreetype -lXext -lX11 -lm -lSM -lICE -ldl -lpthread
> /usr/bin/ld: cannot find -lXft
> collect2: ld returned 1 exit status
> make[2]: *** [../lib/libqt-mt.so.3.1.1] Error 1
> make[2]: Leaving directory `/usr/local/qt31/src'
> make[1]: *** [sub-src] Error 2
> make[1]: Leaving directory `/usr/local/qt31'
> make: *** [init] Error 2
>
> These errors happens when I moved the xft2- libraries, so that qt
> should only sees the installed xft from Xfree86. With all xft and xft2
> libraries in the path, I get an error message like
> "/usr/local/qt31/lib/libqt-mt.so: undefined reference to
> `XftCharExists'" and so on ...
>
>
> These libraries are installed:
>
> ls -la /usr/lib/libXft*
> /usr/lib/libXft2.so -> libXft.so.2
> /usr/lib/libXft.so.2 -> libXft.so.2.0
> /usr/lib/libXft.so.2.0
>
> ls -la /usr/X11R6/lib/libXft*
> /usr/X11R6/lib/libXft.so -> libXft.so.1.2
> /usr/X11R6/lib/libXft.so.1 -> libXft.so.1.2
> /usr/X11R6/lib/libXft.so.1.1 -> libXft.so.1.2
> /usr/X11R6/lib/libXft.so.1.2
>
> ls -al /usr/include/X11/Xft
> XftCompat.h
> Xft.h
>
> Please help me to get a new compiled Kde and Qt working on my system.
>
> Wish you all a nice christmas!
>
> Thank you,
> Olaf
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<

-- 

Regards,
John Bell,
BCM Research
["qt-x11-free-3.1.1-install.sh" (application/x-shellscript)]

#!/bin/bash

PACKAGE=qt-x11-free-3.1.1

LOCALHOME=/usr/local
SRCHOME=$LOCALHOME/src
SOURCESDIR=$SRCHOME/sources
SOURCE=${SOURCESDIR}/${PACKAGE}.tar.bz2
SOURCE2=${SOURCESDIR}/Xinerama.tar.bz2
PATCHESDIR=${SOURCESDIR}/${PACKAGE}-patches

QTDIR=/usr/local/src/qt-x11-free-3.1.1
cd $SRCHOME
if [ -d $PACKAGE ]
then
  echo Removing old install
  rm -rf $PACKAGE
fi
#if [ ! -e /usr/lib/libXft.so ]
#then
#  ln -s /usr/lib/libXft.so.2.0 /usr/lib/libXft.so ]
#fi
if [ !-d /usr/local/qt ]
then
  mkdir -p /usr/local/qt
fi

echo Unpacking Source
tar jxf ${SOURCE}
pushd $PACKAGE
echo Installing Patches
patch -p1 < ${PATCHESDIR}/motif.patch
patch -p1 < ${PATCHESDIR}/configtest.patch

# May have to do something re Xinerama
tar jxf $SOURCE2
gcc -fno-use-cxa-atexit -fPIC -c -I/usr/X11R6/include/X11/extensions -I. Xinerama.c
ar r libXinerama.a Xinerama.o

find . -type d -name CVS|xargs rm -rf
find mkspecs -name "*.stdc++" | xargs rm -f
perl -pi -e "s,\@QMAKE_CFLAGS\@,\@QMAKE_CFLAGS\@ -O2,g" qmake/GNUmakefile.in
perl -pi -e "s,-fpic,-fPIC,g" mkspecs/*/qmake.conf
perl -pi -e "s|-Wl,-rpath,| |" mkspecs/*/qmake.conf
find . -type d -name CVS | xargs rm -rf
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export PATH=$QTDIR/bin:$PATH
INCLUDES="-I/usr/include/fontconfig -I/usr/include/Xft2"

perl -pi -e "s,-O2,$INCLUDES $OPTFLAGS -fno-use-cxa-atexit -fno-exceptions,g" \
mkspecs/*/qmake.conf

QTDEST=/usr/local/lib/qt
export QTDEST

echo yes|./configure -verbose \
  -prefix /usr/local/qt -release -shared -qt-gif \
  -system-zlib -system-libpng -system-libmng -system-libjpeg -xft \
  -no-g++-exceptions -enable-opengl -enable-tools -enable-kernel \
  -enable-widgets -xrender -xkb \
  -enable-dialogs -enable-iconview -enable-workspace -enable-network \
  -enable-canvas -enable-table -enable-xml -enable-sql -qt-style-motif \
  -plugin-sql-mysql -plugin-sql-psql -plugin-sql-odbc -qt-style-cde \
  -qt-style-motifplus -qt-style-platinum -qt-style-sgi -qt-style-windows \
  -qt-style-compact -qt-style-interlace -qt-style-common -qt-imgfmt-png \
  -qt-imgfmt-jpeg -qt-imgfmt-mng \
  -sm -xinerama -stl -thread -I/usr/include/Xft2 \
  -I/usr/include/pgsql -I/usr/include/pgsql/server \
  -I/usr/include/pgsql/internal -lpq -I/usr/include/mysql -L/usr/lib/mysql \
  -lmysqlclient -lodbc

echo
echo making synmlinks and src-qmake
make symlinks src-qmake
echo Making SQL Plugin Makefiles
echo PostgreSQL ...
cd plugins/src/sqldrivers/psql
qmake -o Makefile "INCLUDEPATH+=/usr/include/pgsql /usr/include/pgsql/server \
/usr/include/pqsql/internal" "LIBS+=-lpq" psql.pro echo MySql ...
cd ../mysql
qmake -o Makefile "INCLUDEPATH+=/usr/inlcludemysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" \
mysql.pro echo ODBC ...
cd ../odbc
qmake -o Makefile "LIBS+=-lodbc" odbc.pro
cd ../../../..
#make src-moc sub-src sub-tools
#for i in designer linguist assistant qtconfig; do
#  make -C tools/$i
#done

echo Doing Main Build
make && make install
unalias cp
cp lib/*\.a /usr/local/qt/lib


["configtest.patch" (text/x-diff)]

--- qt-x11-free-3.1.1/config.tests/x11/xfreetype.test     	2002-12-22 07:57:27.000000000 +1100
+++ qt-x11-free-3.1.1/config.tests/x11/xfreetype.test	2002-12-22 07:58:18.000000000 +1100
@@ -37,7 +37,7 @@
 LIBDIRS="$IN_LIBDIRS $XDIRS /usr/shlib /usr/lib /lib"
 F=
 for LIBDIR in $LIBDIRS; do
-    LIBS="Xft2 Xft"
+    LIBS="Xft2"
     for LIB in $LIBS; do
 	FOUND_LIB=`ls ${LIBDIR}/lib${LIB}.* 2>/dev/null`
 	if [ ! -z "$FOUND_LIB" ]; then
@@ -52,7 +52,7 @@
     XFREETYPE=no
     [ "$VERBOSE" = "yes" ] && echo "  Could not find Xft lib anywhere in $LIBDIRS"
 fi
-LIBXFT="-l$F -lfreetype"
+LIBXFT="-l$F -lfreetype -lfontconfig"
     
 # check for X11/Xft/Xft.h
 XFT_H=

["motif.patch" (text/x-diff)]

--- qt-x11-free-3.1.1/extensions/extensions.prog	2002-12-20 18:21:20.000000000 +1100
+++ qt-x11-free-3.1.1/extensions/extensions.pro	2002-12-20 18:22:34.000000000 +1100
@@ -1,6 +1,4 @@
 TEMPLATE = subdirs
 
-contains( QT_PRODUCT, qt-(enterprise|internal) ) {
-	win32:	SUBDIRS = activeqt
-	x11:	SUBDIRS = motif
-}
+win32:	SUBDIRS = activeqt
+x11:	SUBDIRS = motif

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic