Skip to content

bootstrap should fail gracefully, if there is no pkg-config available #27219

@dimpase

Description

@dimpase

When #27114 is merged, ./bootstrap requires pkgconf to run properly. It should switch to downloading the configure spkg if the pkgconf m4 macros are not installed. Otherwise one gets

checking whether g++ supports C++11 features with -std=gnu++11... yes
checking for gcc option to accept ISO C99... none needed
checking if gcc accepts -dumpversion option... yes
checking gcc version... 5.4.0
checking if g++ accepts -dumpversion option... yes
checking g++ version... 5.4.0
configure: === checking whether to install the libffi SPKG ===
./configure: line 9026: syntax error near unexpected token `LIBFFI,'
./configure: line 9026: `        PKG_CHECK_MODULES(LIBFFI, libffi, ,'
If you would like to try to build Sage anyway (to help porting),
export the variable 'SAGE_PORT' to something non-empty.
Makefile:39: recipe for target 'build/make/Makefile' failed
make[1]: Leaving directory '/var/lib/buildbot/slave/sage_git/build'
make[1]: *** [build/make/Makefile] Error 1
Makefile:31: recipe for target 'build-clean' failed
make: *** [build-clean] Error 2
program finished with exit code 2

In order to solve this issue, we check for presence of PKG_PROG_PKG_CONFIG at bootstrap/autoconf run. We need renaming of PKG_ -> SPKG_ in m4/sage_spkg_collect.m4, which we take from #27114 in order not to cause conflicts.

#27114 probably will need a rebase on top of this branch.

CC: @embray @vbraun @jdemeyer

Component: build

Author: Dima Pasechnik

Branch/Commit: 187de34

Reviewer: Jeroen Demeyer

Issue created by migration from https://trac.sagemath.org/ticket/27219

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions