Package Still Needed For Linux Build If Disabled In Projucer


#1

Why do you still get Package xyz not found if you disable this in the Projucer (specifically linux)? Some work. If I disable JUCE_WEB_BROWSWER then webkit is no longer needed, but others (like alsa, xinerama, etc. do not work)


#2

Certain Linux packages are required by the JUCE modules:

You can remove JUCE modules from your project in Projucer to eliminate the dependency on these packages.


#3

Yes, but I can manually remove most of them (except X11) and still compile, link, and run. I need to use audio_utils but I am not using any physical audio devices or gui.


#4

Is there a possibility that the Projucer can be updated to not include libraries that you disabled (like I said, manually removing these in the makefile work fine).


#5

As McMartin suggests, if you remove the modules from your .jucer project then the packages will not be needed. You can also add -Wl,--as-needed to your linker flags which will only pull in the library dependency if it is actually needed in the end.


#6

Fabian,
I think there is a misunderstanding here. For instance, say I include juce_audio_devices (because there is a dependency with juce_audio_utils), but do not need any output devices. I disable all output devices in the Projucer (specifically alsa). If you look in the makefile that is auto-generated, alsa is still listed as a library that needs to be linked against. If I manually remove this from the makefile, everything compiles and runs fine. My request was to remove library dependencies from the makefile that have been disabled in the Projucer whenever possible (it looks like it is at least possible with alsa, xext, xinerama). I have disabled JUCE_USE_CURL as well but currently for this one I cannot remove the library dependency.


#7

That’s not so easy as we cannot predict exactly which functions you are using.

Have you tried using -Wl,--as-needed? You can add that as extra linker flags in the Projucer. With this flag your build machine will still need to have all the libraries installed, but the resulting executable will only depend on the things you actually use.