Bug 78412

Summary: Cannot build kdebindings, source file missing
Product: [Developer tools] bindings Reporter: Thomas Koeller <thomas>
Component: generalAssignee: kde-bindings
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:

Description Thomas Koeller 2004-03-24 23:00:54 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    Compiled From Sources
Compiler:          gcc-3.3.3 
OS:          Linux

Building kdebindings-3.2.1 fails because of a missing source file:

make[2]: Entering directory `/home/thomas/build/kde/3.2.1/kdebindings-3.2.1/smoke'
Making all in qt
make[3]: Entering directory `/home/thomas/build/kde/3.2.1/kdebindings-3.2.1/smoke/qt'
make[3]: *** No rule to make target `smokedata.cpp', needed by `smokedata.lo'.  Stop.
make[3]: Leaving directory `/home/thomas/build/kde/3.2.1/kdebindings-3.2.1/smoke/qt'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/thomas/build/kde/3.2.1/kdebindings-3.2.1/smoke'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/thomas/build/kde/3.2.1/kdebindings-3.2.1'
make: *** [all] Error 2
~/build/kde/3.2.1/kdebindings-3.2.1 $ find . -type f -name smokedata.cpp
~/build/kde/3.2.1/kdebindings-3.2.1 $ find ~/src/kde/3.2.1/kdebindings-3.2.1 -type f -name smokedata.cpp
~/build/kde/3.2.1/kdebindings-3.2.1 $
Comment 1 groot 2004-03-26 11:31:00 UTC
Same thing happens here; using auto*, srcdir != builddir,
gmake[3]: Entering directory `/usr/local/tmp/kdebindings/smoke/qt'
gmake[3]: *** No rule to make target `smokedata.cpp', needed by `smokedata.lo'.
running make -k over this doesn't result in a smokedata.cpp being built, either. Everything else builds fine, although korundum is skipped in the build (and it needs smoke anyway).
Comment 2 groot 2004-03-26 13:37:03 UTC
The problem is this: smokedata.cpp isn't generated because supposedly you know you have to run qtguess.pl and generate.pl in the build directory. You could add this to Makefile.am:

smokedata.cpp :
       perl qtguess.pl
       perl generate.pl

though this will regenerate it (and hence all the cpp files, and cause compilation and linking) at every run.

Also, this may be useful if you've got srcdir != builddir, since $headerlist may be the absolute path name of the header_list file.

--- generate.pl.in      28 Dec 2003 13:43:21 -0000      1.5
+++ generate.pl.in      26 Mar 2004 12:32:51 -0000
@@ -18,6 +18,9 @@ my $headerlist = "@srcdir@/header_list";
 my $definespath = "$here/$defines";
 my $headerlistpath = "$here/$headerlist";

+## If srcdir != builddir, use headerlist from src
+$headerlistpath = $headerlist if ($headerlist =~ /^\//);
+
 ## Note: outdir and finaloutdir should NOT be the same dir!

 # Delete all x_*.cpp files under outdir (or create outdir if nonexistent)
Comment 3 Thomas Koeller 2009-10-22 19:08:49 UTC
Changing to resolved because recent versions do not show this problem any more.