Beispiel #1
0
        # # Short version: 10.6 generates the new compact header (LD_DYLD_INFO)
        # # even when told to support 10.5 (which can't read it)
        if ver >= '10.6' and opt.osx_sdk == '10.5':
            build_env.append('LDFLAGS', '-Wl,-no_compact_linkedit')

    # if arch.osbits == 'linux32':
    #     limit_symbols = P.join(P.abspath(P.dirname(__file__)), 'glibc24.h')
    #     build_env.append('CPPFLAGS', '-include %s' % limit_symbols)

    compiler_dir = P.join(build_env['MISC_DIR'], 'mycompilers')
    if not P.exists(compiler_dir):
        os.makedirs(compiler_dir)

    # Deal with the Fortran compiler
    try:
        findfile(build_env['F77'], build_env['PATH'])
    except Exception:
        acceptable_fortran_compilers = [build_env['F77'], 'g77']
        for i in range(0, 10):
            acceptable_fortran_compilers.append("gfortran-mp-4.%s" % i)
        for compiler in acceptable_fortran_compilers:
            try:
                gfortran_path = findfile(compiler, build_env['PATH'])
                print("Found fortran at: %s" % gfortran_path)
                build_env['F77'] = compiler
                break
            except Exception:
                pass
    ver = get_prog_version(build_env['F77'])
    if ver < MIN_CC_VERSION:
        die('Expecting ' + build_env['F77'] + ' version >= ' +
Beispiel #2
0
        # # Short version: 10.6 generates the new compact header (LD_DYLD_INFO)
        # # even when told to support 10.5 (which can't read it)
        if ver >= '10.6' and opt.osx_sdk == '10.5':
            build_env.append('LDFLAGS', '-Wl,-no_compact_linkedit')

    # if arch.osbits == 'linux32':
    #     limit_symbols = P.join(P.abspath(P.dirname(__file__)), 'glibc24.h')
    #     build_env.append('CPPFLAGS', '-include %s' % limit_symbols)

    compiler_dir = P.join(build_env['MISC_DIR'], 'mycompilers')
    if not P.exists(compiler_dir):
        os.makedirs(compiler_dir)

    # Deal with the Fortran compiler
    try:
        findfile(build_env['F77'], build_env['PATH'])
    except Exception:
        acceptable_fortran_compilers = [build_env['F77'],'g77']
        for i in range(0,10):
            acceptable_fortran_compilers.append("gfortran-mp-4.%s" % i)
        for compiler in acceptable_fortran_compilers:
            try:
                gfortran_path = findfile(compiler, build_env['PATH'])
                print("Found fortran at: %s" % gfortran_path)
                build_env['F77'] = compiler
                break
            except Exception:
                pass
    ver = get_prog_version(build_env['F77'])
    if ver < MIN_CC_VERSION:
        die('Expecting ' + build_env['F77'] + ' version >= ' + str(MIN_CC_VERSION))
Beispiel #3
0
    if arch.osbits == 'linux32':
        limit_symbols = P.join(P.abspath(P.dirname(__file__)), 'glibc24.h')
        e.append('CPPFLAGS', '-include %s' % limit_symbols)

    if opt.ccache:
        compiler_dir = P.join(e['MISC_DIR'], 'mycompilers')
        new = dict(
            CC  = P.join(compiler_dir, e['CC']),
            CXX = P.join(compiler_dir, e['CXX']),
            CCACHE_DIR = P.join(opt.download_dir, 'ccache-dir'),
            CCACHE_BASEDIR = gettempdir(),
        )

        if not P.exists(compiler_dir):
            os.makedirs(compiler_dir)
        ccache_path = findfile('ccache', e['PATH'])
        subprocess.check_call(['ln', '-sf', ccache_path, new['CC']])
        subprocess.check_call(['ln', '-sf', ccache_path, new['CXX']])
        e.update(new)

    if opt.save_temps:
        e.append_many(CC_FLAGS, '-save-temps')
    else:
        e.append_many(CC_FLAGS, '-pipe')

    if len(args) == 0:
        # Were we told what isis to use?
        build = [isis_local if opt.isisroot is not None else isis]

        # Many things depend on isis 3rdparty, so do it before the rest
        build += [gsl_headers, geos_headers, superlu_headers, xercesc_headers, qt_headers, qwt_headers, cspice_headers, protobuf_headers]
Beispiel #4
0
        # Short version: 10.6 generates the new compact header (LD_DYLD_INFO)
        # even when told to support 10.5 (which can't read it)
        if version.StrictVersion(arch.dist_version) >= '10.6':
            e.append('LDFLAGS', '-Wl,-no_compact_linkedit')

    e.append_many(ALL_FLAGS, '-m%i' % arch.bits)

    if arch.osbits == 'linux32':
        limit_symbols = P.join(P.abspath(P.dirname(__file__)), 'glibc24.h')
        e.append('CPPFLAGS', '-include %s' % limit_symbols)

    compiler_dir = P.join(e['MISC_DIR'], 'mycompilers')
    if not P.exists(compiler_dir):
        os.makedirs(compiler_dir)
    try:
        gfortran_path = findfile('gfortran', e['PATH'])
        subprocess.check_call(['ln', '-sf', gfortran_path, P.join(compiler_dir, 'gfortran')])
    except Exception:
        pass
    e['F77'] = P.join(compiler_dir, 'gfortran')
    if opt.ccache:
        new = dict(
            CC  = P.join(compiler_dir, e['CC']),
            CXX = P.join(compiler_dir, e['CXX']),
            CCACHE_DIR = P.join(opt.download_dir, 'ccache-dir'),
            CCACHE_BASEDIR = gettempdir(),
        )

        ccache_path = findfile('ccache', e['PATH'])
        subprocess.check_call(['ln', '-sf', ccache_path, new['CC']])
        subprocess.check_call(['ln', '-sf', ccache_path, new['CXX']])
Beispiel #5
0
        summary(build_env)
        sys.exit(0)

    if opt.base and not opt.resume:
        print('Untarring base system')
        for base in opt.base:
            run('tar', 'xf', base, '-C', build_env['INSTALL_DIR'],
                '--strip-components', '1')
        fix_install_paths(build_env['INSTALL_DIR'], arch)

    # This must happen after untarring the base system,
    # as perhaps cache will be found there.
    if opt.ccache:

        try:
            ccache_path = findfile('ccache', build_env['PATH'])
        except:
            # If could not find ccache, build it.
            print("\n========== Building: %s ==========" % ccache.__name__)
            Package.build(ccache(build_env.copy_set_default()))
            ccache_path = findfile('ccache', build_env['PATH'])

        new = dict(
            CC=P.join(compiler_dir, build_env['CC']),
            CXX=P.join(compiler_dir, build_env['CXX']),
        )

        subprocess.check_call(['ln', '-sf', ccache_path, new['CC']])
        subprocess.check_call(['ln', '-sf', ccache_path, new['CXX']])
        build_env.update(new)
Beispiel #6
0
        info('I want to build:\n%s' % ' '.join(map(lambda x: x.__name__, build)))
        summary(build_env)
        sys.exit(0)

    if opt.base and not opt.resume:
        print('Untarring base system')
        for base in opt.base:
            run('tar', 'xf', base, '-C', build_env['INSTALL_DIR'], '--strip-components', '1')
        fix_install_paths(build_env['INSTALL_DIR'], arch)

    # This must happen after untarring the base system,
    # as perhaps cache will be found there.
    if opt.ccache:

        try:
            ccache_path = findfile('ccache', build_env['PATH'])
        except:
            # If could not find ccache, build it.
            print("\n========== Building: %s ==========" % ccache.__name__)
            Package.build(ccache(build_env.copy_set_default()))
            ccache_path = findfile('ccache', build_env['PATH'])

        new = dict(
            CC  = P.join(compiler_dir, build_env['CC']),
            CXX = P.join(compiler_dir, build_env['CXX']),
        )

        subprocess.check_call(['ln', '-sf', ccache_path, new['CC']])
        subprocess.check_call(['ln', '-sf', ccache_path, new['CXX']])
        build_env.update(new)