[lug] Reverse LD_PRELOAD?

stimits at comcast.net stimits at comcast.net
Mon Jul 9 14:47:47 MDT 2018


Various multimedia programs routinely check for GPU rendering capabilities. Sometimes they are with OpenCL for AMD video cards, sometimes this is for CUDA for NVIDIA video cards. If it finds the capability, then it uses the first one it runs into. If not, it reverts to CPU. So some applications do not consider this an error, they just use different hardware in that case. In my case I have older and newer versions of libraries, and I'm interested in comparing results with different GPU interfaces.
 
Currently I'm doing something like what Zan Lynx noted in his reply. It just seems like perhaps there is some trick I don't know about to make this more elegant. Plus I sometimes have versions compiled with different compilers (ranging from gcc4 through gcc7) and am curious how they differ.
 
----- Original Message -----From: Davide Del Vento <davide.del.vento at gmail.com>To: Boulder (Colorado) Linux Users Group -- General Mailing List <lug at lug.boulder.co.us>Sent: Mon, 09 Jul 2018 20:40:21 -0000 (UTC)Subject: Re: [lug] Reverse LD_PRELOAD?

Never load would not make any sense. If your application is linkedagainst it (or loads it with dlopen), it needs it. If it does not needit, it's a bug in your application.If it does need it, but you have another version that you want to use,either use LD_PRELOAD and/or LD_LIBRARY_PATH and/or RPATH.

On Mon, Jul 9, 2018 at 2:32 PM, <stimits at comcast.net> wrote:> Hi,>> I just thinking perhaps there is some simple trick to avoid or blacklist a> library for just a single application for testing in a way similar to using> LD_PRELOAD to force a given library path. So for example I have an OpenCL> library and although I do not want to remove the file for the rest of the> system I'd to do something similar to:> LD_NEVER_LOAD=/lib64/libOpenCL.so.1.0.0 ./my_application>> Anyone here know of a convenient method to do this for just this one> application?>> _______________________________________________> Web Page: http://lug.boulder.co.us> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety_______________________________________________Web Page: http://lug.boulder.co.usMailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lugJoin us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180709/17d0a37d/attachment.html>


More information about the LUG mailing list