Fix undefined symbols by building shared libraries

This commit is contained in:
Adam J. Stewart 2016-07-20 12:57:43 -05:00
parent bdb64c2e39
commit 5cac0a528c
5 changed files with 21 additions and 20 deletions

View file

@ -44,7 +44,8 @@ def install(self, spec, prefix):
config_args = [
'--prefix={0}'.format(prefix),
'--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)

View file

@ -35,7 +35,8 @@ class LibatomicOps(Package):
version('7.4.4', '426d804baae12c372967a6d183e25af2')
def install(self, spec, prefix):
configure('--prefix={0}'.format(prefix))
configure('--prefix={0}'.format(prefix),
'--enable-shared')
make()
make('install')

View file

@ -38,6 +38,7 @@ class Libctl(Package):
def install(self, spec, prefix):
configure('--prefix={0}'.format(prefix),
'--enable-shared',
'GUILE={0}'.format(join_path(
spec['guile'].prefix.bin, 'guile')),
'GUILE_CONFIG={0}'.format(join_path(

View file

@ -42,7 +42,7 @@ class Meep(Package):
variant('libctl', default=True, description='Enable libctl support')
variant('mpi', default=True, description='Enable MPI 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('lapack', when='+lapack')
@ -50,7 +50,7 @@ class Meep(Package):
depends_on('guile', when='+guile')
depends_on('libctl@3.2:', when='+libctl')
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('gsl', when='+gsl')
@ -62,12 +62,10 @@ def url_for_version(self, version):
return "{0}/old/meep-{1}.tar.gz".format(base_url, version)
def install(self, spec, prefix):
# Must be compiled with -fPIC for py-meep
env['CFLAGS'] = '-fPIC'
env['CXXFLAGS'] = '-fPIC'
env['FFLAGS'] = '-fPIC'
config_args = ['--prefix={0}'.format(prefix)]
config_args = [
'--prefix={0}'.format(prefix),
'--enable-shared'
]
if '+blas' in spec:
config_args.append('--with-blas={0}'.format(
@ -103,7 +101,7 @@ def install(self, spec, prefix):
# aniso_disp test fails unless installed with harminv
# 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
# 2D_convergence tests still fails to converge for unknown reasons
make('check', parallel=False)

View file

@ -41,8 +41,8 @@ class PyMeep(Package):
depends_on('py-scipy')
depends_on('py-matplotlib')
depends_on('mpi', when='+mpi') # OpenMPI 1.3.3 is recommended
depends_on('meep') # must be compiled with -fPIC
depends_on('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