-
Notifications
You must be signed in to change notification settings - Fork 244
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
Fluidsynth.pc doesn't include static libraries #904
Comments
Sorry, it took a bit longer. But a PR is ready now. Feel free to test. CMake 3.12 or newer is required. |
Test case: I compiled fluidsynth with the following parameters (this is the minimum set my project needs).
For reference: this is what my project needs to link statically against fluidsynth (obtained by trial and error, there could be something missing or not necessary at all):
And this is what
The linking then failed with some undefined references, as expected. You probably need to include required libraries of libraries used by fluidsynth (such as gomp for glib if I am not mistaken).
|
Thanks for testing.
I don't think so:
"needed for static linking" means any symbol that fluidsynth itself uses from other libraries, or in other words all the libs that fluidsynth uses directly should be included. But not the dependencies of the dependencies of the dependencies... In your case, you're using a static libintl (i.e. one of glibs dependencies), so I think you would also need to include However, I do agree that openMP should be among the private libs. In my case it's working as expected:
To investigate: I've committed some debug prints to the CMake configure output. Can you please run CMake and post the output? |
I understand, that makes sense. Here's the CMake output https://gist.github.com/Roboron3042/fc7fbeb8c7caaea2227b41598060ae36 |
Unfortunately, the few debug lines are missing. Have you pulled the branch again? |
Sorry, I messed up and instead of changing to the remote branch I created a local branch 😅
|
I cannot reproduce the missing libgomp. Even with cmake 3.20.5, an absolute path to libgomp is always included in the .pc file and |
FluidSynth version
Any.
Describe the bug
A static version of FluidSynth does not include the statically linked libraries in the fluidsynth.pc file.
Expected behavior
Executing
pkg-config --libs --static fluidsynth
returns the list of static libraries (depending on which libraries have been used). Instead, currently only "-lfluidsynth" is returned.Steps to reproduce
Build FluidSynth with CMake option -DBUILD_SHARED_LIBS=OFF
Additional context
Related issues with suggested solutions
To sum up: the Libs.private section of fluidsynth.pc.in needs to be set to a CMake variable containing all the libraries used for static linking.
The text was updated successfully, but these errors were encountered: