New User having header problems on Debian Stretch


#1

I have a student who’s been asked by a potential industrial supervisor to port his work to Juce (he has it working in Qt5) and build a VST plugin. I have no experience with Juce. I’ve apparently installed the necessary tools on my Debian Stretch laptop.

When I issue the make command in the directory where the Makefile was generated by Producer 4.3.0, I get a load of issues with header files. Taking the first example,

> Compiling juce_audio_formats.cpp
> In file included from ../../../../../../../usr/share/juce/modules/juce_audio_formats/juce_audio_formats.cpp:100:0,
>                  from ../../JuceLibraryCode/juce_audio_formats.cpp:9:
> ../../../../../../../usr/share/juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:132:23: fatal error: flac/all.h: No such file or directory

This is failing because on my installation, the development deb package for libflac installs all.h to /usr/include/FLAC (upper case). I found out I could disable that audio driver in Projucer, then I get problems with /usr/include/jpeglib.h (Juce is looking for <jpglib/jpeglib.h>, so I can’t even get around it with compiler flags). There are many, many more similar issues

pkgtool is reporting everything correctly. For example:

nick@ariel:~$ pkg-config --libs flac
-lFLAC  

so I guess this is a debian packaging problem? Does anybody here use Juce on debian? How do you do it? I am not really prepared to make loads of bogus symlinks all over /usr or /usr/local.

Nick/.


#2

The only reason you’d see that would be if you’ve set JUCE_INCLUDE_FLAC_CODE=0, but by default juce will just encapsulate all the flac code internally, and you don’t need to do or install anything to support it. I’d recommend that if you’re just starting, rather than trying to use the external version of it.


#3

Very happy to use the easiest build method available :slight_smile:
However, I haven’t intentionally set that environment variable. I have selected the debug makefile mode. I see the JUCE_INCLUDE_FLAC_CODE in my source tree:

nick@ariel:~/C(++)/Juce/minimal$ grep -r JUCE_INCLUDE_FLAC_CODE *
JuceLibraryCode/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:#if JUCE_INCLUDE_FLAC_CODE || ! defined (JUCE_INCLUDE_FLAC_CODE)
nick@ariel:~/C(++)/Juce/minimal$ echo $JUCE_INCLUDE_FLAC_CODE

I told Producer to “Set Copy Mode for All Modules”.

In any case, I guess that variable would only stop flac.h being looked for in the wrong place, and not change all the other similar messages?

This is a new project created with the default settings for an “Audio Plug-In”. I wasn’t confident enough to start changing any defaults yet.


#4

OK, but I can’t see how else you’d get an include error at that line - the file it’s including is a relative path for a file that’s right there inside the juce source tree, it’s not expecting you to have supplied that file, or added any search paths for it or done anything at all for it to find it…

FWIW I’d avoid that, it’s a feature we’ll probably deprecate one day. Best to just use GIT submodules nowadays and not mess around with copies of library files.


#5

So should I start again from your git repo rather than install the debian packages? What I did to get it running was this (from history, including all my typos!):

 2005  sudo apt-get install libjuce-doc juce-tools libjuce-dev
 2008  apt-cache show juce-tools
 2020  sudo apt-get install libfreetype6-dev
 2022  sudo apt-get install libcurl3-openssl-dev
 2024  sudo apt-get install libxinerama-dev
 2026  sudo apt-get install libflac-dev
 2038  apt-cache search zlib
 2039  sudo apt-get install zlib1g-dev
 2043  apt-cache search jpglib
 2044  apt-cache search jpeglib
 2045  apt-cache search libjpg
 2046  apt-cache search libjpeg
 2047  sudo apt-get instal libjpeg9-dev
 2048  sudo apt-get install libjpeg9-dev

I can easily git clone stuff instead. The student’s using MacOS and has 4.3.1 anyway. I just find usually that installing the deb pacages is actually the easy way :slight_smile:

FWIW, if I change Producer not to copy things locally I just get the same thing:

Compiling PluginProcessor.cpp
Compiling PluginEditor.cpp
Compiling juce_audio_basics.cpp
Compiling juce_audio_devices.cpp
Compiling juce_audio_formats.cpp
In file included from ../../../../../../../usr/share/juce/modules/juce_audio_formats/juce_audio_formats.cpp:100:0,
                 from ../../JuceLibraryCode/juce_audio_formats.cpp:9:
../../../../../../../usr/share/juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:132:23: fatal error: flac/all.h: No such file or directory

                       ^
compilation terminated.
Makefile:120: recipe for target 'build/intermediate/Debug/juce_audio_formats_5a29c68a.o' failed
make: *** [build/intermediate/Debug/juce_audio_formats_5a29c68a.o] Error 1

No surprises there I guess.

Having looked around a bit more, I came across the AppConfig.h file. It seems to have all the #defines commented out.

//==============================================================================
// juce_audio_formats flags:

#ifndef    JUCE_USE_FLAC
 //#define JUCE_USE_FLAC
#endif

Then I noticed that changing the Projucer setting from “Default” to “Enabled” causes JUCE_USE_FLAC to be 1, make still fails the same way.

By the way, thanks a lot for your quick responses. I’ll hack on for a while (at least until lunch time :slight_smile: )


#6

Well, maybe you got a screwed up tree somehow. The file it’s trying to include should be right here:


#7

OK, I git cloned and built the Projucer a minimal VST client and host no problems. I’ll email the debian package guy and see what he has to say, otherwise I’ll work in the local cloned directory.

Thank you!

Now I just have to learn how to use it. Can’t be that hard :smiley:


#8

Built a VST plugin that goes beep (continuously) and ignores MIDI input. Student happy now. He can work out the rest. Glad to hear local industry is using your stuff! Ticket closed :slight_smile: