--- util.py.orig 2021-01-30 17:30:09.701687644 +0100 +++ util.py 2021-01-30 17:22:53.074901149 +0100 @@ -238,6 +238,13 @@ else: args = ('/usr/bin/crle',) + if 'LD_CONFIG' in env: + args = args + ('-c', env['LD_CONFIG']) + elif not is64 and 'LD_CONFIG_32' in env: + args = args + ('-c', env['LD_CONFIG_32']) + elif is64 and 'LD_CONFIG_64' in env: + args = args + ('-c', env['LD_CONFIG_64']) + paths = None try: proc = subprocess.Popen(args, @@ -249,8 +256,15 @@ with proc: for line in proc.stdout: line = line.strip() - if line.startswith(b'Default Library Path (ELF):'): - paths = os.fsdecode(line).split()[4] + if line.startswith(b'Default Library Path'): + if b'(ELF):' in line: + paths = os.fsdecode(line).split()[4] + # 11.4 + else: + paths = os.fsdecode(line).split()[3] + # add LD_LIBRARY_PATH + if paths and 'LD_LIBRARY_PATH' in env: + paths += ':' + env['LD_LIBRARY_PATH'] if not paths: return None @@ -262,7 +276,7 @@ return None - def find_library(name, is64 = False): + def find_library(name, is64=False): return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) else: @@ -344,6 +358,7 @@ print(find_library("m")) print(find_library("c")) print(find_library("bz2")) + print(find_library("x264")) # load if sys.platform == "darwin":