<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW " title="NEW --- - `clang -print-file-name` doesn't respect LIBRARY_PATH" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23877&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=1yw53bykkeXq1dmGX0aUznAqWNlt09QCzp-njk9kPt0&s=1qV3Q2u05CMDf1M9UwXjAeVKEYT2EmTO0NW2-Y1R_Fw&e=">23877</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>`clang -print-file-name` doesn't respect LIBRARY_PATH
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.6
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jvp4846@g.rit.edu
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Unlike GCC, clang ignores LIBRARY_PATH when looking up a library via
`-print-file-name`, but it *does* consult LIBRARY_PATH when actually linking:
jim@huginn ~
$ LIBRARY_PATH=$HOME/lib gcc -print-file-name=libboost_iostreams.so
/home/jim/lib/../lib/libboost_iostreams.so
jim@huginn ~
$ LIBRARY_PATH=$HOME/lib clang-3.6 -print-file-name=libboost_iostreams.so
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.1.0/../../../x86_64-linux-gnu/libboost_iostreams.so
jim@huginn ~
$ LIBRARY_PATH=$HOME/lib clang-3.6 -shared -olibfoo.so -lboost_iostreams
jim@huginn ~
$ ldd libfoo.so
linux-vdso.so.1 => (0x00007fff5c5fe000)
libboost_iostreams.so.1.55.0 =>
/home/jim/lib/libboost_iostreams.so.1.55.0 (0x00007f2d2cb3f000)
...
jim@huginn ~
$ clang-3.6 --version
Ubuntu clang version 3.6.2-svn239700-1~exp1 (branches/release_36) (based on
LLVM 3.6.2)
Target: x86_64-pc-linux-gnu
Thread model: posix</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>