Compiling 2.2.0 on Debian 8.9 (Jessie) [SOLVED]


I am trying to compile the current version of Audacity on a “fairly clean” Debian 8.9 (Jessie) system. I have followed all the guides I can find (including the forum post Building Audacity 2.2.0 on Ubuntu 17.04 (Zesty). I have installed build-essential, and performed

sudo apt-get build-dep audacity

I am pretty sure I have all the dependencies and prerequisite packages installed.

The problem I am encountering is this:

/bin/bash ./libtool  --tag=CXX   --mode=compile g++ -DPACKAGE_NAME=\"FileDialog\" -DPACKAGE_TARNAME=\"FileDialog\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"FileDialog\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"FileDialog\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_GTK=1 -I. -I../../../lib-src/FileDialog  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -Wno-deprecated-declarations -I/usr/include/gtk-3.0 -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I/usr/include/gtk-3.0  -g -O2 -DwxDEBUG_LEVEL=0 -MT gtk/libFileDialog_la-FileDialogPrivate.lo -MD -MP -MF gtk/.deps/libFileDialog_la-FileDialogPrivate.Tpo -c -o gtk/libFileDialog_la-FileDialogPrivate.lo `test -f 'gtk/FileDialogPrivate.cpp' || echo '../../../lib-src/FileDialog/'`gtk/FileDialogPrivate.cpp
libtool: compile:  g++ -DPACKAGE_NAME=\"FileDialog\" -DPACKAGE_TARNAME=\"FileDialog\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"FileDialog 1.0\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"FileDialog\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_GTK=1 -I. -I../../../lib-src/FileDialog -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -Wno-deprecated-declarations -I/usr/include/gtk-3.0 -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I/usr/include/gtk-3.0 -g -O2 -DwxDEBUG_LEVEL=0 -MT gtk/libFileDialog_la-FileDialogPrivate.lo -MD -MP -MF gtk/.deps/libFileDialog_la-FileDialogPrivate.Tpo -c ../../../lib-src/FileDialog/gtk/FileDialogPrivate.cpp -o gtk/libFileDialog_la-FileDialogPrivate.o
In file included from /usr/include/gtk-3.0/gdk/gdk.h:30:0,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from ../../../lib-src/FileDialog/gtk/FileDialogPrivate.cpp:12:
/usr/include/gtk-3.0/gdk/gdkconfig.h:13:18: fatal error: glib.h: No such file or directory
 #include <glib.h>
compilation terminated.
Makefile:585: recipe for target 'gtk/libFileDialog_la-FileDialogPrivate.lo' failed
make[2]: *** [gtk/libFileDialog_la-FileDialogPrivate.lo] Error 1
make[2]: Leaving directory '/home/dklann/src/audacity-minsrc-2.2.0/build/lib-src/FileDialog'
Makefile:1013: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/dklann/src/audacity-minsrc-2.2.0/build/lib-src'
Makefile:808: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I have successfully compiled and run the same code on a (fairly “messy”, but current) Arch Linux system.

I have also attached config.log for reference. I would very much appreciate your thoughts on why FileDialogPrivate.cpp will not compile on the Debian system.

Thanks in much advance!

~David Klann
config.log (90.2 KB)

Regarding the “fatal error”

/usr/include/gtk-3.0/gdk/gdkconfig.h:13:18: fatal error: glib.h: No such file or directory

Ensure that you have libglib2.0-dev installed.

Note that Audacity 2.2.0 requires the “local” (included in the Audacity tarball) version of PortAudio and PortMidi.
The configure command that I generally use is:

../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading

See also the updated information in the Audacity INSTALL file:

Thanks @steve for your reply. The package libglib2.0-dev is in fact installed:

% dpkg -l libglib2.0-dev
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                    Version                  Architecture             Description
ii  libglib2.0-dev                          2.42.1-1+b1              amd64                    Development files for the GLib library

% sudo dpkg --verify libglib2.0-dev

I have also attached the output of dpkg -l | grep ‘^ii’ | grep – -dev to show all the installed development packages.

I have run the configure script as you state with the same result:

sh ../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading

with similar poor results.

It seems like my installation is messed up, but I cannot figure out how or why it got this way…

Thanks again for your thoughts and tips!

production-1-installed-dev-packages-2017-11-18.txt (16.3 KB)

I notice that in your config.log there are many mentions of gtk-3.0 but Audacity needs to be built with gtk-2.

Thanks again @steve for your insight!

Not paying attention to that detail, I must have installed the GTK3 development package in addition to the GTK2 version.

And that was it. At some point (yesterday?) I set and exported GTK_CFLAGS to -I/usr/include/gtk-3.0 in my working shell’s environment. After removing the libgtk-3-dev package, I manually set GTK_CFLAGS on the configure command line to -I/usr/include/gtk-2.0 and successfully compiled audacity.

As a double-check, I unset GTK_CFLAGS (logged out of the remote system, logged back in) and successfully performed a clean install from the tarball.

Thanks again for helping !!

~David Klann

You’re welcome. Glad you got it working.