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

FAudio.pc not good enough for gstreamer enabled build #235

Closed
j-r opened this issue Jan 8, 2021 · 7 comments
Closed

FAudio.pc not good enough for gstreamer enabled build #235

j-r opened this issue Jan 8, 2021 · 7 comments

Comments

@j-r
Copy link

j-r commented Jan 8, 2021

In a gstreamer enabled build the resulting libFAudio.so depends on several gstreamer symbols. Therefore linking using only the information from pgk-config --libs FAudio fails with missing symbols. An easy solution is to add

Requires: gstreamer-app-1.0 gstreamer-audio-1.0

to FAudio.pc for gstreamer enabled builds, but I'm not sure whether this is the best way. Perhaps it would be better for FAudio to dlopen the backend instead of exposing this (pretty large) dependency to its clients.

@flibitijibibo
Copy link
Member

Sadly GStreamer is really weird about init/close, so dlopen may not be entirely possible to do safely (ignoring that we have to link to like 3-4 libraries on top of that):

https://github.com/FNA-XNA/FAudio/blob/master/src/FAudio_gstreamer.c#L467-L474

As far as I know the current system works for distributions as well as Proton, but I'll CC the original authors of the .pc just in case (FNA doesn't care about this file): @orbea @Gcenx

@orbea
Copy link
Contributor

orbea commented Jan 8, 2021

@j-r Do you have a test case?

@Gcenx
Copy link

Gcenx commented Jan 8, 2021

This may be correct and wouldn’t affect wine that would be pulling in gstreamer anyway.

@orbea
Copy link
Contributor

orbea commented Jan 8, 2021

I made a PR with the suggestion in the op, I don't see why not?

@j-r
Copy link
Author

j-r commented Jan 10, 2021

@j-r Do you have a test case?

My test case was wine (after patching it to actually look for the right pkg-config file; s. https://bugs.winehq.org/show_bug.cgi?id=50436). The link test in wine configure fails with a gstreamer enabled FAudio build.

@orbea
Copy link
Contributor

orbea commented Jan 10, 2021

@j-r Would you mind testing the PR? Otherwise I can try later.

@flibitijibibo
Copy link
Member

d7c84f0

rbernon pushed a commit to rbernon/FAudio that referenced this issue May 21, 2021
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

Successfully merging a pull request may close this issue.

4 participants