KDE2 development under KDE1 -- there seems to be a small problem after all

tom.verbeure at chello.be tom.verbeure at chello.be
Sat Mar 25 17:50:37 GMT 2000


I have now tried to restart from scratch:
- Set "Options->KDevelop Setup->Path" to /opt/kde2 etc.
- Create a completely new project "KDE2 Normal"
- Here is a cut-and-paste from the window that does the configure when
pushing 'Create':

...
checking for Qt...
libraries /home/tvb/kde2/qt-copy/lib, headers
/home/tvb/kde2/qt-copy/include
checking if Qt compiles without flags...
no
checking for moc...
/home/tvb/kde2/qt-copy/bin/moc
checking for rpath...
yes
checking for KDE...
libraries /opt/kde/lib, headers /opt/kde/include
checking for KDE paths...
defaults
...

as you can see, the settings for qt are correct, but the path to my KDE2
installation (/opt/kde2) it not used!

- When I now compile, it obviously doesn't work.
- Now I execute the following sequence:
  Build->Distclean
  Build->Autoconf and automake
  Build->Configure

- Here is again a cut-and-paste from 'messages':

...
checking for Qt... libraries /home/tvb/kde2/qt-copy/lib, headers
/home/tvb/kde2/qt-copy/include
checking if Qt compiles without flags... no
checking for moc... /home/tvb/kde2/qt-copy/bin/moc
checking for rpath... yes
checking for KDE... libraries /opt/kde2/lib, headers /opt/kde2/include
checking for KDE paths... defaults
...

This time, it is correct! And it compiles without a problem. Since I
started with a completely clean directory and didn't change a single
file manually, it cannot be a problem of a wrong config.cache. So I
think it is a small bug.

Regards,
Tom




tom.verbeure at chello.be wrote:
> 
> Hello Walter,
> 
> Errrr. Hum. You were right.
> The fact is: I was fully aware of that config.cache could create
> problems, because the first time after I patched acinclude.m4, my patch
> didn't work due to config.cache. So I deleted it, reran configure and
> then it worked, not because my patch solved it, but because it had to
> work anyway. :-]
> 
> Well, in any case I am starting to figure out this whole configure
> stuff. What is the best way to really that a grip on this? Do you just
> fire up 'info' and read the whole manual or are there less painfull ways
> to learn to use it?
> 
> Thanks,
> Tom
> 
> "W. Tasin" wrote:
> >
> > tom.verbeure at chello.be wrote:
> > >
> > > Hello All,
> > >
> > > I have KDE1 and KDE2 installed and wanted to develop for KDE2 with
> > > KDevelop 1.1 running under KDE 1.1.2. Of course, I read the FAQ etc.,
> > > changed the necessary "Options->Kdevelop Setup->Path", created a project
> > > and tried to compile it.
> > >
> > > This didn't work out correctly, for the following reason: my KDE1 is
> > > installed in /opt/kde, KDE2 is in /opt/kde2. Even though
> > > --prefix=/opt/kde2 is added, it is not used to search for the includes
> > > and the libraries:
> > >
> > > checking for KDE... libraries /opt/kde/lib, headers /opt/kde/include
> > >
> > > As a result, compilation, of course fails.
> > > Knowing almost nothing about configure stuff etc, I grepped around a bit
> > > and found the line to change to get it right:
> > > in aclocal.m4, line 805:
> > >
> > > kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib
> > > /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde/lib /usr/X11R6/kde/lib"
> > > test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
> > >
> > > This doens't work, because $prefix is never used. In my installation,
> > > $KDEDIR is still /opt/kde instead of /opt/kde2 because otherwise
> > > kdevelop starts up with bogus icons etc.
> > > To get it running, I changed the second line to:
> > >
> > > test -n "$KDEDIR" && kde_libdirs="$prefix/lib $KDEDIR/lib $KDEDIR
> > > $kde_libdirs"
> > >                                   ^^^^^^^^^^^
> > >
> > > I did a similar thing for kde_incdirs on line 794 of aclocal.m4.
> > > After this, everything compiles and runs without a single problem.
> > >
> > > If feel this is quite a hack and I assume that I must have missed
> > > something in the settings of KDevelop, but I don't know what... Any
> > > idea's?
> > >
> > > Regards,
> > > Tom
> >
> > Hello Tom,
> >
> > that´s more than a hack... sorry... but it´s simply wrong!!! ;-)
> >
> > First at all aclocal.m4 will be created by aclocal... (so aclocal.m4
> > will be created from acinclude.m4 and configure.in... - and some system
> > .m4 files)
> >
> > If you would patch aclocal.m4, so calling "make -f Makefile.dist" would
> > cancel your patches.
> >
> > But I didn't understand the problem as well, because it should work.
> >
> > I guess the problem are the cached values:
> >
> > Maybe you started once configure without specifying the --prefix=
> > so /opt/kde will be cached for the next configure calls.
> >
> > So a good hint would be:
> > If something with configure doesn´t work as expected remove the file
> > config.cache and restart configure with the right options...
> >
> > Bye
> >
> > Walter
> > --
> > The KDevelop project: tasin at kdevelop.de [www.kdevelop.org]
> > --
> > oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
> > (Zucchero)
> > :-------W. Tasin, FB
> > 04,FHM-------------------PGP-KeyID:0x7961A645----------:
> > <Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>




More information about the KDevelop mailing list