Skip to content

configure phases of build-type:configure replicated for multiple components for local builds #4548

Open
@hvr

Description

@hvr

Simple way to reproduce this:

$ cabal get network-2.6.3.2 && cd network-2.6.3.2/
$ cabal new-build --enable-tests -j4 all
Resolving dependencies...
In order, the following will be built (use -v for more details):
 - network-2.6.3.2 {network-2.6.3.2-inplace} (lib) (first run)
 - network-2.6.3.2 {network-2.6.3.2-inplace-doctest} (test:doctest) (first run)
 - network-2.6.3.2 {network-2.6.3.2-inplace-simple} (test:simple) (first run)
 - network-2.6.3.2 {network-2.6.3.2-inplace-regression} (test:regression) (first run)
Configuring library for network-2.6.3.2..
Configuring test suite 'doctest' for network-2.6.3.2..
configure: WARNING: unrecognized options: --with-compiler
configure: WARNING: unrecognized options: --with-compiler
checking build system type... checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... no
configure: error: in `/tmp/network-2.6.3.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
no
sed: can't read conftest.c: No such file or directory
configure: error: in `/tmp/network-2.6.3.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Failed to build network-2.6.3.2 (which is required by test:simple from
network-2.6.3.2 and test:regression from network-2.6.3.2). The failure
occurred during the configure step. The build process terminated with exit
code 77
Failed to build test:doctest from network-2.6.3.2. The failure occurred during
the configure step. The build process terminated with exit code 77

Notice how configure is invoked simultaneously for the lib and test:doctest component, finally resulting in two configure-runs corrupting each other.

This would be fine for non-local per-component builds, but local builds of local per-components share a common work-folder where configure operates, so this is redundant work (as all configure invocations are supposed to have the same result -- NB: .buildinfo files are often generated by those which the subsequent build-process depends upon!) and more importantly causes actual failures.

/cc @ezyang

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions