Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin prefix not great #19

Open
Artoria2e5 opened this issue Aug 10, 2023 · 1 comment
Open

Plugin prefix not great #19

Artoria2e5 opened this issue Aug 10, 2023 · 1 comment

Comments

@Artoria2e5
Copy link

The plugin path is currently hardcoded to be $PREFIX/lib/gstreamer-1.0. This is not great in a number of cases:

  • When gstreamer and gstpeaq are in different prefixes. When trying out a package, I tend to put it in /usr/local, which is not where gstreamer is (/usr).
  • When gestreamer has a multilib plugin path. On Debian, the actual plugin path is /lib/x86_64-linux-gnu/gstreamer-1.0/.

There are two ways to work around that:

  • The system-wide way is to find the real plugin dir with pkg-config --variable=pluginsdir gstreamer-1.0.
  • The user-level way is to drop the thing in ~/.local/share/gstreamer-1.0/plugins. I actually made it a symlink to /usr/local/lib/gstreamer-1.0, which works well so far.
@martinholters
Copy link
Member

Hm, yeah, that is not great. I'm using
https://github.com/GStreamer/common/blob/52adcdb89a9eb527df38c569539d95c1c7aeda6e/m4/gst-plugindir.m4 (copied in verbatim to https://github.com/HSU-ANT/gstpeaq/blob/0b9315ecdaac6440db757eed8eabfa0cfc7dfd8e/m4/gst-plugindir.m4) which I hoped would do the right thing. OTOH, it's not entirely clear that with the prefix being e.g. /usr/local, the user would really likes to have anything installed outside of it. I'm not sure what the best behavior is here, but tend to keep it as is, where if you want to install most of gstpeaq in /usr/local, but the plugin somewhere else, you need to supply libdir, e.g. ./configure --libdir=/lib/x86_64-linux-gnu . This is already mentioned in the docs:

gstpeaq/INSTALL

Lines 16 to 20 in 0b9315e

* Install in the proper location by specifying --libdir (or --exec-prefix or
--prefix) when invoking configure. Assuming a standard GStreamer
installation, any of --libdir=/usr/lib, --exec-prefix=/usr, or --prefix=/usr
should work, differing in where the peaq executable and the documentation are
stored.

But also mentioning --libdir=$(dirname $(pkg-config --variable=pluginsdir gstreamer-1.0)) there could be helpful, thanks for bringing it up.

It might also be a good idea to check whether the plugin installation path is something where Gstreamer will look and print a warning otherwise, either during configure or make. Not everyone reads the docs first, after all...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants