Bug #155

Aqbanking cannot be build from git with out-of-source build directory

Added by cstimming almost 2 years ago. Updated almost 2 years ago.

Start date:
Due date:
Version der Anwendung:


To reproduce:

git clone aqbanking # ... start with a new empty clone
cd aqbanking
ACLOCAL_FLAGS="-I $GWEN_PREFIX/share/aclocal" make -f Makefile.cvs
mkdir build && cd build
../configure PKG_CONFIG_PATH=$GWEN_PREFIX/lib/pkgconfig

Expected result: Compiling processes as usual.
Observed result instead:
make[5]: Entering directory '/home/cs/org/hbci/aqbanking-clone3/build/src/libs/aqbanking/types'
make[5]: *** No rule to make target 'transaction.c', needed by 'transaction.lo'.  Stop.
make[5]: Leaving directory '/home/cs/org/hbci/aqbanking-clone3/build/src/libs/aqbanking/types'
Makefile:664: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/cs/org/hbci/aqbanking-clone3/build/src/libs/aqbanking'

One could get a little bit further by prepending the list of XML files in the "typefiles" definition in by $(srcdir)/ each, see attached diff for the first two However, this looks ugly anyway, and it also doesn't work for all cases, as the next error cannot be fixed by this addition:
make[5]: Entering directory '/home/cs/org/hbci/aqbanking-clone2/build/src/libs/aqbanking/backendsupport'
make[5]: *** No rule to make target 'jobqueue.c', needed by 'jobqueue.lo'.  Stop.

@Martin: Maybe typemaker2 needs more settings about this situation with the XML files in the srcdir, but the C files in the builddir? As a first step, I think it's ok to put the generated C files in the srcdir, too, but nevertheless the out-of-srcdir build should start to work...

initial-out-of-srcdir-build.diff Magnifier (1.59 KB) cstimming, 10/31/2019 12:41 PM

Related issues

Related to AqBanking - Bug #166: "make" fails, since .42 Rejected 11/25/2019


#1 Updated by martin almost 2 years ago

  • Status changed from New to Feedback


the typemaker2-generated files are distributed with AqBanking, so being able to generate them out-of-source doesn't seem to be necessary.
To (re)generate the typemaker2 files the following steps are required:

make typedefs
make typefiles

The "typedefs" target generates ony the *.tm2 files which resolve possible curcular dependencies between typemaker2-generated files.

The "typefiles" target actually generates the source files.

After those steps the rest should be buildable out-of-source.


#2 Updated by cstimming almost 2 years ago

  • Subject changed from Aqbanking cannot be build in out-of-source build directory to Aqbanking cannot be build from git with out-of-source build directory

Ok, you're right, my question asks for building from git in out-of-srcdir form. The distributed tarball would work, indeed.

My use case is that I have multiple build dirs based on one srcdir, especially a windows build and a linux build. It is very convenient to run both compiles from one single srcdir. Enabling out-of-srcdir build would be one simple solution to achieve this.

However, having to run "make typedefs; make typefiles" requires an in-srcdir setup of configure, because otherwise I cannot run make there.

#3 Updated by martin almost 2 years ago

Currently, I don't see how this could be done.

Even if you make typemaker2 read its source files from SRCDIR (by adjusting to insert $(SRCDIR) before typefiles) and write to BUILDDIR (BTW: typemaker2 accepts a parameter "--destfolder=PARAM") the destination files would be written to BUILDDIR.

But how would you get gcc/make to compile those files generated in BUILDDIR? Wouldn't gcc/make look in $(SRCDIR) for source files?

#4 Updated by AndreasFilsinger almost 2 years ago

  • Related to Bug #166: "make" fails, since .42 added

Also available in: Atom PDF