From 15207bae43f5264fa49ab644ca004e5038dae64b Mon Sep 17 00:00:00 2001 From: Hector Martinez-Seara Date: Sat, 16 Nov 2019 22:34:38 +0100 Subject: guile package: Handling the threads option. (#13730) * guile package: Handling the threads option. Currently guile by default tries to compile its thread variant. However, the threaded version can only be compiled if bdw-gc is compiled with some threads support. Currently, the default compilation of the bdw garbage collector is compiled without any thread support resulting in a compilation error. I have changed the the default guile compilation to the non-threaded version. I have also added the appropiated options for the bdw-gc compilation in case the user prefers the threaded variant. * guile package(flake8): fixed identation issues --- var/spack/repos/builtin/packages/guile/package.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/guile/package.py b/var/spack/repos/builtin/packages/guile/package.py index de15b1848d..6813cb6631 100644 --- a/var/spack/repos/builtin/packages/guile/package.py +++ b/var/spack/repos/builtin/packages/guile/package.py @@ -24,20 +24,29 @@ class Guile(AutotoolsPackage): version('2.0.11', sha256='e6786c934346fa2e38e46d8d81a622bb1c16d130153523f6129fcd79ef1fb040') variant('readline', default=True, description='Use the readline library') - variant('threads', default=True, description='Use the thread interface') + variant( + 'threads', + default='none', + values=('none', 'posix', 'dgux386'), + multi=False, + description='Use the thread interface' + ) + depends_on('bdw-gc@7.0: threads=none', when='threads=none') + depends_on('bdw-gc@7.0: threads=posix', when='threads=posix') + depends_on('bdw-gc@7.0: threads=dgux386', when='threads=dgux386') depends_on('gmp@4.2:') depends_on('gettext') depends_on('libtool@1.5.6:') depends_on('libunistring@0.9.3:') - depends_on('bdw-gc@7.0:') depends_on('libffi') depends_on('readline', when='+readline') depends_on('pkgconfig', type='build') build_directory = 'spack-build' - conflicts('+threads', when='%intel') + conflicts('threads=posix', when='%intel') + conflicts('threads=dgux386', when='%intel') def configure_args(self): spec = self.spec @@ -49,7 +58,11 @@ class Guile(AutotoolsPackage): '--with-libgmp-prefix={0}'.format(spec['gmp'].prefix), '--with-libintl-prefix={0}'.format(spec['gettext'].prefix), ] - config_args += self.with_or_without('threads') + + if 'threads=none' in spec: + config_args.append('--without-threads') + else: + config_args.append('--with-threads') if '+readline' in spec: config_args.append('--with-libreadline-prefix={0}'.format( -- cgit v1.2.3-60-g2f50