print('Adding ISIS version check') with mgr.create_file('libexec/constants.sh') as f: print('BAKED_ISIS_VERSION="%s"' % isis_version(ISISROOT), file=f) print('Adding libraries') print('\tAdding forced-ship libraries') # Handle the shiplist separately for copy_lib in LIB_SHIP_PREFIX: found = None for soname in mgr.deplist.keys(): if soname.startswith(copy_lib): found = soname break if found: mgr.add_library(mgr.deplist[found]) mgr.remove_deps([found]) print('\tRemoving system libs') mgr.remove_deps(LIB_SYSTEM_LIST) print('\tFinding deps in search path') mgr.resolve_deps(nocopy = [P.join(ISISROOT, 'lib'), P.join(ISISROOT, '3rdParty', 'lib')], copy = [INSTALLDIR.lib()]) if mgr.deplist: raise Exception('Failed to find some libs in any of our dirs:\n\t%s' % '\n\t'.join(mgr.deplist.keys())) print('Adding files in dist-add and docs') #XXX Don't depend on cwd for dir in 'dist-add', INSTALLDIR.doc(): if P.exists(dir):
# sys.stdout.flush() # with mgr.create_file('libexec/constants.sh') as f: # print('BAKED_ISIS_VERSION="%s"' % isis_version(ISISROOT), file=f) # print('BAKED_LIBC_VERSION="%s"' % libc_version(), file=f) # print('\tFound ISIS version %s' % isis_version(ISISROOT)) # print('\tFound GLIBC version %s' % libc_version()) print('Adding libraries') for i in range(2, 4): print('\tPass %i to get dependencies of libraries' % i) sys.stdout.flush() deplist_copy = copy.deepcopy(mgr.deplist) for lib in deplist_copy: if (P.exists(P.join(INSTALLDIR, 'lib', lib))): mgr.add_library(P.join(INSTALLDIR, 'lib', lib)) # Handle the shiplist separately. This will also add more dependencies print('\tAdding forced-ship libraries') sys.stdout.flush() found_set = set() found_and_to_be_removed = [] for copy_lib in LIB_SHIP_PREFIX: for soname in mgr.deplist.keys(): if soname.startswith(copy_lib): # Bugfix: Do an exhaustive search, as same prefix can # refer to multiple libraries, e.g., libgfortran.so.3 and # libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set: continue found_set.add(mgr.deplist[soname]) mgr.add_library(mgr.deplist[soname])
sys.stdout.flush() with mgr.create_file('libexec/constants.sh') as f: print('BAKED_ISIS_VERSION="%s"' % isis_version(ISISROOT), file=f) print('BAKED_LIBC_VERSION="%s"' % libc_version(), file=f) print('\tFound ISIS version %s' % isis_version(ISISROOT)) print('\tFound GLIBC version %s' % libc_version()) print('Adding libraries') for i in range(2,4): print('\tPass %i to get dependencies of libraries' % i) sys.stdout.flush() deplist_copy = copy.deepcopy(mgr.deplist) for lib in deplist_copy: if ( P.exists( P.join(INSTALLDIR, 'lib', lib) ) ): mgr.add_library( P.join(INSTALLDIR, 'lib', lib) ); # Handle the shiplist separately. This will also add more dependencies print('\tAdding forced-ship libraries') sys.stdout.flush() found_set = set() found_and_to_be_removed = [] for copy_lib in LIB_SHIP_PREFIX: for soname in mgr.deplist.keys(): if soname.startswith(copy_lib): # Bugfix: Do an exhaustive search, as same prefix can # refer to multiple libraries, e.g., libgfortran.so.3 and # libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set: continue found_set.add(mgr.deplist[soname]) mgr.add_library(mgr.deplist[soname])
print('\tFound GLIBC version %s' % libc_version()) print('Adding libraries') for i in range(2, 4): print('\tPass %i to get dependencies of libraries' % i) sys.stdout.flush() deplist_copy = copy.deepcopy(mgr.deplist) # Force the use of these files for lib in MANUAL_LIBS: deplist_copy[lib + lib_ext] = '' for lib_dir in SEARCHPATH + ['/lib64']: for lib in deplist_copy: lib_path = P.join(lib_dir, lib) if P.exists(lib_path): mgr.add_library(lib_path) continue # Handle the shiplist separately. This will also add more dependencies print('\tAdding forced-ship libraries') sys.stdout.flush() found_set = set() found_and_to_be_removed = [] for copy_lib in LIB_SHIP_PREFIX: mgr_keys = mgr.deplist.copy().keys() # make a copy of the keys for soname in mgr_keys: if soname.startswith(copy_lib): # Bugfix: Do an exhaustive search, as same prefix can # refer to multiple libraries, e.g., libgfortran.so.3 and # libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set:
print('\tFound GLIBC version %s' % libc_version()) print('Adding libraries') for i in range(2,4): print('\tPass %i to get dependencies of libraries' % i) sys.stdout.flush() deplist_copy = copy.deepcopy(mgr.deplist) for lib in MANUAL_LIBS: # Force the use of these files deplist_copy['lib' + lib + lib_ext] = '' for lib in deplist_copy: lib_path = P.join(INSTALLDIR, 'lib', lib) if P.exists(lib_path): mgr.add_library(lib_path) # Handle the shiplist separately. This will also add more dependencies print('\tAdding forced-ship libraries') sys.stdout.flush() found_set = set() found_and_to_be_removed = [] for copy_lib in LIB_SHIP_PREFIX: for soname in mgr.deplist.keys(): if soname.startswith(copy_lib): # Bugfix: Do an exhaustive search, as same prefix can # refer to multiple libraries, e.g., libgfortran.so.3 and # libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set: continue found_set.add(mgr.deplist[soname])
# sys.stdout.flush() # with mgr.create_file('libexec/constants.sh') as f: # print('BAKED_ISIS_VERSION="%s"' % isis_version(ISISROOT), file=f) # print('BAKED_LIBC_VERSION="%s"' % libc_version(), file=f) # print('\tFound ISIS version %s' % isis_version(ISISROOT)) # print('\tFound GLIBC version %s' % libc_version()) print("Adding libraries") for i in range(2, 4): print("\tPass %i to get dependencies of libraries" % i) sys.stdout.flush() deplist_copy = copy.deepcopy(mgr.deplist) for lib in deplist_copy: if P.exists(P.join(INSTALLDIR, "lib", lib)): mgr.add_library(P.join(INSTALLDIR, "lib", lib)) # Handle the shiplist separately. This will also add more dependencies print("\tAdding forced-ship libraries") sys.stdout.flush() found_set = set() found_and_to_be_removed = [] for copy_lib in LIB_SHIP_PREFIX: for soname in mgr.deplist.keys(): if soname.startswith(copy_lib): # Bugfix: Do an exhaustive search, as same prefix can # refer to multiple libraries, e.g., libgfortran.so.3 and # libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set: continue found_set.add(mgr.deplist[soname])
print('\tFound GLIBC version %s' % libc_version()) print('Adding libraries') for i in range(2, 4): print('\tPass %i to get dependencies of libraries' % i) sys.stdout.flush() deplist_copy = copy.deepcopy(mgr.deplist) for lib in MANUAL_LIBS: # Force the use of these files deplist_copy['lib' + lib + lib_ext] = '' for lib in deplist_copy: lib_path = P.join(INSTALLDIR, 'lib', lib) if P.exists(lib_path): mgr.add_library(lib_path) # Handle the shiplist separately. This will also add more dependencies print('\tAdding forced-ship libraries') sys.stdout.flush() found_set = set() found_and_to_be_removed = [] for copy_lib in LIB_SHIP_PREFIX: for soname in mgr.deplist.keys(): if soname.startswith(copy_lib): # Bugfix: Do an exhaustive search, as same prefix can # refer to multiple libraries, e.g., libgfortran.so.3 and # libgfortran.so.1, and sometimes the wrong one is picked. if mgr.deplist[soname] in found_set: continue found_set.add(mgr.deplist[soname])