Compiling 2.2.0 on Debian 8.9 (Jessie) [SOLVED]

Building and customizing Audacity from the source code.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Compiling 2.2.0 on Debian 8.9 (Jessie) [SOLVED]

Permanent link to this post Posted by grunzh » Sat Nov 18, 2017 4:12 pm

Greetings!

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
Code: Select all
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:
Code: Select all
/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=\"[email protected]\" -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=\"[email protected]\" -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
Attachments
config.log
config.log from Debian
(90.18 KiB) Downloaded 11 times
grunzh
 
Posts: 3
Joined: Sat Nov 18, 2017 3:35 pm
Operating System: Linux Debian

Re: Compiling 2.2.0 on Debian 8.9 (Jessie)

Permanent link to this post Posted by steve » Sat Nov 18, 2017 6:15 pm

Regarding the "fatal error"
Code: Select all
/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:
Code: Select all
../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading


See also the updated information in the Audacity INSTALL file: https://github.com/audacity/audacity/bl ... er/INSTALL
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45379
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Compiling 2.2.0 on Debian 8.9 (Jessie)

Permanent link to this post Posted by grunzh » Sat Nov 18, 2017 7:38 pm

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

Code: Select all
% dpkg -l libglib2.0-dev
Desired=Unknown/Install/Remove/Purge/Hold
| 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:
Code: Select all
sh ../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading

with similar poor results.
Code: Select all


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!

~David
Attachments
production-1-installed-dev-packages-2017-11-18.txt
Installed development packages
(16.26 KiB) Downloaded 11 times
grunzh
 
Posts: 3
Joined: Sat Nov 18, 2017 3:35 pm
Operating System: Linux Debian

Re: Compiling 2.2.0 on Debian 8.9 (Jessie)

Permanent link to this post Posted by steve » Sat Nov 18, 2017 8:38 pm

I notice that in your config.log there are many mentions of gtk-3.0 but Audacity needs to be built with gtk-2.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45379
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Compiling 2.2.0 on Debian 8.9 (Jessie) [SOLVED]

Permanent link to this post Posted by grunzh » Sun Nov 19, 2017 12:04 am

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
grunzh
 
Posts: 3
Joined: Sat Nov 18, 2017 3:35 pm
Operating System: Linux Debian

Re: Compiling 2.2.0 on Debian 8.9 (Jessie) [SOLVED]

Permanent link to this post Posted by steve » Sun Nov 19, 2017 5:48 pm

You're welcome. Glad you got it working.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45379
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu


Return to Compiling Audacity



Who is online

Users browsing this forum: No registered users and 3 guests