Sample Header Ad - 728x90

The library path of gold linker (ld.gold)

1 vote
0 answers
103 views
- How to set library search path through environment variables? (since I'm using bazel) - How to print library search path used by ld.gold (so I can check if I set it correctly) **Context:** I'm compiling a project using bazel, and the error message is: /usr/bin/ld.gold: error: cannot find -lresolv_wrapper Here is the output of ldconfig:
➜  /tmp ldconfig -p | grep resolv_wrapper
	libresolv_wrapper.so.0 (libc6,x86-64) => /home/xiaochencui/local/libresolv_wrapper/lib/libresolv_wrapper.so.0
	libresolv_wrapper.so (libc6,x86-64) => /home/xiaochencui/local/libresolv_wrapper/lib/libresolv_wrapper.so
**Note:** - I have read this page but it doesn't help: https://unix.stackexchange.com/questions/637498/ld-cant-find-library-to-link-even-though-ldconfig-v-lists-the-file - I know we can add library search path by --library-path arg, but I'm not using ld.gold directly.
Asked by Xiaochen Cui (131 rep)
Jul 7, 2024, 09:27 PM