← 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

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.

Suggested action: close stale

Reason: The issue targets the legacy v1 autotools plugin (snapcraft 3.11, snapcraft/plugins/autotools.py), which was superseded by the v2 plugin system. Commit 21c486876 'plugins v2: add support for out of source tree builds (#3392)' and follow-up autotools v2 work (e.g. #3398 autogen.sh support) show out-of-tree builds are now supported in the current plugin architecture, so the original limitation no longer applies to the supported codebase. No maintainer engagement in 6+ years and the referenced v1 code path is no longer the active implementation.

Impact: 30 Quick Win: 18.0 Staleness: 95 Complexity: 40 Confidence: 70 Support Request: 10

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
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18.0
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 40
Confidence: 80
Support Request: 10
close stale Autotools plugin in Snapcraft forces in-source builds, causing failures with newer libvirt versions requiring out-of-source builds. Issue is 6 years old with no maintainer response or labels.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcore/snapcraft#3392 (confidence 75%)

    Commit 21c486876 'plugins v2: add support for out of source tree builds' addresses the core limitation in the v2 plugin system that replaced the v1 autotools plugin referenced in the issue.

Related issues

No related issues found above the similarity threshold.