Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --with-system-<spkg> options to configure #27567

Closed
embray opened this issue Mar 29, 2019 · 13 comments
Closed

Add --with-system-<spkg> options to configure #27567

embray opened this issue Mar 29, 2019 · 13 comments

Comments

@embray
Copy link
Contributor

embray commented Mar 29, 2019

As discussed in other tickets, such as #27373 and #26899, it would sometimes be useful to be able to explicitly specify, at configure-time, whether or not a system package can be used to fulfill some SPKG dependency.

With the work being done for #27330, it is currently the case that if an SPKG has a spkg-configure.m4, and the checks performed for the system package succeed, then the system package will always be used whether you want to or not.

This is a problem because even of the configure-time checks succeed, there could be previously unknown or unanticipated problems with using a particular version of the system package or some package+platform combination.

Therefore it is useful (if unfortunate) to be able to force use of the SPKG and disable checking for the system package. In principle we would want to react to the broken package+platform combination as well, either by fixing it somehow or blacklisting that particular combination at configure-time. However, by providing this option, we at least don't have to react immediately to such problems if/when they arise (e.g. #26899).

This ticket adds a --with-system-<spkg> flag to configure; e.g. --with-system-zlib. By default this is enabled (the current behavior), but by passing --with-system-zlib=no or --without-system-zlib then the SPKG will be installed without checking the system for the dependency.

This also adds the option to pass --with-system-zlib=force meaning that if the dependency cannot be found on the system then configure will abort with an error message.

This would effectively replace #21538.

CC: @dimpase @jdemeyer @jhpalmieri

Component: build: configure

Author: Erik Bray

Branch/Commit: b6aa97f

Reviewer: Dima Pasechnik

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

@embray embray added this to the sage-8.8 milestone Mar 29, 2019
@embray
Copy link
Contributor Author

embray commented Mar 29, 2019

Author: Erik Bray

@embray
Copy link
Contributor Author

embray commented Mar 29, 2019

Commit: afe116a

@embray
Copy link
Contributor Author

embray commented Mar 29, 2019

@embray
Copy link
Contributor Author

embray commented Mar 29, 2019

comment:1

This would provide at least a partial workaround to #26899. Knowing (as we do now) that using the system zlib is problematic on some OSX's (in this case due to a bug in python). With this feature we can at least tell users to run make configure; ./configure --without-system-zlib as a workaround.

I think this might also be useful for resolving #27373, though I don't believe it's strictly necessary for that either.

I'm certainly open to revisions on the concept, but I do believe that such a flag, however it's named, is useful.


New commits:

afe116aTrac #27567: Add --with-system- options to configure

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 29, 2019

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

b6aa97fTrac #27567: Add --with-system- options to configure

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 29, 2019

Changed commit from afe116a to b6aa97f

@dimpase
Copy link
Member

dimpase commented Mar 29, 2019

comment:3

for uniformity with mpir/gmp etc, I'd name it --with-zlib= which takes values
system/install, and the default is system.

@embray
Copy link
Contributor Author

embray commented Mar 29, 2019

comment:4

Replying to @dimpase:

for uniformity with mpir/gmp etc, I'd name it --with-zlib= which takes values
system/install, and the default is system.

We might need to modify some other macros (e.g. AX_CHECK_ZLIB) which already provides a --with-zlib option.

@embray
Copy link
Contributor Author

embray commented Mar 29, 2019

comment:5

This is the relevant portion of what ./configure --help currently looks like with this branch:

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-python=2         build and use Python 2 (default)
  --with-python=3         build and use Python 3
  --with-mp=mpir          use MPIR as multiprecision library (default)
  --with-mp=gmp           use GMP as multiprecision library
  --with-blas=openblas    use OpenBLAS as BLAS library (default)
  --with-blas=atlas       use ATLAS as BLAS library
  --with-system-gcc       detect and use an existing system gcc (default
                          is yes)
  --with-system-gcc=force require use of an existing system gcc
  --with-system-zeromq    detect and use an existing system zeromq (default
                          is yes)
  --with-system-zeromq=force
                          require use of an existing system zeromq
  --with-zmq=<prefix>     ZMQ prefix directory
  --with-system-git       detect and use an existing system git (default
                          is yes)
  --with-system-git=force require use of an existing system git
  --with-system-libffi    detect and use an existing system libffi (default
                          is yes)
  --with-system-libffi=force
                          require use of an existing system libffi
  --with-system-gf2x      detect and use an existing system gf2x (default
                          is yes)
  --with-system-gf2x=force
                          require use of an existing system gf2x
  --with-system-yasm      detect and use an existing system yasm (default
                          is yes)
  --with-system-yasm=force
                          require use of an existing system yasm
  --with-system-xz        detect and use an existing system xz (default
                          is yes)
  --with-system-xz=force  require use of an existing system xz
  --with-lzma=DIR         root directory path of lzma installation [defaults to
                          /usr/local or /usr if not found in /usr/local]
  --without-lzma          to disable lzma usage completely
  --with-system-bzip2     detect and use an existing system bzip2 (default
                          is yes)
  --with-system-bzip2=force
                          require use of an existing system bzip2
  --with-system-gfortran  detect and use an existing system gfortran (default
                          is yes)
  --with-system-gfortran=force
                          require use of an existing system gfortran
  --with-system-zlib      detect and use an existing system zlib (default
                          is yes)
  --with-system-zlib=force
                          require use of an existing system zlib
  --with-zlib=DIR         root directory path of zlib installation [defaults to
                          /usr/local or /usr if not found in /usr/local]
  --without-zlib          to disable zlib usage completely
  --with-system-curl      detect and use an existing system curl (default
                          is yes)
  --with-system-curl=force
                          require use of an existing system curl
  --with-system-patch     detect and use an existing system patch (default
                          is yes)
  --with-system-patch=force
                          require use of an existing system patch

@dimpase
Copy link
Member

dimpase commented Mar 29, 2019

comment:6

ah OK, it's fine then.

@dimpase
Copy link
Member

dimpase commented Apr 1, 2019

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Apr 1, 2019

comment:7

looks good to me.

@vbraun
Copy link
Member

vbraun commented Apr 3, 2019

Changed branch from u/embray/build/system-package-configure-flag to b6aa97f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants