Subject: Re: KDE 2.2.1 from source...
To: Dan <kasper37@lotushouse.dhs.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: netbsd-help
Date: 11/24/2001 10:59:33
On Tue, Nov 20, 2001 at 09:44:10PM -0800, Dan wrote:
>
> ) 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...
First of all, use pkgsrc! It'll save you much time in the long run. Most
of the problems you'll meet have already been seen in pkgsrc, and have been
fixed.
Now that I've gotten that off my chest, I can try to explain why you're
seeing the problems below.
> -------------------
> 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?)
NetBSD-1.5.2/i386 is an ELF platform, so shared libraries should be installed
as:
libfoo.so -> libfoo.so.M.N
libfoo.so.M -> libfoo.so.M.N
libfoo.so.M.N
or else the linker might not be able to find the libraries. Usually, locally
maintained software is stuck in /usr/local, and not in /usr, but it won't
make too much of a difference UNLESS you don't take this into accoung when
compiling other software that might use the libraries in /usr/local.
> 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...
Take a look at pkgsrc/graphics/jpeg and see how the package is installed.
It's all there for public viewing.
> [...]
> 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.
You didn't compile Qt with run-time library search path information. Qt
needs libGL.so, which may be found in /usr/X11R6/lib on XFree86-4.x, but
unless you store /usr/X11R6/lib in the run-time search path for the linked
libqt.so, it won't be able to find it later on. "man ld" and look for the
documentation about "--rpath" just as the error above. This accounts for
most of the linking errors you'll find if you compile your own software.
If you install every library into /usr/lib, then this problem won't appear,
but I don't recommend this approach.
Again, let me reiterate: use pkgsrc!
Cheers,
-- Johnny Lam <jlam@netbsd.org>