[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: status of kde1 - > kde2 interop



hi,

Ivan E. Moore II wrote:
> kdelibs2g-dev and kdelibs3 cannot co-exist due to 4 .la files.  I didn't
> pay too much attention so I'm not sure how important those files are or 
> if there is anything I can do about them.  I'll take a look again later.
> 

you mean kdelibs3-dev, not kdelibs3, don't you? anyway ...

having mulitiple versions of the same shared library causes trouble
when compiling in general. ld.so creates a symlink to the newest version,
from which the run-time-link version is determined at build-link time:

libqt.so.1.45
libqt.so.1 -> libqt.so.1.45
libqt.so.2.2.2
libqt.so.2.2 ->libqt.so.2.2.2
libqt.so.2 -> libqt.so.2.2.2
libqt.so -> libqt.so.2.2.2   -> big trouble, as a new build will link to
				v2 explicitly and stop v1 apps from working

my solution created in despair:

i installed only kdelibs3-dev with the package system.  then i
copied the files from the kdelibs2-dev package by hand and created the
attached "swapper" script. it is an ugly hack (tm) and could be solved
much nicer using the debian alternatives system, i think.

just my $0.02 ...

best regards

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
#! /bin/sh

case $(readlink /usr/lib/qt) in
  qt1g) cur=1; lcur=2;;
  qt2) cur=2; lcur=3;;
  *) echo "No QT found!"; exit 1;;
esac

case "$1" in
  1*) new=1; lnew=2; lnnew=qt1g;;
  2*) new=2; lnew=3; lnnew=qt2;;
  *) echo "usage: setkde {1|2}"; exit 1;;
esac

if test $cur = $new; then
  echo "Requested version already selected!"; exit 1
fi

rm /usr/lib/libqt.so; ln -s libqt.so.$new /usr/lib/libqt.so
rm /usr/lib/qt; ln -s $lnnew /usr/lib/qt
rm /usr/include/qt; ln -s /usr/lib/qt/include /usr/include/qt
rm /usr/bin/moc; ln -s /usr/lib/qt/bin/moc /usr/bin/moc
mv /usr/include/kde /usr/include/kde.$cur; mv /usr/include/kde.$new /usr/include/kde

for j in kab kdecore kdeui kfile kspell; do
  i=lib$j
  rm /usr/lib/$i.so
  ln -s $i.so.$lnew.0.0 /usr/lib/$i.so
  mv /usr/lib/$i.la /usr/lib/$i.la.$lcur; mv /usr/lib/$i.la.$lnew /usr/lib/$i.la
done


Reply to: