ih4cku / blog

deprecated, Git issues are great for writing blogs :)
2 stars 0 forks source link

lib search path #88

Open ih4cku opened 8 years ago

ih4cku commented 8 years ago

linker

ldconfig -v 2>/dev/null | grep -v ^$'\t'
/usr/lib/x86_64-linux-gnu/libfakeroot:
/lib/i386-linux-gnu:
/usr/lib/i386-linux-gnu:
/usr/local/lib:
/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu/mesa-egl:
/usr/lib/x86_64-linux-gnu/mesa:
/lib32:
/usr/lib32:
/libx32:
/usr/libx32:
/lib:
/usr/lib:
ih4cku commented 8 years ago

pkg-config

man page says

On most systems, pkg-config looks in

  • /usr/lib/pkgconfig
  • /usr/share/pkgconfig
  • /usr/local/lib/pkgconfig
  • /usr/local/share/pkgconfig

for these files. It will additionally look in the colon-separated (on Windows, semicolon-separated) list of directories specified by the PKG_CONFIG_PATH environment variable.

ih4cku commented 8 years ago

gcc

gcc -print-search-dirs | sed 's/:/\n/g'
libraries=
/usr/lib/gcc/x86_64-linux-gnu/4.8/
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/4.8/
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/lib/../lib/
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/4.8/
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/
/lib/x86_64-linux-gnu/4.8/
/lib/x86_64-linux-gnu/
/lib/../lib/
/usr/lib/x86_64-linux-gnu/4.8/
/usr/lib/x86_64-linux-gnu/
/usr/lib/../lib/
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/lib/
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../
/lib/
/usr/lib/
ih4cku commented 8 years ago

CMake

<prefix>/(lib/<arch>|lib|share)/cmake/<name>*/          (U)
<prefix>/(lib/<arch>|lib|share)/<name>*/                (U)
<prefix>/(lib/<arch>|lib|share)/<name>*/(cmake|CMake)/  (U)