# Package Still Needed For Linux Build If Disabled In Projucer

**URL:** <https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034>\
**Category:** General JUCE discussion\
**Created:** [June 7, 2018, 5:55pm UTC](https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034 "2018-06-07T17:55:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![darrenwin](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@darrenwin](https://forum.juce.com/u/darrenwin)\
**Post date:** [June 7, 2018, 5:55pm UTC](https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034/1 "2018-06-07T17:55:41Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![mcmartin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mcmartin/32/7432_2.png) [@mcmartin](https://forum.juce.com/u/mcmartin)\
**Post date:** [June 7, 2018, 7:23pm UTC](https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034/2 "2018-06-07T19:23:24Z")

</div>

Certain Linux packages are required by the JUCE modules:

- [juce\_audio\_devices](https://github.com/WeAreROLI/JUCE/blob/5.3.2/modules/juce_audio_devices/juce_audio_devices.h#L43) requires alsa
- [juce\_core](https://github.com/WeAreROLI/JUCE/blob/5.3.2/modules/juce_core/juce_core.h#L45) requires libcurl
- [juce\_graphics](https://github.com/WeAreROLI/JUCE/blob/5.3.2/modules/juce_graphics/juce_graphics.h#L47) requires x11, xinerama, xext, and freetype2
- [juce\_gui\_basics](https://github.com/WeAreROLI/JUCE/blob/5.3.2/modules/juce_gui_basics/juce_gui_basics.h#L47) requires x11, xinerama, xext

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

---

<div class="post-metadata">

**Author:** ![darrenwin](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@darrenwin](https://forum.juce.com/u/darrenwin)\
**Post date:** [June 7, 2018, 7:35pm UTC](https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034/3 "2018-06-07T19:35:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![darrenwin](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@darrenwin](https://forum.juce.com/u/darrenwin)\
**Post date:** [June 11, 2018, 4:28pm UTC](https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034/4 "2018-06-11T16:28:20Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [June 12, 2018, 9:13am UTC](https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034/5 "2018-06-12T09:13:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![darrenwin](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@darrenwin](https://forum.juce.com/u/darrenwin)\
**Post date:** [June 12, 2018, 2:00pm UTC](https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034/6 "2018-06-12T14:00:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [June 12, 2018, 2:14pm UTC](https://forum.juce.com/t/package-still-needed-for-linux-build-if-disabled-in-projucer/28034/7 "2018-06-12T14:14:40Z")

</div>

> [@darrenwin](#):
>
> My request was to remove library dependencies from the makefile that have been disabled in the Projucer whenever possible

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.
