Fix undefined symbols by building shared libraries
This commit is contained in:
parent
bdb64c2e39
commit
5cac0a528c
5 changed files with 21 additions and 20 deletions
|
@ -44,7 +44,8 @@ def install(self, spec, prefix):
|
||||||
config_args = [
|
config_args = [
|
||||||
'--prefix={0}'.format(prefix),
|
'--prefix={0}'.format(prefix),
|
||||||
'--with-blas={0}'.format(spec['blas'].prefix.lib),
|
'--with-blas={0}'.format(spec['blas'].prefix.lib),
|
||||||
'--with-lapack={0}'.format(spec['lapack'].prefix.lib)
|
'--with-lapack={0}'.format(spec['lapack'].prefix.lib),
|
||||||
|
'--enable-shared'
|
||||||
]
|
]
|
||||||
|
|
||||||
configure(*config_args)
|
configure(*config_args)
|
||||||
|
|
|
@ -35,7 +35,8 @@ class LibatomicOps(Package):
|
||||||
version('7.4.4', '426d804baae12c372967a6d183e25af2')
|
version('7.4.4', '426d804baae12c372967a6d183e25af2')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
configure('--prefix={0}'.format(prefix))
|
configure('--prefix={0}'.format(prefix),
|
||||||
|
'--enable-shared')
|
||||||
|
|
||||||
make()
|
make()
|
||||||
make('install')
|
make('install')
|
||||||
|
|
|
@ -38,6 +38,7 @@ class Libctl(Package):
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
configure('--prefix={0}'.format(prefix),
|
configure('--prefix={0}'.format(prefix),
|
||||||
|
'--enable-shared',
|
||||||
'GUILE={0}'.format(join_path(
|
'GUILE={0}'.format(join_path(
|
||||||
spec['guile'].prefix.bin, 'guile')),
|
spec['guile'].prefix.bin, 'guile')),
|
||||||
'GUILE_CONFIG={0}'.format(join_path(
|
'GUILE_CONFIG={0}'.format(join_path(
|
||||||
|
|
|
@ -35,14 +35,14 @@ class Meep(Package):
|
||||||
version('1.2.1', '9be2e743c3a832ae922de9d955d016c5')
|
version('1.2.1', '9be2e743c3a832ae922de9d955d016c5')
|
||||||
version('1.1.1', '415e0cd312b6caa22b5dd612490e1ccf')
|
version('1.1.1', '415e0cd312b6caa22b5dd612490e1ccf')
|
||||||
|
|
||||||
variant('blas', default=True, description='Enable BLAS support')
|
variant('blas', default=True, description='Enable BLAS support')
|
||||||
variant('lapack', default=True, description='Enable LAPACK support')
|
variant('lapack', default=True, description='Enable LAPACK support')
|
||||||
variant('harminv', default=True, description='Enable Harminv support')
|
variant('harminv', default=True, description='Enable Harminv support')
|
||||||
variant('guile', default=True, description='Enable Guilde support')
|
variant('guile', default=True, description='Enable Guilde support')
|
||||||
variant('libctl', default=True, description='Enable libctl support')
|
variant('libctl', default=True, description='Enable libctl support')
|
||||||
variant('mpi', default=True, description='Enable MPI support')
|
variant('mpi', default=True, description='Enable MPI support')
|
||||||
variant('hdf5', default=True, description='Enable HDF5 support')
|
variant('hdf5', default=True, description='Enable HDF5 support')
|
||||||
variant('gsl', default=False, description='Build with GSL (only necessary for testing)')
|
variant('gsl', default=True, description='Enable GSL support')
|
||||||
|
|
||||||
depends_on('blas', when='+blas')
|
depends_on('blas', when='+blas')
|
||||||
depends_on('lapack', when='+lapack')
|
depends_on('lapack', when='+lapack')
|
||||||
|
@ -50,7 +50,7 @@ class Meep(Package):
|
||||||
depends_on('guile', when='+guile')
|
depends_on('guile', when='+guile')
|
||||||
depends_on('libctl@3.2:', when='+libctl')
|
depends_on('libctl@3.2:', when='+libctl')
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
depends_on('hdf5', when='+hdf5')
|
depends_on('hdf5~mpi', when='+hdf5~mpi')
|
||||||
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
||||||
depends_on('gsl', when='+gsl')
|
depends_on('gsl', when='+gsl')
|
||||||
|
|
||||||
|
@ -62,12 +62,10 @@ def url_for_version(self, version):
|
||||||
return "{0}/old/meep-{1}.tar.gz".format(base_url, version)
|
return "{0}/old/meep-{1}.tar.gz".format(base_url, version)
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
# Must be compiled with -fPIC for py-meep
|
config_args = [
|
||||||
env['CFLAGS'] = '-fPIC'
|
'--prefix={0}'.format(prefix),
|
||||||
env['CXXFLAGS'] = '-fPIC'
|
'--enable-shared'
|
||||||
env['FFLAGS'] = '-fPIC'
|
]
|
||||||
|
|
||||||
config_args = ['--prefix={0}'.format(prefix)]
|
|
||||||
|
|
||||||
if '+blas' in spec:
|
if '+blas' in spec:
|
||||||
config_args.append('--with-blas={0}'.format(
|
config_args.append('--with-blas={0}'.format(
|
||||||
|
@ -103,7 +101,7 @@ def install(self, spec, prefix):
|
||||||
|
|
||||||
# aniso_disp test fails unless installed with harminv
|
# aniso_disp test fails unless installed with harminv
|
||||||
# near2far test fails unless installed with gsl
|
# near2far test fails unless installed with gsl
|
||||||
if '+harminv' in spec and '+gsl' in spec:
|
if self.run_tests and '+harminv' in spec and '+gsl' in spec:
|
||||||
# Most tests fail when run in parallel
|
# Most tests fail when run in parallel
|
||||||
# 2D_convergence tests still fails to converge for unknown reasons
|
# 2D_convergence tests still fails to converge for unknown reasons
|
||||||
make('check', parallel=False)
|
make('check', parallel=False)
|
||||||
|
|
|
@ -41,8 +41,8 @@ class PyMeep(Package):
|
||||||
depends_on('py-scipy')
|
depends_on('py-scipy')
|
||||||
depends_on('py-matplotlib')
|
depends_on('py-matplotlib')
|
||||||
|
|
||||||
depends_on('mpi', when='+mpi') # OpenMPI 1.3.3 is recommended
|
depends_on('mpi', when='+mpi')
|
||||||
depends_on('meep') # must be compiled with -fPIC
|
depends_on('meep~mpi', when='~mpi')
|
||||||
depends_on('meep+mpi', when='+mpi')
|
depends_on('meep+mpi', when='+mpi')
|
||||||
|
|
||||||
# As of SWIG 3.0.3, Python-style comments are now treated as
|
# As of SWIG 3.0.3, Python-style comments are now treated as
|
||||||
|
|
Loading…
Reference in a new issue