Re: [LAD] question on dynamic linking

From: Stefano D'Angelo <zanga.mail@email-addr-hidden>
Date: Thu Sep 27 2007 - 19:02:09 EEST

2007/9/27, nescivi <nescivi@email-addr-hidden>:
> Hiho,
>
> I am having a discussion on the supercollider front about what is the proper
> way for dynamic linking.
>
> as far as I know, you use ldconfig and have the library location that programs
> dynamically link to defined in /etc/ld.so.conf
>
> but what is supposed to happen if the user just installs the program to a
> directory in his home directory?
> how should the dynamic linking be defined?
>
> esp. if the user does not have the root rights to change anything
> in /etc/ld.so.conf or to run ldconfig.
>
> I did not find anything quick on the net about this, so maybe one of you can
> enlighten me what is the "proper" way of dealing with this.

http://www.opengroup.org/onlinepubs/009695399/functions/dlopen.html

"The file argument is used to construct a pathname to the object file.
If file contains a slash character, the file argument is used as the
pathname for the file. Otherwise, file is used in an
implementation-defined manner to yield a pathname."

As you can see one can specify the full path to dlopen(), so I think
it would be good that the app handles this properly.

I think that a program should look for plugins in:
o LIBDIR/<app_name>/<whatever> (*)
o ~/.<app_name>/<whatever>

* IIRC, there's also an Automake default directory variable returning
LIBDIR/<app_name>.

Stefano
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Thu Sep 27 20:15:02 2007

This archive was generated by hypermail 2.1.8 : Thu Sep 27 2007 - 20:15:02 EEST