반응형

$ ldd ./interproscan-5.20-59.0/bin/sfld/sfld_preprocess 

./interproscan-5.20-59.0/bin/sfld/sfld_preprocess: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./interproscan-5.20-59.0/bin/sfld/sfld_preprocess)

linux-vdso.so.1 =>  (0x00007fff33380000)

libm.so.6 => /lib64/libm.so.6 (0x00000039fbe00000)

libc.so.6 => /lib64/libc.so.6 (0x00000039fb200000)

/lib64/ld-linux-x86-64.so.2 (0x00000039fae00000)


$ ldd /usr/java/latest/bin/java

linux-vdso.so.1 =>  (0x00007fffbaab0000)

libpthread.so.0 => /lib64/libpthread.so.0 (0x00000039fba00000)

libjli.so => /usr/java/latest/bin/../lib/amd64/jli/libjli.so (0x00007fa057508000)

libdl.so.2 => /lib64/libdl.so.2 (0x00000039fb600000)

libc.so.6 => /lib64/libc.so.6 (0x00000039fb200000)

/lib64/ld-linux-x86-64.so.2 (0x00000039fae00000)


$ ./interproscan-5.20-59.0/bin/sfld/sfld_preprocess

./interproscan-5.20-59.0/bin/sfld/sfld_preprocess: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./interproscan-5.20-59.0/bin/sfld/sfld_preprocess)


$ java -version

java version "1.8.0_73"

Java(TM) SE Runtime Environment (build 1.8.0_73-b02)

Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)


아래와 같이 LD_LIBRARY_PATH에 /BiO/apps/glibc-2.14/lib의 모든 라이브러리를 설정하게 되면 libc.so.6뿐만 아니라 libdl.so.2, libdl.so.2도 라이브러리를 로딩하여 자바가 실행이 안되는 경우가 발생한다.

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/BiO/apps/glibc-2.14/lib/


특정 라이브러리(libc.so.6)만 프로세스 실행 중 전역으로 로딩하려면 아래와 같이 설정해 주면된다.

$ export LD_PRELOAD='/BiO/apps/glibc-2.14/lib/libc.so.6'


$ ldd ./interproscan-5.20-59.0/bin/sfld/sfld_preprocess 

linux-vdso.so.1 =>  (0x00007fff09e00000)

/BiO/apps/glibc-2.14/lib/libc.so.6 (0x00007fc642070000)

libm.so.6 => /lib64/libm.so.6 (0x00000039fbe00000)

/lib64/ld-linux-x86-64.so.2 (0x00000039fae00000)


$ ldd /usr/java/latest/bin/java

linux-vdso.so.1 =>  (0x00007ffff1400000)

/BiO/apps/glibc-2.14/lib/libc.so.6 (0x00007fa02f050000)

libpthread.so.0 => /lib64/libpthread.so.0 (0x00000039fba00000)

libjli.so => /usr/java/latest/bin/../lib/amd64/jli/libjli.so (0x00007fa02ee20000)

libdl.so.2 => /lib64/libdl.so.2 (0x00000039fb600000)

/lib64/ld-linux-x86-64.so.2 (0x00000039fae00000)


$ java -version

java version "1.8.0_73"

Java(TM) SE Runtime Environment (build 1.8.0_73-b02)

Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)


$ ./interproscan-5.20-59.0/bin/sfld/sfld_preprocess

Pre-process SFLD alignments/HMMs

Usage ./interproscan-5.20-59.0/bin/sfld/sfld_preprocess: options:

--onlymatches | -m         only print the sequences that match the HMM and pass the SFLD residue post-processing (otherwise print all)

--hmmbuild    | -H         force building of hmm even if it exists

--nosearch    | -S         don't run search if output files exist

--hmmerpath   | -p PATH    path to hmm* binaries (overrides $HMMER_PATH)

--hmm         | -r FILE    HMM file (input)

--sites       | -s FILE    sites file (output)

--alignments  | -a FILE    alignments file (input)

--hmm_dir     | -d DIR     SFLD HMM directory (overrides $SFLD_LIB_DIR)




※ 전역이 아닌 특정 프로그램 실행 시에만 적용 할 때

$ LD_PRELOAD='/BiO/apps/glibc-2.14/lib/libc.so.6' /BiO/scratch/eriteam/njkoo/programs/interproscan/interproscan-5.20-59.0/bin/sfld/sfld_preprocess


※ 다른 방법들

1. 바이너리를 빌드할 때 glibc 위치를 지정 해 주는 방법

=> g++ main.o -o myapp ... \

   -Wl,--rpath=/path/to/newglibc \

   -Wl,--dynamic-linker=/path/to/newglibc/ld-linux.so.2


2. 소스를 재빌드하기 어려울 경우 바이너리를 패치하는 방법이 있다.

=> http://nixos.org/patchelf.html

반응형
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기