<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/82647>82647</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[LLVM] [cmake] soname change in commit #91a3846 breaks building mesa trunk against llvm trunk
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
LW-archlinux
</td>
</tr>
</table>
<pre>
In commit 91a384621e5b762d9c173ffd247cfeadd5f436a2 `libLLVM-19.so` was renamed to `libLLVM.so.19.0` .
A symlink from `libLLVM-19.so `to `libLLVM.so` was introduced for compatibility with old library name.
This breaks the build of mesa trunk against llvm trunk on archlinux with this error : `/usr/bin/ld: /usr/lib/../lib/libLLVM.so.19.0: error adding symbols: DSO missing from command line`
In https://gitlab.freedesktop.org/mesa/mesa/-/issues/10644 it was suggested a broken symlink could be the cause.
I checked and realised the breakl occurs because on archlinux libLLVM.so is only present in the official llvm-libs package from [extra] repo. Older llvm versions and AUR llvm builds use versioned symlinks / sonames (most common case) or conflict with repo llvm .
The llvm trunk pacakge I build mesa against does the former.
Manually changing the symlink to the new soname directly solves the build failure for mesa trunk.
While archlinux & related distros may be the only ones using that specific method to allow multiple llvm versions to coexist, symlinking indirectly through libLLVM.so seems an unnecessary step for linkers and prone to failure.
Please change the compatibility symlink to directly link to the new soname library.
Lone_Wolf
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VU1vqzgU_TXO5qoIHELCIot0qkiV-vRG89XlyNgX8MTYyNe0zb8f2SEp6dN7GyA39v045_hYEOnOIu7Z5pFtnlZiCr3z-5fXB-Flb7SdPlaNU-f9swXphkEHqAux3pUVL3DTbCuualls122reLmVLQqlNm25rgQHVuVGNy8v_3x7KOqMHKtyeBcEHq0YUEFwiyUZuayoszwuylj-xPLD5XkAOg9G2xO03g0_JI2Br4muhbQN3qlJooLW-dj_KIJutNHhDO869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