1 minute read

paper link artifact link

error while loading shared libraries

OSDI`24에 발표된 Identifying On-/Off-CPU Bottlenecks Together with Blocked Samples 에 발표된 bperf를 사용하기 위해 artifacts로 제공된 custom RocksDB를 사용하려고 했는데,

./db_bench: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

해당 오류가 발생해서 찾아보던 중, 제공된 README.md에

$ sudo cp /lib/x86_64-linux-gnu/libnuma.so.1 /usr/local/lib/glibc-testing/lib

이런 식으로 shared library를 추가하는게 있어서 /lib/x86_64-linux-gnu/ 에 있는 libstdc++.so.6을 추가했더니,

./db_bench: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory

비슷한 오류가 발생했습니다.

그래서 동일한 경로에 있는 libgcc_s.so.1도 추가했더니 정상적으로 실행됬습니다.

결국:

$ sudo cp /lib/x86_64-linux-gnu/libstdc++.so.6 /usr/local/lib/glibc-testing/lib

$ sudo cp /lib/x86_64-linux-gnu/libgcc_s.so.1 /usr/local/lib/glibc-testing/lib

명령을 사용하면 잘 작동하는것 같습니다. 제 우분투 서버 문제인지 누락되어 있었던건지는 잘 모르겠네요.

update: 2025-01-10

BCOZ를 컴파일 하려고 했는데 위에 있던 라이브러리 복사 과정이 있더군요

$ sudo cp /usr/lib/x86_64-linux-gnu/libdwarf++.so.0 /usr/local/lib/glibc-testing/lib
$ sudo cp /usr/lib/x86_64-linux-gnu/libelf++.so.0 /usr/local/lib/glibc-testing/lib
$ sudo cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/local/lib/glibc-testing/lib
$ sudo cp /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 /usr/local/lib/glibc-testing/lib

그리고 친절하게 설명도 달아주셨는데 못봤었네요:

Note: When you compile and run your application as above, you may get an error that some shared libraries are not found, even though they exist. In this case, find the location of shared library by using $ locate and copying it to /usr/local/lib/glibc-testing/lib.

RTFM이라는 단어가 괜히 있나 싶네요 -_-

Comments