Exemplo n.º 1
0
    def configure_step(self):
        """Configure build: set config options and configure"""

        if LooseVersion(self.version) < LooseVersion("4.3"):
            self.cfg.update('configopts', "--enable-shared")

            if self.toolchain.options['pic']:
                self.cfg.update('configopts', '--with-pic')

#            tup = (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90'))
            tup = (os.getenv('FFLAGS'), os.getenv('CC'), os.getenv('F90'))
            self.cfg.update('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % tup)

            # add -DgFortran to CPPFLAGS when building with GCC
            if self.toolchain.comp_family() == toolchain.GCC:  #@UndefinedVariable
                self.cfg.update('configopts', 'CPPFLAGS="%s -DgFortran"' % os.getenv('CPPFLAGS'))

            ConfigureMake.configure_step(self)

        else:
            hdf5 = get_software_root('HDF5')
            if hdf5:
                env.setvar('HDF5_ROOT', hdf5)

            CMakeMake.configure_step(self)
Exemplo n.º 2
0
    def sanity_check_step(self):
        """Custom sanity check for Mono."""

        custom_paths = {
            'files': ['bin/mono', 'bin/gmcs', 'bin/xbuild'],
            'dirs': ['include/mono-%s.0/mono' % self.version.split('.')[0], 'lib'],
        }
        ConfigureMake.sanity_check_step(self, custom_paths=custom_paths)
Exemplo n.º 3
0
 def extra_options(extra_vars=None):
     """Define extra easyconfig parameters specific to CMakeMake."""
     extra_vars = dict(ConfigureMake.extra_options(extra_vars))
     extra_vars.update({
         'srcdir': [None, "Source directory location to provide to cmake command", CUSTOM],
         'separate_build_dir': [False, "Perform build in a separate directory", CUSTOM],
     })
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 4
0
 def build_step(self):
     """Configure TBB build/installation."""
     if self.toolchain.name == DUMMY_TOOLCHAIN_NAME:
         IntelBase.build_step(self)
     else:
         # build with: make compiler={icl, icc, gcc, clang}
         self.cfg.update('buildopts', 'compiler="%s"' % os.getenv('CC'))
         ConfigureMake.build_step(self)
    def sanity_check_step(self):
        """Custom sanity check for libxml2"""

        custom_paths = {
                        'files':["lib/libxml2.a", "lib/libxml2.so"],
                        'dirs':["bin", self.pylibdir, "include/libxml2/libxml"],
                       }

        ConfigureMake.sanity_check_step(self, custom_paths=custom_paths)
Exemplo n.º 6
0
 def sanity_check_step(self):
     """Custom sanity check for libxml2"""
     shlib_ext = get_shared_lib_ext()
     pyfiles = ['libxml2mod.%s' % shlib_ext, 'libxml2.py', 'drv_libxml2.py']
     custom_paths = {
         'files': ["lib/libxml2.a", "lib/libxml2.%s" % shlib_ext] +
                  [tuple([(os.path.join(d, f)) for d in self.all_pylibdirs]) for f in pyfiles],
         'dirs': ["bin", tuple(self.all_pylibdirs), "include/libxml2/libxml"],
     }
     ConfigureMake.sanity_check_step(self, custom_paths=custom_paths)
 def configure_step(self):
     """
     Configure and 
     Test if python module is loaded
     """
     if not get_software_root('Python'):
         raise EasyBuildError("Python module not loaded")
     # We will do the python bindings ourselves so force them off
     self.cfg.update('configopts', '--without-python')
     ConfigureMake.configure_step(self)
Exemplo n.º 8
0
    def extract_step(self):
        """Custom extract step for Mono: don't try and extract any of the provided RPMs."""

        for src in self.src:
            if src['name'].endswith('.rpm'):
                self.rpms.append(src)
            else:
                self.mono_srcs.append(src)

        self.src = self.mono_srcs
        ConfigureMake.extract_step(self)
Exemplo n.º 9
0
    def sanity_check_step(self):
        """Custom sanity check for libxml2"""

        custom_paths = {
                        'files':["lib/libxml2.a", "lib/libxml2.so"] +
                                [os.path.join(self.pylibdir, x)
                                 for x in ['libxml2mod.so', 'libxml2.py', 'drv_libxml2.py']],
                        'dirs':["bin", self.pylibdir, "include/libxml2/libxml"],
                       }

        ConfigureMake.sanity_check_step(self, custom_paths=custom_paths)
Exemplo n.º 10
0
    def install_step(self):
        """
        Install libxml2 and install python bindings
        """
        ConfigureMake.install_step(self)

        try:
            os.chdir('python')
            PythonPackage.install_step(self)
            os.chdir('..')
        except OSError, err:
            self.log.error("Failed to install libxml2 Python bindings: %s" % err)
Exemplo n.º 11
0
    def configure_step(self):
        """Configuration step, we set FC, F77 is already set by EasyBuild to the right compiler,
        FC is used for Fortan90"""
        environment.setvar('FC', self.toolchain.get_variable('F90'))

        # make sure correct config script is used for Tcl/Tk
        for dep in ['Tcl', 'Tk']:
            root = get_software_root(dep)
            if root:
                dep_config = os.path.join(root, 'lib', '%sConfig.sh' % dep.lower())
                self.cfg.update('configopts', '-with-%s-config=%s' % (dep.lower(), dep_config))

        ConfigureMake.configure_step(self)
Exemplo n.º 12
0
    def sanity_check_step(self):
        """Custom sanity check for Mono."""

        binaries = ['bin/mono', 'bin/xbuild']
        if LooseVersion(self.version) >= LooseVersion('2.11'):
            binaries.append('bin/mcs')
        else:
            binaries.append('bin/gmcs')

        custom_paths = {
            'files': binaries,
            'dirs': ['include/mono-2.0/mono', 'lib'],
        }
        ConfigureMake.sanity_check_step(self, custom_paths=custom_paths)
Exemplo n.º 13
0
    def install_perl_module(self):
        """Install procedure for Perl modules: using either Makefile.Pl or Build.PL."""
        # Perl modules have two possible installation procedures: using Makefile.PL and Build.PL
        # configure, build, test, install
        if os.path.exists('Makefile.PL'):
            run_cmd('perl Makefile.PL PREFIX=%s' % self.installdir)
            ConfigureMake.build_step(self)
#            ConfigureMake.test_step(self)
            ConfigureMake.install_step(self)
        elif os.path.exists('Build.PL'):
            run_cmd('perl Build.PL --prefix %s' % self.installdir)
            run_cmd('perl Build build')
#            run_cmd('perl Build test')
            run_cmd('perl Build install')
Exemplo n.º 14
0
    def build_step(self):
        """
        Make libxml2 first, then make python bindings
        """
        ConfigureMake.build_step(self)

        try:
            os.chdir('python')
            # set cflags to point to include folder 
            env.setvar('CFLAGS', "-I../include")
            PythonPackage.build_step(self)
            os.chdir('..')
        except OSError, err:
            self.log.error("Failed to build libxml2 Python bindings: %s" % err)
Exemplo n.º 15
0
    def sanity_check_step(self):
        """Custom sanity check for libxml2"""
        shlib_ext = get_shared_lib_ext()
        custom_paths = {
            'files': [('lib/libxml2.a', 'lib64/libxml2.a'),
                      ('lib/libxml2.%s' % shlib_ext, 'lib64/libxml2.%s' % shlib_ext)],
            'dirs': ['bin', 'include/libxml2/libxml'],
        }

        if self.with_python_bindings:
            pyfiles = ['libxml2mod.%s' % shlib_ext, 'libxml2.py', 'drv_libxml2.py']
            custom_paths['files'].extend([os.path.join(self.pylibdir, f) for f in pyfiles])
            custom_paths['dirs'].append(self.pylibdir)

        ConfigureMake.sanity_check_step(self, custom_paths=custom_paths)
Exemplo n.º 16
0
 def extra_options(extra_vars=None):
     """Extra easyconfig parameters specific to ConfigureMake."""
     extra_vars = dict(ConfigureMake.extra_options(extra_vars))
     extra_vars.update({
         # 'Amber': [True, "Build Amber in addition to AmberTools", CUSTOM],
         'patchlevels': ["latest", "(AmberTools, Amber) updates to be applied", CUSTOM],
         # The following is necessary because some patches to the Amber update
         # script update the update script itself, in which case it will quit
         # and insist on being run again. We don't know how many times will
         # be needed, but the number of times is patchlevel specific.
         'patchruns': [1, "Number of times to run Amber's update script before building", CUSTOM],
         # enable testing by default
         'runtest': [True, "Run tests after each build", CUSTOM],
     })
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 17
0
 def extra_options():
     """Add extra config options specific to Python."""
     extra_vars = {
         'ulimit_unlimited': [False, "Ensure stack size limit is set to '%s' during build" % UNLIMITED, CUSTOM],
         'ebpythonprefixes': [True, "Create sitecustomize.py and allow use of $EBPYTHONPREFIXES", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 18
0
 def extra_options():
     """Add extra config options specific to SLEPc."""
     extra_vars = [
                   ('sourceinstall', [False, "Indicates whether a source installation should be performed (default: False)", CUSTOM]),
                   ('runtest', ['test', "Make target to test build (default: test)", BUILD])
                  ]
     return ConfigureMake.extra_options(extra_vars)
 def extra_options():
     """Custom easyconfig parameters for Quantum ESPRESSO."""
     extra_vars = {
         'hybrid': [False, "Enable hybrid build (with OpenMP)", CUSTOM],
         'with_scalapack': [True, "Enable ScaLAPACK support", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 20
0
 def extra_options(extra_vars=None):
     """Extra easyconfig parameters specific to the binutils easyblock."""
     extra_vars = ConfigureMake.extra_options(extra_vars=extra_vars)
     extra_vars.update({
         'install_libiberty': [True, "Also install libiberty (implies building with -fPIC)", CUSTOM],
     })
     return extra_vars
Exemplo n.º 21
0
 def extra_options():
     """Add extra config options specific to SLEPc."""
     extra_vars = {
         'sourceinstall': [False, "Indicates whether a source installation should be performed", CUSTOM],
         'runtest': ['test', "Make target to test build", BUILD],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 22
0
 def extra_options():
     extra_vars = [
                   ('ignorethrottling', [False, "Ignore check done by ATLAS for CPU throttling (not recommended) (default: False)", CUSTOM]),
                   ('full_lapack', [False, "Build a full LAPACK library (requires netlib's LAPACK) (default: False)", CUSTOM]),
                   ('sharedlibs', [False, "Enable building of shared libs as well (default: False)", CUSTOM])
                  ]
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 23
0
 def extra_options():
     extra_vars = {
         'ignorethrottling': [False, "Ignore check done by ATLAS for CPU throttling (not recommended)", CUSTOM],
         'full_lapack': [False, "Build a full LAPACK library (requires netlib's LAPACK)", CUSTOM],
         'sharedlibs': [False, "Enable building of shared libs as well", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 24
0
 def extra_options(extra_vars=None):
     """Define custom easyconfig parameters specific to MPICH."""
     extra_vars = ConfigureMake.extra_options(extra_vars)
     extra_vars.update({
         'debug': [False, "Enable debug build (which is slower)", CUSTOM],
     })
     return extra_vars
Exemplo n.º 25
0
    def extra_options():
        """Custom easyconfig parameters for NEURON."""

        extra_vars = {
            'paranrn': [True, "Enable support for distributed simulations.", CUSTOM],
        }
        return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 26
0
 def extra_options(extra_vars=None):
     """Define extra options for Siesta"""
     extra = {
         'with_transiesta': [True, "Build transiesta", CUSTOM],
         'with_utils': [True, "Build all utils", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars=extra)
Exemplo n.º 27
0
    def configure_step(self):
        """
        Configure and 
        Test if python module is loaded
        """
        if not get_software_root('Python'):
            self.log.error("Python module not loaded")
       
        ConfigureMake.configure_step(self)

        try:
            os.chdir('python')
            PythonPackage.configure_step(self)
            os.chdir('..')
        except OSError, err:
            self.log.error("Failed to configure libxml2 Python bindings: %s" % err)
    def extra_options():
        """Custom easyconfig parameters for FFTW."""
        extra_vars = {
            'auto_detect_cpu_features': [True, "Auto-detect available CPU features, and configure accordingly", CUSTOM],
            'use_fma': [None, "Configure with --enable-avx-128-fma (DEPRECATED, use 'use_fma4' instead)", CUSTOM],
            'with_mpi': [True, "Enable building of FFTW MPI library", CUSTOM],
            'with_openmp': [True, "Enable building of FFTW OpenMP library", CUSTOM],
            'with_shared': [True, "Enable building of shared FFTW libraries", CUSTOM],
            'with_threads': [True, "Enable building of FFTW threads library", CUSTOM],
        }

        for flag in FFTW_CPU_FEATURE_FLAGS:
            if flag == 'fma4':
                conf_opt = 'avx-128-fma'
            else:
                conf_opt = flag

            help_msg = "Configure with --enable-%s (if None, auto-detect support for %s)" % (conf_opt, flag.upper())
            extra_vars['use_%s' % flag] = [None, help_msg, CUSTOM]

        for prec in FFTW_PRECISION_FLAGS:
            help_msg = "Enable building of %s precision library" % prec.replace('-precision', '')
            extra_vars[EB_FFTW._prec_param(prec)] = [True, help_msg, CUSTOM]

        return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 29
0
 def extra_options():
     """
     Define extra options needed by Geant4
     """
     extra_vars = {
         'arch': [None, "Target architecture", MANDATORY],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 30
0
 def extra_options():
     """Custom easyconfig parameters for TAU."""
     backends = "Extra TAU backends to build and install; possible values: %s" % ','.join(sorted(KNOWN_BACKENDS))
     extra_vars = {
         'extra_backends': [None, backends, CUSTOM],
         'tau_makefile': ['Makefile.tau-papi-mpi-pdt', "Name of Makefile to use in $TAU_MAKEFILE", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 31
0
 def extra_options(extra_vars=None):
     """Define extra easyconfig parameters specific to CMakeMake."""
     extra_vars = ConfigureMake.extra_options(extra_vars)
     extra_vars.update({
         'srcdir': [
             None, "Source directory location to provide to cmake command",
             CUSTOM
         ],
         'separate_build_dir':
         [False, "Perform build in a separate directory", CUSTOM],
     })
     return extra_vars
Exemplo n.º 32
0
 def extra_options(extra_vars=None):
     """
     Define if we are using rules or not, and if we are building the GUI
     """
     extra = {
         'have_rules': [False, "Use rules", CUSTOM],
         'build_gui': [False, "Build GUI", CUSTOM],
     }
     if extra_vars is None:
         extra_vars = {}
     extra.update(extra_vars)
     return ConfigureMake.extra_options(extra_vars=extra)
Exemplo n.º 33
0
 def extra_options(extra_vars=None):
     """Define custom easyconfig parameters for VMD."""
     extra_vars = ConfigureMake.extra_options(extra_vars)
     extra_vars.update({
         'vmd_arch': [
             'LINUXAMD64',
             "VMD architecture string to use, default is LINUXAMD64", CUSTOM
         ],
         'vmd_extra_opts':
         ['', "Extra options to pass to the VMD configure process", CUSTOM],
     })
     return extra_vars
Exemplo n.º 34
0
 def extra_options():
     """Custom easyconfig parameters for TAU."""
     backends = "Extra TAU backends to build and install; possible values: %s" % ','.join(
         sorted(KNOWN_BACKENDS))
     extra_vars = {
         'extra_backends': [None, backends, CUSTOM],
         'tau_makefile': [
             'Makefile.tau-papi-mpi-pdt',
             "Name of Makefile to use in $TAU_MAKEFILE", CUSTOM
         ],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 35
0
    def extra_options():
        """Custom easyconfig parameters for NEURON."""

        extra_vars = {
            'paranrn':
            [True, "Enable support for distributed simulations.", CUSTOM],
            'enable_tests': [
                True, "Enable extensive testing in the sanity check step.",
                CUSTOM
            ],
        }
        return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 36
0
 def extra_options(extra_vars=None):
     """
     Define list of files or directories to be copied after make
     """
     extra = {
         'files_to_copy': [[], "List of files or dirs to copy", MANDATORY],
         'with_configure': [False, "Run configure script before building", BUILD],
     }
     if extra_vars is None:
         extra_vars = {}
     extra.update(extra_vars)
     return ConfigureMake.extra_options(extra_vars=extra)
Exemplo n.º 37
0
Arquivo: qt.py Projeto: jotelha/JSC
    def extra_options():
        extra_vars = {
            'check_qtwebengine': [False, "Make sure QtWebEngine components is installed", CUSTOM],
            'platform': [None, "Target platform to build for (e.g. linux-g++-64, linux-icc-64)", CUSTOM],
            'autodetect_platform': [True, "Let the configure script to autodetect the platform", CUSTOM],
        }
        extra_vars = ConfigureMake.extra_options(extra_vars)

        # allowing to specify prefix_opt doesn't make sense for Qt, since -prefix is hardcoded in configure_step
        del extra_vars['prefix_opt']

        return extra_vars
Exemplo n.º 38
0
    def install_perl_module(self):
        """Install procedure for Perl modules: using either Makefile.Pl or Build.PL."""

        # Perl modules have two possible installation procedures: using Makefile.PL and Build.PL
        # configure, build, test, install
        if os.path.exists('Makefile.PL'):
            install_cmd = ' '.join([
                self.cfg['preconfigopts'],
                'perl',
                'Makefile.PL',
                'PREFIX=%s' % self.installdir,
                self.cfg['configopts'],
            ])
            run_cmd(install_cmd)

            ConfigureMake.build_step(self)
            ConfigureMake.test_step(self)
            ConfigureMake.install_step(self)

        elif os.path.exists('Build.PL'):
            install_cmd = ' '.join([
                self.cfg['preconfigopts'],
                'perl',
                'Build.PL',
                '--prefix',
                self.installdir,
                self.cfg['configopts'],
            ])
            run_cmd(install_cmd)

            run_cmd("%s perl Build build %s" % (self.cfg['prebuildopts'], self.cfg['buildopts']))

            if self.cfg['runtest']:
                run_cmd('perl Build %s' % self.cfg['runtest'])
            run_cmd('%s perl Build install %s' % (self.cfg['preinstallopts'], self.cfg['installopts']))
 def extra_options():
     """Add custom easyconfig parameters for SystemMPI easyblock."""
     # Gather extra_vars from inherited classes, order matters to make sure bundle initialises correctly
     extra_vars = ConfigureMake.extra_options()
     extra_vars.update(EB_impi.extra_options())
     extra_vars.update(Bundle.extra_options())
     # Add an option to add all module path extensions to the resultant easyconfig
     # This is useful if you are importing the MPI installation from a non-default path
     extra_vars.update({
         'generate_standalone_module': [False, "Add known path extensions and environment variables for the MPI "
                                               "installation to the final module", CUSTOM],
     })
     return extra_vars
Exemplo n.º 40
0
    def configure_step(self):
        """Configure build: set config options and configure"""

        shlib_ext = get_shared_lib_ext()

        if LooseVersion(self.version) < LooseVersion("4.3"):
            self.cfg.update('configopts', "--enable-shared")

            if self.toolchain.options['pic']:
                self.cfg.update('configopts', '--with-pic')

            tup = (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90'))
            self.cfg.update('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % tup)

            # add -DgFortran to CPPFLAGS when building with GCC
            if self.toolchain.comp_family() == toolchain.GCC:  #@UndefinedVariable
                self.cfg.update('configopts', 'CPPFLAGS="%s -DgFortran"' % os.getenv('CPPFLAGS'))

            ConfigureMake.configure_step(self)

        else:
            self.cfg.update('configopts', '-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG " ')
            for (dep, libname) in [('cURL', 'curl'), ('HDF5', 'hdf5'), ('Szip', 'sz'), ('zlib', 'z')]:
                dep_root = get_software_root(dep)
                dep_libdir = get_software_libdir(dep)
                if dep_root:
                    incdir = os.path.join(dep_root, 'include')
                    self.cfg.update('configopts', '-D%s_INCLUDE_DIR=%s ' % (dep.upper(), incdir))
                    if dep == 'HDF5':
                        env.setvar('HDF5_ROOT', dep_root)
                        libhdf5 = os.path.join(dep_root, dep_libdir, 'libhdf5.%s' % shlib_ext)
                        self.cfg.update('configopts', '-DHDF5_LIB=%s ' % libhdf5)
                        libhdf5_hl = os.path.join(dep_root, dep_libdir, 'libhdf5_hl.%s' % shlib_ext)
                        self.cfg.update('configopts', '-DHDF5_HL_LIB=%s ' % libhdf5_hl)
                    else:
                        libso = os.path.join(dep_root, dep_libdir, 'lib%s.%s' % (libname, shlib_ext))
                        self.cfg.update('configopts', '-D%s_LIBRARY=%s ' % (dep.upper(), libso))

            CMakeMake.configure_step(self)
Exemplo n.º 41
0
 def extra_options():
     extra_vars = {
         'withchkpt': [False, "Enable checkpointing support (required BLCR)", CUSTOM],
         'withmpe': [False, "Build MPE routines", CUSTOM],
         'withhwloc': [False, "Enable support for using hwloc support for process binding", CUSTOM],
         'withlimic2': [False, "Enable LiMIC2 support for intra-node communication", CUSTOM],
         'debug': [False, "Enable debug build (which is slower)", CUSTOM],
         'rdma_type': ["gen2", "Specify the RDMA type (gen2/udapl)", CUSTOM],
         'blcr_path': [None, "Path to BLCR package", CUSTOM],
         'blcr_inc_path': [None, "Path to BLCR header files", CUSTOM],
         'blcr_lib_path': [None, "Path to BLCR library", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 42
0
class EB_EggLib(PythonPackage, ConfigureMake):
    """Support for building/installing EggLib."""
    def configure_step(self):
        """Configure EggLib build/install procedure."""
        # only need to configure Python library here, configuration of C++ library is done in install step
        PythonPackage.configure_step(self)

    def build_step(self):
        """No custom build procedure for EggLib; build/install is done in install_step."""
        pass

    def install_step(self):
        """Custom install procedure for EggLib: first build/install C++ library, then build Python library."""

        # build/install C++ library
        cpp_subdir = os.path.join(self.builddir,
                                  'egglib-cpp-%s' % self.version)
        try:
            os.chdir(cpp_subdir)
        except OSError, err:
            raise EasyBuildError("Failed to move to: %s", err)

        ConfigureMake.configure_step(self)
        ConfigureMake.build_step(self)
        ConfigureMake.install_step(self)

        # header files and libraries must be found when building Python library
        for varname, subdir in [('CPATH', 'include'), ('LIBRARY_PATH', 'lib')]:
            env.setvar(
                varname, '%s:%s' % (os.path.join(
                    self.installdir, subdir), os.environ.get(varname, '')))

        # build/install Python package
        py_subdir = os.path.join(self.builddir, 'egglib-py-%s' % self.version)
        try:
            os.chdir(py_subdir)
        except OSError, err:
            raise EasyBuildError("Failed to move to: %s", err)
Exemplo n.º 43
0
    def extra_options():
        extra_vars = {
            'platform': [
                None,
                "Target platform to build for (e.g. linux-g++-64, linux-icc-64)",
                CUSTOM
            ],
        }
        extra_vars = ConfigureMake.extra_options(extra_vars)

        # allowing to specify prefix_opt doesn't make sense for Qt, since -prefix is hardcoded in configure_step
        del extra_vars['prefix_opt']

        return extra_vars
Exemplo n.º 44
0
 def extra_options():
     """Add extra config options specific to PETSc."""
     extra_vars = {
         'sourceinstall': [False, "Indicates whether a source installation should be performed", CUSTOM],
         'shared_libs': [False, "Build shared libraries", CUSTOM],
         'with_papi': [False, "Enable PAPI support", CUSTOM],
         'papi_inc': ['/usr/include', "Path for PAPI include files", CUSTOM],
         'papi_lib': ['/usr/lib64/libpapi.so', "Path for PAPI library", CUSTOM],
         'runtest': ['test', "Make target to test build", BUILD],
         'download_deps_static': [[], "Dependencies that should be downloaded and installed static", CUSTOM],
         'download_deps_shared': [[], "Dependencies that should be downloaded and installed shared", CUSTOM],
         'download_deps': [[], "Dependencies that should be downloaded and installed", CUSTOM]
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 45
0
 def extra_options(extra_vars=None):
     """Define extra options for Siesta"""
     extra = {
         'with_libsiesta':
         [None, "Install the static libsiesta.a (v>4.1)", CUSTOM],
         'with_transiesta': [None, "Install transiesta (v<4.1)", CUSTOM],
         'with_utils': [True, "Install all utils", CUSTOM],
         'with_utils_names': [
             None,
             "Install list of utils by dir name under Utils/. (overrides with_utils)",
             CUSTOM
         ],
     }
     return ConfigureMake.extra_options(extra_vars=extra)
    def install_step(self):
        """
        Custom install step for libxml2;
        also build Python bindings ourselves if desired (only for older libxml2 versions
        """
        ConfigureMake.install_step(self)

        if self.with_python_bindings and LooseVersion(
                self.version) < LooseVersion('2.9.2'):
            try:
                # We can only do the Python bindings after the initial installation
                # since setup.py expects to find the include dir in the installation path
                # and that only exists after installation
                os.chdir('python')
                PythonPackage.configure_step(self)
                # set cflags to point to include folder for the compilation step to succeed
                env.setvar('CFLAGS', "-I../include")
                PythonPackage.build_step(self)
                PythonPackage.install_step(self)
                os.chdir('..')
            except OSError as err:
                raise EasyBuildError(
                    "Failed to install libxml2 Python bindings: %s", err)
Exemplo n.º 47
0
 def extra_options():
     extra_vars = {
         'platform': [
             None,
             "Target platform to build for (e.g. linux-g++-64, linux-icc-64)",
             CUSTOM
         ],
         'prefix_opt': [
             None,
             "Prefix command line option for configure script ('--prefix=' if None)",
             CUSTOM
         ],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 48
0
    def configure_step(self):
        """
        Configure libxml2 build
        """
        # only build with Python bindings if Python is listed as a dependency
        python = get_software_root('Python')
        if python:
            self.with_python_bindings = True
            self.require_python = True

        if not self.toolchain.is_system_toolchain():
            self.cfg.update('configopts', "CC='%s' CXX='%s'" % (os.getenv('CC'), os.getenv('CXX')))

        if self.toolchain.options.get('pic', False):
            self.cfg.update('configopts', '--with-pic')

        zlib = get_software_root('zlib')
        if zlib:
            self.cfg.update('configopts', '--with-zlib=%s' % zlib)

        # enable building of Python bindings if Python is a dependency (or build them ourselves for old versions)
        # disable building of Python bindings if Python is not a dependency
        if self.with_python_bindings and LooseVersion(self.version) >= LooseVersion('2.9.2'):
                libxml2_pylibdir = os.path.join(self.installdir, self.pylibdir)
                self.cfg.update('configopts', "--with-python=%s" % os.path.join(python, 'bin', 'python'))
                self.cfg.update('configopts', "--with-python-install-dir=%s" % libxml2_pylibdir)
        else:
            self.cfg.update('configopts', '--without-python')

        ConfigureMake.configure_step(self)

        if self.with_python_bindings:
            # prepare for installing Python package
            PythonPackage.prepare_python(self)

        # test using 'make check' (done via test_step)
        self.cfg['runtest'] = 'check'
Exemplo n.º 49
0
    def configure_step(self):
        """Configure build: set config options and configure"""

        if LooseVersion(self.version) < LooseVersion("4.3"):
            self.cfg.update('configopts', "--enable-shared")

            if self.toolchain.options['pic']:
                self.cfg.update('configopts', '--with-pic')

            tup = (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90'))
            self.cfg.update('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % tup)

            # add -DgFortran to CPPFLAGS when building with GCC
            if self.toolchain.comp_family() == toolchain.GCC:  #@UndefinedVariable
                self.cfg.update('configopts', 'CPPFLAGS="%s -DgFortran"' % os.getenv('CPPFLAGS'))

            ConfigureMake.configure_step(self)

        else:
            hdf5 = get_software_root('HDF5')
            if hdf5:
                env.setvar('HDF5_ROOT', hdf5)

            CMakeMake.configure_step(self)
Exemplo n.º 50
0
 def extra_options():
     """Add extra config options specific to Python."""
     extra_vars = {
         'ulimit_unlimited': [
             False,
             "Ensure stack size limit is set to '%s' during build" %
             UNLIMITED, CUSTOM
         ],
         'ebpythonprefixes': [
             True,
             "Create sitecustomize.py and allow use of $EBPYTHONPREFIXES",
             CUSTOM
         ],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 51
0
 def extra_options():
     """Add extra config options specific to Python."""
     extra_vars = {
         'ebpythonprefixes': [True, "Create sitecustomize.py and allow use of $EBPYTHONPREFIXES", CUSTOM],
         'install_pip': [False,
                         "Use the ensurepip module (Python 2.7.9+, 3.4+) to install the bundled versions "
                         "of pip and setuptools into Python. You _must_ then use pip for upgrading "
                         "pip & setuptools by installing newer versions as extensions!",
                         CUSTOM],
         'optimized': [True, "Build with expensive, stable optimizations (PGO, etc.) (version >= 3.5.4)", CUSTOM],
         'ulimit_unlimited': [False, "Ensure stack size limit is set to '%s' during build" % UNLIMITED, CUSTOM],
         'use_lto': [None, "Build with Link Time Optimization (>= v3.7.0, potentially unstable on some toolchains). "
                     "If None: auto-detect based on toolchain compiler (version)", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 52
0
 def extra_options():
     extra_vars = {
         'config_py': [None, "XALT site filter file", MANDATORY],
         'executable_tracking':
         [True, "Enable executable tracking", CUSTOM],
         'gpu_tracking': [None, "Enable GPU tracking", CUSTOM],
         'logging_url': [None, "Logging URL for transmission", CUSTOM],
         'mysql': [False, "Build with MySQL support", CUSTOM],
         'scalar_sampling': [True, "Enable scalar sampling", CUSTOM],
         'static_cxx':
         [False, "Statically link libstdc++ and libgcc_s", CUSTOM],
         'syshost': [None, "System name", MANDATORY],
         'transmission': [None, "Data tranmission method", MANDATORY],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 53
0
 def extra_options():
     """Add extra config options specific to SLEPc."""
     extra_vars = {
         'runtest': ['test', "Make target to test build", BUILD],
         'petsc_arch': [
             None, "PETSc architecture to use (value for $PETSC_ARCH)",
             CUSTOM
         ],
         'sourceinstall': [
             False,
             "Indicates whether a source installation should be performed",
             CUSTOM
         ],
     }
     return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 54
0
    def configure_step(self):
        """Custom configuration for R."""

        # define $BLAS_LIBS to build R correctly against BLAS/LAPACK library
        # $LAPACK_LIBS should *not* be specified since that may lead to using generic LAPACK
        # see https://github.com/easybuilders/easybuild-easyconfigs/issues/1435
        env.setvar('BLAS_LIBS', os.getenv('LIBBLAS'))
        self.cfg.update('configopts', "--with-blas --with-lapack")

        # make sure correct config script is used for Tcl/Tk
        for dep in ['Tcl', 'Tk']:
            root = get_software_root(dep)
            if root:
                dep_config = os.path.join(root, 'lib', '%sConfig.sh' % dep.lower())
                self.cfg.update('configopts', '--with-%s-config=%s' % (dep.lower(), dep_config))

        if "--with-x=" not in self.cfg['configopts'].lower():
            if get_software_root('X11'):
                self.cfg.update('configopts', '--with-x=yes')
            else:
                self.cfg.update('configopts', '--with-x=no')

        # enable graphic capabilities for plotting, based on available dependencies
        for dep in ['Cairo', 'libjpeg-turbo', 'libpng', 'libtiff']:
            if get_software_root(dep):
                if dep == 'libjpeg-turbo':
                    conf_opt = 'jpeglib'
                else:
                    conf_opt = dep.lower()
                self.cfg.update('configopts', '--with-%s' % conf_opt)

        out = ConfigureMake.configure_step(self)

        # check output of configure command to verify BLAS/LAPACK settings
        ext_libs_regex = re.compile("External libraries:.*BLAS\((?P<BLAS>.*)\).*LAPACK\((?P<LAPACK>.*)\)")
        res = ext_libs_regex.search(out)
        if res:
            for lib in ['BLAS', 'LAPACK']:
                if res.group(lib) == 'generic':
                    warn_msg = "R will be built with generic %s, which will result in poor performance." % lib
                    self.log.warning(warn_msg)
                    print_warning(warn_msg)
                else:
                    self.log.info("R is configured to use non-generic %s: %s", lib, res.group(lib))
        else:
            warn_msg = "R is configured to be built without BLAS/LAPACK, which will result in (very) poor performance"
            self.log.warning(warn_msg)
            print_warning(warn_msg)
Exemplo n.º 55
0
 def extra_options(extra_vars=None):
     """Define extra easyconfig parameters specific to CMakeMake."""
     extra_vars = ConfigureMake.extra_options(extra_vars)
     extra_vars.update({
         'abs_path_compilers': [False, "Specify compilers via absolute file path (not via command names)", CUSTOM],
         'allow_system_boost': [False, "Always allow CMake to pick up on Boost installed in OS "
                                       "(even if Boost is included as a dependency)", CUSTOM],
         'build_shared_libs': [None, "Build shared library (instead of static library)"
                                     "None can be used to add no flag (usually results in static library)", CUSTOM],
         'build_type': [None, "Build type for CMake, e.g. Release."
                              "Defaults to 'Release' or 'Debug' depending on toolchainopts[debug]", CUSTOM],
         'configure_cmd': [DEFAULT_CONFIGURE_CMD, "Configure command to use", CUSTOM],
         'srcdir': [None, "Source directory location to provide to cmake command", CUSTOM],
         'separate_build_dir': [True, "Perform build in a separate directory", CUSTOM],
     })
     return extra_vars
Exemplo n.º 56
0
 def extra_options():
     extra_vars = {
         'ignorethrottling': [
             False,
             "Ignore check done by ATLAS for CPU throttling (not recommended)",
             CUSTOM
         ],
         'full_lapack': [
             False,
             "Build a full LAPACK library (requires netlib's LAPACK)",
             CUSTOM
         ],
         'sharedlibs':
         [False, "Enable building of shared libs as well", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars)
 def make_module_extra(self, *args, **kwargs):
     """Add any additional module text."""
     if self.cfg['generate_standalone_module']:
         if self.cfg['name'] in ['OpenMPI', 'SpectrumMPI']:
             extras = ConfigureMake.make_module_extra(self, *args, **kwargs)
         elif self.cfg['name'] in ['impi']:
             extras = EB_impi.make_module_extra(self, *args, **kwargs)
         else:
             raise EasyBuildError("I don't know how to generate extra module text for %s", self.cfg['name'])
         # include environment variables defined for MPI implementation
         for key, val in sorted(self.mpi_env_vars.items()):
             extras += self.module_generator.set_environment(key, val)
         self.log.debug("make_module_extra added this: %s" % extras)
     else:
         extras = super(SystemMPI, self).make_module_extra(*args, **kwargs)
     return extras
Exemplo n.º 58
0
    def extra_options():
        """Custom easyconfig parameters for NWChem."""

        extra_vars = {
            'target': ["LINUX64", "Target platform", CUSTOM],
            # possible options for ARMCI_NETWORK on LINUX64 with Infiniband:
            # OPENIB, MPI-MT, MPI-SPAWN, MELLANOX
            'armci_network': ["OPENIB", "Network protocol to use", CUSTOM],
            'msg_comms': ["MPI", "Type of message communication", CUSTOM],
            'modules': ["all", "NWChem modules to build", CUSTOM],
            'lib_defines': ["", "Additional defines for C preprocessor", CUSTOM],
            'tests': [True, "Run example test cases", CUSTOM],
            # lots of tests fail, so allow a certain fail ratio
            'max_fail_ratio': [0.5, "Maximum test case fail ratio", CUSTOM],
        }
        return ConfigureMake.extra_options(extra_vars)
Exemplo n.º 59
0
    def extra_options():
        extra_vars = {
            'check_qtwebengine':
            [False, "Make sure QtWebEngine components is installed", CUSTOM],
            'disable_advanced_kernel_features':
            [False, "Disable features that require a kernel > 3.15", CUSTOM],
            'platform': [
                None,
                "Target platform to build for (e.g. linux-g++-64, linux-icc-64)",
                CUSTOM
            ],
        }
        extra_vars = ConfigureMake.extra_options(extra_vars)

        # allowing to specify prefix_opt doesn't make sense for Qt, since -prefix is hardcoded in configure_step
        del extra_vars['prefix_opt']

        return extra_vars
Exemplo n.º 60
0
 def extra_options():
     extra_vars = {
         'clooguseisl': [False, "Use ISL with CLooG or not", CUSTOM],
         'generic': [None, "Build GCC and support libraries such that it runs on all processors of the target "
                           "architecture (use False to enforce non-generic regardless of configuration)", CUSTOM],
         'languages': [[], "List of languages to build GCC for (--enable-languages)", CUSTOM],
         'multilib': [False, "Build multilib gcc (both i386 and x86_64)", CUSTOM],
         'pplwatchdog': [False, "Enable PPL watchdog", CUSTOM],
         'prefer_lib_subdir': [False, "Configure GCC to prefer 'lib' subdirs over 'lib64' when linking", CUSTOM],
         'profiled': [False, "Bootstrap GCC with profile-guided optimizations", CUSTOM],
         'use_gold_linker': [True, "Configure GCC to use GOLD as default linker", CUSTOM],
         'withcloog': [False, "Build GCC with CLooG support", CUSTOM],
         'withisl': [False, "Build GCC with ISL support", CUSTOM],
         'withlibiberty': [False, "Enable installing of libiberty", CUSTOM],
         'withlto': [True, "Enable LTO support", CUSTOM],
         'withppl': [False, "Build GCC with PPL support", CUSTOM],
     }
     return ConfigureMake.extra_options(extra_vars)