Subject: KDE 2.2.1 from source...
To: None <netbsd-help@netbsd.org>
From: Dan <kasper37@lotushouse.dhs.org>
List: netbsd-help
Date: 11/20/2001 21:44:10
I have installed NetBSD v1.5.2 w/all default packages onto my IBM 600X
(2646-8PU to be exact) with no problems.  I removed /usr/X11R6 and replaced
it with the X11R6 directory structure in xfree410-152.tgz.  After creating
my /etc/XF86Config file I can boot into standard X-windows and everthing is
fine.  I have also updated to gcc 2.95.2 (I tried installing 2.95.3 from
source but ran into trouble there also, if someone would like to help me out
there you can find my question here:

http://groups.google.com/groups?hl=en&group=comp.unix.bsd.netbsd.misc&selm=a
258a558.0111200432.4059b6bb%40posting.google.com

)  Now I would like to install KDE v2.2.1 from source and that is where I
run into many problems...(Though some would say do just go with packages, at
this point I am interested in /why/ these things are happening...) btw, my
shell is bash...

I will start by stating what I /believe/ to be the correct prerequisits for
the following software:

kde 2.2.1 (libs and base to start off with)
-------------------------------------------
qt-2.2.4  (I will be using qt-x11-2.3.2.tar.gz)

openssl >=0.9.6x (I will be using openssl-0.9.6b.tar.gz)

(I haven't messed with Java, LessTif, or htdig yet as they are not required)

qt-x11-2.3.2.tar.gz
-------------------
jpegsrc.v6b.tar.gz

I do a ./configure (should this include --enable-shared or --enable-static
or both?  I don't quite understand this), make, make test, and a make
install on jpegsrc, here is the install output:

bash-2.05# make install
/usr/bin/install -c cjpeg /usr/local/bin/cjpeg
/usr/bin/install -c djpeg /usr/local/bin/djpeg
/usr/bin/install -c jpegtran /usr/local/bin/jpegtran
/usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
/usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom
/usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1
/usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1
/usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1
/usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1
/usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1
bash-2.05#

this doesn't put any header files anywhere useful...what do I put where and
how am I supposed to know?  ( I know that I need jpeglib.h, jconfig.h, and
jmorecfg.h only by the errors that arise later while compiling qt so I copy
those files to /usr/include...but what is standard procedure?)

now I untar qt-2.3.2 and rename the directory to qt so the base dir is
/usr/local/qt.  I also added the following 5 lines to my /root/.profiles
file:

QTDIR=/usr/local/qt
PATH=$QTDIR/bin:$PATH
MANPATH=$QTDIR/man:$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QTDIR PATH MANPATH LD_LIBRARY_PATH

I run ./configure -gif -system-jpeg and this is the output:


This is the Qt Free Edition
[...]
Build type:    netbsd-g++-shared

Thread support..................... no
GIF support........................ yes
MNG support........................ no
JPEG support....................... yes
OpenGL support .................... yes
NAS sound support.................. no
Session management................. yes
Xft support (Anti-Aliased Fonts) .. yes
XKB support ....................... yes


This is where the "fun" begins :)

I now run make and the first error I encounter is the fact that make can't
find jpeglib.h, jconfig.h, and jmorecfg.h but I copy those into /usr/include
and we're back on the road...

next error really gets me:

[...]
tsort: tools/qfile.o
tsort: cycle in data
tsort: tools/qdir_unix.o
tsort: tools/qfileinfo_unix.o
tsort: tools/qdir.o
tsort: cycle in data
tsort: tools/qdir_unix.o
tsort: tools/qfileinfo_unix.o
tsort: cycle in data
tsort: 3rdparty/libpng/pngwrite.o
tsort: 3rdparty/libpng/pngwutil.o
ld: cannot open /usr/lib/c++rt0.o: No such file or directory
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

GRRR!  The file c++rt0.o is non-existent on my system (even though I
installed all of the packages on install...) so I go and find c++rt0.c and
compile the .o file and put it into the /usr/lib dir.  I would really like
an explination as to why this file is missing or why isn't the package which
it is included in listed as a prerequisite somewhere?  anyway, let's make
again...

next problem:

[...]
tsort: tools/qfileinfo_unix.o
tsort: tools/qdir.o
tsort: cycle in data
tsort: tools/qdir_unix.o
tsort: tools/qfileinfo_unix.o
tsort: cycle in data
tsort: 3rdparty/libpng/pngwrite.o
tsort: 3rdparty/libpng/pngwutil.o
ld: cannot open -ljpeg: No such file or directory
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

Oh man...well...recognizing this type of error I found libjpeg.a from
jpeg-6b and copied it to /usr/lib. (did I mention I'd like to know how I'm
/supposed/ to install that jpeg-6b package :)  keep chuggin...

next error:

if [ -d designer ]; then cd designer ; make; fi
make util
if [ -d util ]; then cd util ; make; fi
g++  -c -I/usr/local/qt/include -O2 -Wall -W -fPIC  -o qprocess.o
qprocess.cpp
g++  -c -I/usr/local/qt/include -O2 -Wall -W -fPIC  -o qprocess_unix.o
qprocess_unix.cpp
/usr/local/qt/bin/moc qprocess.h -o moc_qprocess.cpp
g++  -c -I/usr/local/qt/include -O2 -Wall -W -fPIC  -o moc_qprocess.o
moc_qprocess.cpp
ld -Bshareable -L/usr/local/qt/lib    -o /usr/local/qt/lib/libqutil.so.1.0.0
`lorder /usr/lib/c++rt0.o qprocess.o  qprocess_unix.o moc_qprocess.o |
tsort`  -lqt
tsort: cycle in data
tsort: qprocess.o
tsort: qprocess_unix.o
tsort: moc_qprocess.o
ld: cannot open -lqt: No such file or directory
*** Error code 1

knowing that /usr/local/qt/lib is in the library path, I don't understand
what could be going on, when I look in /usr/local/qt/lib there is 1 file,
libqt.so.2.3.2, when simlinking libqt.so to that file (why do I have to do
this, I'm obviously doing something wrong, but what?) and with
libqutil.so.1.0.0 so we continue...

This is where I'm stumped:

[...]
g++ -L/usr/local/qt/lib    -o /usr/local/qt/bin/uic uic.o
../shared/widgetdatabase.o  ../shared/domtool.o
../integration/kdevelop/kdewidgets.o   -L/usr/local/qt/lib -lqutil -L..
/lib -lqt
/usr/bin/ld: warning: libGLU.so.1, needed by /usr/local/qt/lib/libqt.so, not
found (try using --rpath)
/usr/bin/ld: warning: libGL.so.1, needed by /usr/local/qt/lib/libqt.so, not
found (try using --rpath)
/usr/bin/ld: warning: libXmu.so.6, needed by /usr/local/qt/lib/libqt.so, not
found (try using --rpath)
/usr/bin/ld: warning: libXext.so.6, needed by /usr/local/qt/lib/libqt.so,
not found (try using --rpath)
/usr/bin/ld: warning: libX11.so.6, needed by /usr/local/qt/lib/libqt.so, not
found (try using --rpath)
/usr/bin/ld: warning: libSM.so.6, needed by /usr/local/qt/lib/libqt.so, not
found (try using --rpath)
/usr/bin/ld: warning: libICE.so.6, needed by /usr/local/qt/lib/libqt.so, not
found (try using --rpath)
/usr/bin/ld: warning: libXft.so.1, needed by /usr/local/qt/lib/libqt.so, not
found (try using --rpath)
/usr/local/qt/lib/libqt.so: undefined reference to `XFreePixmap'
/usr/local/qt/lib/libqt.so: undefined reference to `XSetInputFocus'
/usr/local/qt/lib/libqt.so: undefined reference to `glXQueryServerString'
/usr/local/qt/lib/libqt.so: undefined reference to `XSetWMProtocols'
[...]
/usr/local/qt/lib/libqutil.so: undefined reference to `_dummy'
[...]
/usr/local/qt/lib/libqt.so: undefined reference to `XCreateGC'
/usr/local/qt/lib/libqt.so: undefined reference to `SmcGetIceConnection'
/usr/local/qt/lib/libqt.so: undefined reference to `XOpenDisplay'
/usr/local/qt/lib/libqt.so: undefined reference to `XDrawImageString16'
/usr/local/qt/lib/libqt.so: undefined reference to `glXCreateGLXPixmap'
collect2: ld returned 1 exit status
*** Error code 1

Stop.

I have no clue where to go from here.  All this and I haven't even reached
the kde compilation...I thank anyone who can help me out with the many
questions I have posed in this email (sorry for the length
:/ )

Dan