← Back to issue list

autotools plugin does not allow specifying a build directory different from source directory

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1882255
Type
issue
State
open
Author
~dmitriis
Labels
—
Created
Updated
Closed
—

Current evaluation

Autotools lacks an opt-in out-of-source build directory, blocking libvirt versions that reject in-source configure; the reproducer is detailed but the issue remains untriaged.

Suggested action: needs triage

Reason: The report provides the exact libvirt error, failing snapcraft.yaml, and command-line proof that building from a separate directory succeeds. Current craft-parts still invokes ./configure in its normal build tree and exposes no separate autotools build-directory key, but there are no maintainer comments, labels, or other evidence of maintainer triage.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 20 Complexity: 48 Confidence: 92 Actionability: 86

Issue body

I am trying to build a newer version of libvirt from source but recently there was a change made to force the build directory to be different from the source directory: https://github.com/libvirt/libvirt/commit/f96395e78eaccffbf128336382c74b1250f04032 Which results in "configure: error: Build directory must be different from source directory" when I try to build it. https://github.com/snapcore/snapcraft/blob/3.11/snapcraft/plugins/autotools.py#L90-L129 The relevant snapcraft.yaml part. libvirt: source: . source-subdir: libvirt-6.0.0 # ... override-build: | rm -Rf libvirt-6.0.0 apt source libvirt dpkg-source --before-build libvirt-6.0.0 snapcraftctl build Without snapcraft it would look like this: ➜ libvirt git:(master) ./autogen.sh autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: copying file 'build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:53: installing 'build-aux/compile' configure.ac:51: installing 'build-aux/config.guess' configure.ac:51: installing 'build-aux/config.sub' configure.ac:32: installing 'build-aux/install-sh' configure.ac:32: installing 'build-aux/missing' examples/Makefile.am: installing 'build-aux/depcomp' parallel-tests: installing 'build-aux/test-driver' autoreconf: Leaving directory `.' configure: error: Build directory must be different from source directory In a different directory: ➜ libvirt git:(master) mkdir build ➜ libvirt git:(master) cd build ➜ build git:(master) ../autogen.sh autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: copying file 'build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:53: installing 'build-aux/compile' configure.ac:32: installing 'build-aux/missing' examples/Makefile.am: installing 'build-aux/depcomp' autoreconf: Leaving directory `.' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes # ... Now type 'make' to compile libvirt

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 20
Complexity: 48
Confidence: 92
Actionability: 86
needs triage Autotools lacks an opt-in out-of-source build directory, blocking libvirt versions that reject in-source configure; the reproducer is detailed but the issue remains untriaged.
stealth/space-bunny-alpha
Impact: 43
Quick Win: 14
Complexity: 57
Confidence: 87
Actionability: 76
needs triage Autotools lacks an opt-in out-of-source build directory, breaking libvirt builds that reject in-source configure; the reproducer is detailed but remains untriaged.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 9
Complexity: 52
Confidence: 91
Actionability: 60
needs triage Legacy v1 autotools builds were restricted to the source directory, breaking libvirt, but v2 later gained out-of-source-build support. The old report has never received maintainer triage.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18
Staleness: 95
Complexity: 40
Confidence: 70
Support Request: 10
close stale Snapcraft's autotools plugin builds in-source, so projects requiring an out-of-tree build dir (e.g. newer libvirt) fail configure. No maintainer response in 6+ years; v2 plugins later added out-of-tree build support, making the old v1 plugin limitation obsolete.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 80
Support Request: 10
close stale Unaddressed bug report from 6 years ago regarding the snapcraft autotools plugin forcing the build directory to match the source directory, causing configure errors for newer libvirt versions.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 20
Confidence: 85
Support Request: 10
close stale Snapcraft's autotools plugin cannot specify a separate build directory, breaking out-of-source builds. The report has seen no maintainer interaction or activity for over six years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 45
Confidence: 85
Support Request: 10
close stale Snapcraft's autotools plugin fails to support out-of-tree builds, causing configure errors for projects like libvirt that enforce it. Issue is 6 years old with no activity or maintainer response.

Update history

Date Change
created

Related work

  • Related To: craft-parts#250 (confidence 85%)

    Out-of-source build infrastructure exists elsewhere in craft-parts, while the autotools plugin still reports get_out_of_source_build() as false.

Related issues

No related issues found above the similarity threshold.