Bug 150660

Summary: no $KDEDIR and no pkgconfig file
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Karl Pietrzak <kap4020>
Component: KDEAssignee: E-mail List <kde-maintainers>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: suse-beta
Version: unspecified   
Target Milestone: ---   
Hardware: x86-64   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Karl Pietrzak 2006-02-14 03:08:55 UTC
$KDEDIR is not set on SuSE 10.0 machines it seems.

In addition, there is no pkgconfig file (/usr/lib64/pkgconfig/) for KDE like there is for Qt.

This makes ISVs like extremely difficult because the detection of KDE includes and libs is mostly trial-and-error.  In other words, how is someone not familiar with SuSE know that KDE resides in /opt/kde3?

The proper solution is the one that SuSE itself takes for Qt: a pkgconfig file.

A proper pkgconfig file will also solve x86_64 problem that would crop up with just setting $KDEDIR, as such:
- if $KDEDIR is /opt/kde3, then the include directory is /opt/kde3/include and the library directory is /opt/kde3/lib.
- WRONG!  The library directory is actually /opt/kde3/lib64.

This kind of situation is exactly what pkgconfig is for.
Comment 1 Stephan Kulow 2006-02-14 08:49:31 UTC
kde-config --prefix will tell you
Comment 2 Karl Pietrzak 2006-02-14 14:17:16 UTC
kde-config --prefix is NOT sufficient, for the following reasons:

1. kde-config is in the -devel package, which regular users don't have installed.  This affects runtime installers, and just any program that wants to find out where KDE is installed.
2. Even if you have kde-config, you _still_ don't know what the library directory is.  It's not KDE_PREFIX/lib; on my machine, it's KDE_PREFIX/lib64.  The include directory is (always?) KDE_PREFIX/include, but, as you can see, the library directory is dependent on the architecture.  This affects almost ALL KDE installers, and I bumped into this when trying to compile and install KPlayer (http://kplayer.sf.net).  This is no automated way to find out what all the necessary KDE directories are, without just "knowing" ahead of time.

Qt handles this by having pkgconfig files (the proper way).

# pkg-config qt-mt --libs
-L/usr/lib/qt3//lib64 -L/usr/X11R6/lib64 -L/usr/lib64/ -L/usr/X11R6/lib64/ -lqt-mt -lpng -lz -lXi -lXrender -lXrandr -lXcursor -lXinerama -lXft -lfreetype -lfontconfig -lXext -lX11 -lm -lSM -lICE -ldl -lpthread
# 

Even Qt4...
# pkg-config QtGui --libs
-L/usr/X11R6/lib64 -L/var/tmp/BUILD/qt-x11-opensource-src-4.1.0/lib -lQtGui -lpng -lSM -lICE -lQtCore -lpthread -lXi -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -ldl
#
Comment 3 Stephan Kulow 2006-02-14 14:32:03 UTC
the pkgconfig file would be in the -devel package too. And if you cared to check the output of kde-config --help, you would have used

kde-config --install lib --expandvars
Comment 4 Dirk Mueller 2006-02-14 14:34:37 UTC
> Qt handles this by having pkgconfig files (the proper way).
> -L/usr/X11R6/lib64 -L/var/tmp/BUILD/qt-x11-opensource-src-4.1.0/lib

so where do you install Qt Plugins? into /usr/X11R6/lib64 or into /var/tmp/BUILD/qt-x11-opensource-src-4.1.0/lib?

do you realize at all how wrong the 2nd path is? 
Comment 5 Karl Pietrzak 2006-02-14 21:44:56 UTC
(In reply to comment #3)
> the pkgconfig file would be in the -devel package too. And if you cared to
> check the output of kde-config --help, you would have used
> 
> kde-config --install lib --expandvars

My apologies.  I didn't know that you could do 'kde-config --install lib', as the man page for kde-config does not exist, and '--help' isn't that helpful:

--install type            Prefix to install resource files to

None of this removes the need for a pkgconfig file.  This makes KDE stick out like a sore thumb for developers such as myself.
Comment 6 Karl Pietrzak 2006-02-14 21:48:06 UTC
(In reply to comment #4)
> > Qt handles this by having pkgconfig files (the proper way).
> > -L/usr/X11R6/lib64 -L/var/tmp/BUILD/qt-x11-opensource-src-4.1.0/lib
> 
> so where do you install Qt Plugins? into /usr/X11R6/lib64 or into
> /var/tmp/BUILD/qt-x11-opensource-src-4.1.0/lib?
> 
> do you realize at all how wrong the 2nd path is?

Oh, I definitely do.  But that has nothing to do with this bug, and everything to do with Qt4.  I built my Qt4 RPM by rebuilding the official SuSE source RPM. If need be I'll file a separate bug.
Comment 7 Dirk Mueller 2006-02-15 08:17:09 UTC
and why do you rebuild the suse source rpm (which I doubt btw - because we don't have this issue)?