summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2021-07-02 03:30:47 -0400
committerGitHub <noreply@github.com>2021-07-02 09:30:47 +0200
commit8089b86dc20ed2d972825b38286cd878548aa9ad (patch)
tree38f0d1992f678b5395b909da7b56e2453d7776ef
parentf1842f363db1e159e7b11fabde88acbb15563695 (diff)
downloadspack-8089b86dc20ed2d972825b38286cd878548aa9ad.tar.gz
spack-8089b86dc20ed2d972825b38286cd878548aa9ad.tar.bz2
spack-8089b86dc20ed2d972825b38286cd878548aa9ad.tar.xz
spack-8089b86dc20ed2d972825b38286cd878548aa9ad.zip
curl: explicitly disable unused dependencies (#24613)
I installed curl on my mac and it picked up a homebrew (I think?) installation of gsasl. A later system update broke git because of the implicitly added dependency. Explicitly disabling libraries that *might* exist on the system is the safe approach here. ``` dyld: Library not loaded: /usr/local/opt/gsasl/lib/libgsasl.7.dylib Referenced from: /rnsdhpc/code/spack/opt/spack/apple-clang/curl/gag5v3c/lib/libcurl.4.dylib Reason: image not found error: git-remote-https died of signal 6 ```
-rw-r--r--var/spack/repos/builtin/packages/curl/package.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py
index 4c240991f4..a5ef685b8c 100644
--- a/var/spack/repos/builtin/packages/curl/package.py
+++ b/var/spack/repos/builtin/packages/curl/package.py
@@ -3,9 +3,10 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
import sys
+from spack import *
+
class Curl(AutotoolsPackage):
"""cURL is an open source command line tool and library for
@@ -69,16 +70,27 @@ class Curl(AutotoolsPackage):
def configure_args(self):
spec = self.spec
- args = ['--with-zlib={0}'.format(spec['zlib'].prefix)]
- args.append('--with-libidn2={0}'.format(spec['libidn2'].prefix))
+ args = [
+ '--with-zlib=' + spec['zlib'].prefix,
+ '--with-libidn2=' + spec['libidn2'].prefix,
+ # Prevent unintentional linking against system libraries: we could
+ # add variants for these in the future
+ '--without-libbrotli',
+ '--without-libgsasl',
+ '--without-libmetalink',
+ '--without-libpsl',
+ '--without-zstd',
+ ]
if spec.satisfies('+darwinssl'):
args.append('--with-darwinssl')
else:
- args.append('--with-ssl={0}'.format(spec['openssl'].prefix))
+ args.append('--with-ssl=' + spec['openssl'].prefix)
if spec.satisfies('+gssapi'):
- args.append('--with-gssapi={0}'.format(spec['krb5'].prefix))
+ args.append('--with-gssapi=' + spec['krb5'].prefix)
+ else:
+ args.append('--without-gssapi')
args += self.with_or_without('nghttp2')
args += self.with_or_without('libssh2')