Open pjaaskel opened 5 years ago
Reported here: https://savannah.gnu.org/support/index.php?109844
This is an annoying issue as it also makes an installed libtce.so found even when running from the build tree.
Yep this fix breaks build tree execution. A better fix should be found.
This problem is still unsolved. I forgot about it and got interesting problems as I had an libopenasip.so installed which linked to LLVM-14 and it got loaded first by the unit tests as I had that library's path in my LD_LIBRARY_PATH.
Linkage fails with Ubuntu 18.04 LTS when running the tools from build directories and having the updates repository enabled:
This is because Ubuntu 18.04 generates an illegal libtool wrapper script which overrides the user set LD_LIBRARY_PATH by prepending the system library path, thus loading the libLLVM8.so required by libqt, (indirectly) by libwxgtk etc. while the user would like to use the TCE-patched one installed in the home directory.
A workaround is to force load the custom libLLVM via LD_PRELOAD. This is of course nice since it induces the libLLVM-8.so load time to all ld.so invocations (basically all commands). But it's needed only when running the tools from the build dir.
E.g.
Another workaround would be to make TCE use libLLVM-8.0.1.so or similar since Ubuntu 18.04 does not ship that (yet), thus we'd link to the TCE patched one.
The true issue here is the libtoolize bug that overrides user LD_LIBRARY_PATH, hopefully it will be fixed in the future. We should report it if it's not (TODO).