hi list,
I have a question for LD_PRELOAD.
To load leapmotion.pd_linux, i have to run pd with LD_PRELOAD.
for example: $ LD_PRELOAD=libLeap.so puredata my-patch.pd
Is there a way to load linux binary without LD_PRELOAD? For example [import], or startup flag or something else. I wanna load the .so library after pd starts up.
On Mac OS X this LD_PRELOAD not needed. If I just type [leapmotion] then it just works. I like it.
I'm looking for the alternative way, but not found.
Any suggest?
Thanks, akntk
leapmotion for pd link: https://github.com/chikashimiyama/Pd_leapmotion
FYI, leapmotion.pd_linux compiled with flext(c++).
On Sun, Jan 11, 2015 at 5:47 AM, Jonghyun Kim agitato816@gmail.com wrote:
hi list,
I have a question for LD_PRELOAD.
To load leapmotion.pd_linux, i have to run pd with LD_PRELOAD.
for example: $ LD_PRELOAD=libLeap.so puredata my-patch.pd
Is there a way to load linux binary without LD_PRELOAD? For example [import], or startup flag or something else. I wanna load the .so library after pd starts up.
On Mac OS X this LD_PRELOAD not needed. If I just type [leapmotion] then it just works. I like it.
I'm looking for the alternative way, but not found.
Any suggest?
Thanks, akntk
leapmotion for pd link: https://github.com/chikashimiyama/Pd_leapmotion
On 01/10/15 22:07, Jonghyun Kim wrote:
FYI, leapmotion.pd_linux compiled with flext(c++).
disclaimer: this is only general advice, i don't have a leapmotion nor ever used the external in question.
if you do $ ldd leapmotion.pd_linux | grep -i leap you should see a line containing "libLeap.so"
you can see that it is not found properly, if the above cmdline gives you something like: libLeap.so => not found
there are two ways to fix this:
path where libLeap.so is liven before starting Pd (this is a hack; if possible do not use it; it's also very similar to what you already have)
linker (e.g. /usr/local/lib)
the second one is obviously preferred. if - for whatever reasons - you want to keep using an evnironment variable, you could create a wrapper script, that you run instead of the actual Pd-binary, and which set's up the envvar: #!/bin/sh LD_LIBRARY_PATH=/path/to/my/leap-library/ /usr/bin/pd $@
if your actual Pd-binary is /usr/bin/pd (as installed by the Debian packages, e.g. on ubuntu), you could even call this script "pd" and put it into "/usr/local/bin" (requires root). if you then type "pd" on the cmdline, it will call the script from /usr/local which in turn calls the binary in /usr/bin...
gfmds IOhannes
Thanks for your kindness, IOhannes. I'm still trying on it. I'll post again when it solved.
On Sun, Jan 11, 2015 at 9:31 PM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 01/10/15 22:07, Jonghyun Kim wrote:
FYI, leapmotion.pd_linux compiled with flext(c++).
disclaimer: this is only general advice, i don't have a leapmotion nor ever used the external in question.
- properly link leapmotion.pd_linux against libLeap.so
if you do $ ldd leapmotion.pd_linux | grep -i leap you should see a line containing "libLeap.so"
- make sure that the libLeap.so library can be found by the runtime linker.
you can see that it is not found properly, if the above cmdline gives you something like: libLeap.so => not found
there are two ways to fix this:
- either use the environment variable LD_LIBRARY_PATH to point to the
path where libLeap.so is liven before starting Pd (this is a hack; if possible do not use it; it's also very similar to what you already have)
- install libLeap.so into a place that is searched automatically by your
linker (e.g. /usr/local/lib)
the second one is obviously preferred. if - for whatever reasons - you want to keep using an evnironment variable, you could create a wrapper script, that you run instead of the actual Pd-binary, and which set's up the envvar: #!/bin/sh LD_LIBRARY_PATH=/path/to/my/leap-library/ /usr/bin/pd $@
if your actual Pd-binary is /usr/bin/pd (as installed by the Debian packages, e.g. on ubuntu), you could even call this script "pd" and put it into "/usr/local/bin" (requires root). if you then type "pd" on the cmdline, it will call the script from /usr/local which in turn calls the binary in /usr/bin...
gfmds IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list