<html>
<head>
<base href="https://bugs.llvm.org/">
</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 handles system librabry paths before LIBRARY_PATH"
href="https://bugs.llvm.org/show_bug.cgi?id=51013">51013</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang handles system librabry paths before LIBRARY_PATH
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>marius.messerschmidt@googlemail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>When I try to link to a library that exists in both /usr/lib/ and a custom
location specified in the LIBRARY_PATH environment variable, clang always
chooses the system library (which causes linker errors as the system version is
to old and the headers from C_INCLUDE_PATH where choosen).
Other librabries, that do not exist in the system directories are found from
LIBRARY_PATH.
When building with GCC, the entries in LIBRARY_PATH are prefered over the
system libraries.
This is possibly related to <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - `clang -print-file-name` doesn't respect LIBRARY_PATH"
href="show_bug.cgi?id=23877">https://bugs.llvm.org/show_bug.cgi?id=23877</a>, but
the linker-step is affected as well.
I have also seen this bug report <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - LIBRARY_PATH precedence"
href="show_bug.cgi?id=16786">https://bugs.llvm.org/show_bug.cgi?id=16786</a>
which seems to be fixed. However the issue does also happen with a custom-build
"clang 11.1.0"</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>