[PD] External libraries not found via declare object or startup flags (pd 0.47.1, linux)
IOhannes m zmölnig
zmoelnig at iem.at
Thu Aug 11 00:10:21 CEST 2016
On 08/10/2016 10:39 PM, Angelo Arcadi wrote:
> Dear Iohannes, list,
> first of all I noticed that in my previous message I
> wrote /usr/lib/extra while instead I was loading
> /usr/lib/pd/extra of course.
>
> Secondly, I enabled the verbose option as Iohannes suggested and I
> noticed the following:
>
> 1- creating the objects "declare -stdpath cyclone" or "declare -path
> cyclone" does not work, one
> need to create the objects "declare -sdtpath /usr/lib/pd/extra/cyclone"
> or "declare -path /usr/lib/pd/extra/cyclone".
there seems to be indeed a bug here:
- [declare -path] adds the new path *only* to the current directory.
- [declare -stdpath] tries adding the new path *only* to the
standard-paths (those searched without you passing '-path' on the cmdline).
since you must add "-path /usr/lib/pd/extra" to Pd's search-paths
somewhere, there is currently no way to tell Pd to also use this path :-(
like always, the fix should be simple: but first it needs to be decided
what the desired behaviour should actually be...
>
> Any suggestion?
>
here's a workaround for now:
TL;DR: use [declare -path cyclone -stdpath cyclone -lib cyclone]
together with "libdir".
"libdir" is a library-loader object that loads directories-as-libraries
if they conform to the libdir format (like cyclone; generally all the
libraries that have a <libraryname>-meta.pd patch).
- add '/usr/lib/pd/extra' to your general search paths (in Pd's preferences)
- add 'libdir' to the automatically loaded libraries (in Pd's
preferences) - pd-libdir is available via apt.
this will work, because the libdir library will install itself into
/usr/lib/pd/extra/libdir/libdir.pd_linux, and when loading "libdir", Pd
will search (among other things) for libdir/libdir.pd_linux in (among
other paths) /usr/lib/pd/extra/
- use [declare -path cyclone -stdpath cyclone -lib cyclone] to declare
the dependency on cyclone.
the "-path" and "-stdpath" portions are unused in your setup (but might
work for people with more straight-forward setups).
the "-lib" portion will trigger the libdir loading mechanis, which will
search all the paths (among them /usr/lib/pd/extra/) for
cyclone/cyclone-meta.pd, and will eventually find it as
/usr/lib/pd/extra/cyclone/cyclone-meta.pd - and then it will add
/usr/lib/pd/extra/cyclone/ to the (canvas-local) search path.
i know that [declare -path cyclone -stdpath cyclone -lib cyclone] looks
like a joke (while you are there, add "-stdlib cyclone" as well, that
should be fool-proof)
fmasdr
IOhannes
More information about the Pd-list
mailing list