Audacity 2.0.5 compilation fails on Debian Squeeze

Hi,

First of all props and Kudos to the developers of Audacity, it is an indispensible tool for Linux Audio enthusiasts!

I am the maintainer of AV Linux and regularly compile/package Audacity, AV Linux is currently based on Debian 6.0 (Squeeze). I have had no difficulty compiling and providing packages for previous versions up to 2.0.3 however compilation on 2.0.5 fails with this:

export/ExportPCM.cpp: In member function ‘bool ExportPCM::AddStrings(AudacityProject*, SNDFILE*, Tags*, int)’:
export/ExportPCM.cpp:740:28: error: ‘SF_STR_GENRE’ was not declared in this scope
export/ExportPCM.cpp:764:28: error: ‘SF_STR_TRACKNUMBER’ was not declared in this scope
make[1]: *** [export/ExportPCM.o] Error 1
make[1]: Leaving directory `/home/glen/Packaging/AUDACITY/audacity-src-2.0.5/src'
make: *** [audacity] Error 2

My guess is it may be related to Debian Squeeze using GTK 2.20 and Audacity’s code looking for features of GTK 2.24+ but that is just a guess. Please note that the ./configure stage succeeds with no reported errors or missing dependencies.

I am using this to configure:

./configure --prefix=/usr --with-libtwolame

I hope that this can be patched or fixed for AV Linux users to continue to enjoy the latest Audacity. Your time and attention are appreciated!

Glen MacArthur - AV Linux Maintainer

Hi,

A little more digging and the problem had nothing to do with GTK but was related to ‘libsndfile1’, although Audacity specs 1.0.20, in truth it requires features from libsndfile1 1.0.25 for 2.0.5 to successfully compile.

Sorry for the noise, I would suggest updating the version in your configure script or have it automatically select the libsndfile bundled in the source if version 1.0.25 is not present though if possible.

Thanks for letting us know the outcome GMaq.

The developers are hoping to release 2.0.6 before the end of the year. There is a lot of work going on updating old libraries used by Audacity and updating the configure scripts etc. It may be a good idea for you to also try building from SVN so that you can report any compatibility problems that you encounter direct to the developers.

You can contact the developers is via the audacity-devel mailing list: http://audacityteam.org/contact/lists

How to compile and make a packages of Audacity 2.0.5 for Debian 7?

The source code for Audacity 2.0.5 is available here: http://audacity.googlecode.com/files/audacity-minsrc-2.0.5.tar.xz (direct link).
Instructions for building Audacity from source on Debian based Linux distributions: http://wiki.audacityteam.org/wiki/CompilingAudacityForBeginners#Example_compiling_the_latest_Audacity_source_code_on_Ubuntu_and_derivatives_.28like_Linux_Mint.29

Before you start you should ensure that your user name is a member of the “sudo” group and “audio” group.

When trying to compile I’ve got an error:

 AudacityApp.cpp -o AudacityApp.o
In file included from AudacityApp.cpp:72:0:
FFmpeg.h:356:4: error: ‘SampleFormat’ does not name a type
FFmpeg.h:585:4: error: use of enum ‘SampleFormat’ without previous declaration
FFmpeg.h:585:4: error: use of enum ‘SampleFormat’ without previous declaration
FFmpeg.h:622:4: error: ‘AVFormatParameters’ has not been declared
FFmpeg.h:622:4: error: ‘AVFormatParameters’ has not been declared
FFmpeg.h:639:4: warning: ‘av_register_protocol_fp’ initialized and declared ‘extern’ [enabled by default]
FFmpeg.h:639:4: error: ‘URLProtocol’ was not declared in this scope
FFmpeg.h:639:4: error: ‘protocol’ was not declared in this scope
FFmpeg.h:639:4: error: ‘av_register_protocol’ declared as an ‘inline’ variable
FFmpeg.h:639:4: error: ‘URLProtocol’ was not declared in this scope
FFmpeg.h:639:4: error: ‘protocol’ was not declared in this scope
FFmpeg.h:639:4: error: expected ‘,’ or ‘;’ before ‘{’ token
FFmpeg.h: In function ‘AVCodec* av_codec_next(AVCodec*)’:
FFmpeg.h:686:4: error: declaration of C function ‘AVCodec* av_codec_next(AVCodec*)’ conflicts with
In file included from FFmpeg.h:39:0,
                 from AudacityApp.cpp:72:
/usr/include/libavcodec/avcodec.h:3372:10: error: previous declaration ‘AVCodec* av_codec_next(const AVCodec*)’ here
In file included from AudacityApp.cpp:72:0:
FFmpeg.h: At global scope:
FFmpeg.h:692:4: error: ‘AVFormatParameters’ has not been declared
FFmpeg.h:692:4: error: ‘AVFormatParameters’ has not been declared
FFmpeg.h:698:4: warning: ‘url_open_protocol_fp’ initialized and declared ‘extern’ [enabled by default]
FFmpeg.h:698:4: error: ‘URLContext’ was not declared in this scope
FFmpeg.h:698:4: error: ‘puc’ was not declared in this scope
FFmpeg.h:698:4: error: expected primary-expression before ‘struct’
FFmpeg.h:698:4: error: expected primary-expression before ‘const’
FFmpeg.h:698:4: error: expected primary-expression before ‘int’
FFmpeg.h:698:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:698:4: error: ‘url_open_protocol’ declared as an ‘inline’ variable
FFmpeg.h:698:4: error: ‘URLContext’ was not declared in this scope
FFmpeg.h:698:4: error: ‘puc’ was not declared in this scope
FFmpeg.h:698:4: error: expected primary-expression before ‘struct’
FFmpeg.h:698:4: error: expected primary-expression before ‘const’
FFmpeg.h:698:4: error: expected primary-expression before ‘int’
FFmpeg.h:698:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:698:4: error: expected ‘,’ or ‘;’ before ‘{’ token
FFmpeg.h:704:4: warning: ‘url_open_fp’ initialized and declared ‘extern’ [enabled by default]
FFmpeg.h:704:4: error: ‘URLContext’ was not declared in this scope
FFmpeg.h:704:4: error: ‘puc’ was not declared in this scope
FFmpeg.h:704:4: error: expected primary-expression before ‘const’
FFmpeg.h:704:4: error: expected primary-expression before ‘int’
FFmpeg.h:704:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:704:4: error: ‘url_open’ declared as an ‘inline’ variable
FFmpeg.h:704:4: error: ‘URLContext’ was not declared in this scope
FFmpeg.h:704:4: error: ‘puc’ was not declared in this scope
FFmpeg.h:704:4: error: expected primary-expression before ‘const’
FFmpeg.h:704:4: error: expected primary-expression before ‘int’
FFmpeg.h:704:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:704:4: error: expected ‘,’ or ‘;’ before ‘{’ token
FFmpeg.h:710:4: error: ‘URLContext’ has not been declared
FFmpeg.h:710:4: error: ‘URLContext’ has not been declared
FFmpeg.h:716:4: warning: ‘url_close_fp’ initialized and declared ‘extern’ [enabled by default]
FFmpeg.h:716:4: error: ‘URLContext’ was not declared in this scope
FFmpeg.h:716:4: error: ‘h’ was not declared in this scope
FFmpeg.h:716:4: error: ‘url_close’ declared as an ‘inline’ variable
FFmpeg.h:716:4: error: ‘URLContext’ was not declared in this scope
FFmpeg.h:716:4: error: ‘h’ was not declared in this scope
FFmpeg.h:716:4: error: expected ‘,’ or ‘;’ before ‘{’ token
FFmpeg.h:872:4: error: ‘AVMetadataTag’ does not name a type
FFmpeg.h:872:4: error: ‘AVMetadataTag’ does not name a type
FFmpeg.h:878:4: warning: ‘av_metadata_set_fp’ initialized and declared ‘extern’ [enabled by default]
FFmpeg.h:878:4: error: ‘AVMetadata’ was not declared in this scope
FFmpeg.h:878:4: error: ‘pm’ was not declared in this scope
FFmpeg.h:878:4: error: expected primary-expression before ‘const’
FFmpeg.h:878:4: error: expected primary-expression before ‘const’
FFmpeg.h:878:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:878:4: error: ‘av_metadata_set’ declared as an ‘inline’ variable
FFmpeg.h:878:4: error: ‘AVMetadata’ was not declared in this scope
FFmpeg.h:878:4: error: ‘pm’ was not declared in this scope
FFmpeg.h:878:4: error: expected primary-expression before ‘const’
FFmpeg.h:878:4: error: expected primary-expression before ‘const’
FFmpeg.h:878:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:878:4: error: expected ‘,’ or ‘;’ before ‘{’ token
FFmpeg.h:884:4: warning: ‘av_metadata_set2_fp’ initialized and declared ‘extern’ [enabled by default]
FFmpeg.h:884:4: error: ‘AVMetadata’ was not declared in this scope
FFmpeg.h:884:4: error: ‘pm’ was not declared in this scope
FFmpeg.h:884:4: error: expected primary-expression before ‘const’
FFmpeg.h:884:4: error: expected primary-expression before ‘const’
FFmpeg.h:884:4: error: expected primary-expression before ‘int’
FFmpeg.h:884:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:884:4: error: ‘av_metadata_set2’ declared as an ‘inline’ variable
FFmpeg.h:884:4: error: ‘AVMetadata’ was not declared in this scope
FFmpeg.h:884:4: error: ‘pm’ was not declared in this scope
FFmpeg.h:884:4: error: expected primary-expression before ‘const’
FFmpeg.h:884:4: error: expected primary-expression before ‘const’
FFmpeg.h:884:4: error: expected primary-expression before ‘int’
FFmpeg.h:884:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:884:4: error: expected ‘,’ or ‘;’ before ‘{’ token
FFmpeg.h:908:4: warning: ‘av_register_protocol2_fp’ initialized and declared ‘extern’ [enabled by default]
FFmpeg.h:908:4: error: ‘URLProtocol’ was not declared in this scope
FFmpeg.h:908:4: error: ‘protocol’ was not declared in this scope
FFmpeg.h:908:4: error: expected primary-expression before ‘int’
FFmpeg.h:908:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:908:4: error: ‘av_register_protocol2’ declared as an ‘inline’ variable
FFmpeg.h:908:4: error: ‘URLProtocol’ was not declared in this scope
FFmpeg.h:908:4: error: ‘protocol’ was not declared in this scope
FFmpeg.h:908:4: error: expected primary-expression before ‘int’
FFmpeg.h:908:4: error: expression list treated as compound expression in initializer [-fpermissive]
FFmpeg.h:908:4: error: expected ‘,’ or ‘;’ before ‘{’ token
AudacityApp.cpp:221:13: warning: ‘void wxOnAssert(const wxChar*, int, const wxChar*)’ defined but not used [-Wunused-function]
make[1]: *** [AudacityApp.o] Ошибка 1
make[1]: Leaving directory `/home/r/Desktop/11111/audacity-src-2.0.5/src'
make: *** [audacity] Ошибка 2
r@prime:~/Desktop/11111/audacity-src-2.0.5$

Audacity supports FFmpeg 0.5 through 0.8. Later versions are not currently supported.
The easiest way round the problem is to build Audacity without FFmpeg support.

./configure --without-ffmpeg
make
sudo make install

Whether it limit audacity functionality(without ffmpeg support)? If so, how?

…Well I compiled without errors(except the messages about missing translations on Russian of about 931 messages, if I understood right from what I read in make output) with:

./configure --without-ffmpeg
make

Now, how to make a deb-package(-s)?

That is really beyond the scope of this forum. Documentation about packaging for Debian can be found here: https://wiki.debian.org/Packaging

And how about first question:

Whether it limit audacity functionality(without ffmpeg support)? If so, how?

As described in the manual (http://manual.audacityteam.org/o/man/faq_installation_and_plug_ins.html#ffdown),
The optional FFmpeg library allows Audacity to import and export a much larger range of audio formats including AC3, AMR(NB), M4A, MP4 and WMA and also audio from most video files.
FFmpeg is not required for Audacity to work, only to add support for non-open file formats.
There are also some legal considerations if you want to use FFmpeg: http://www.ffmpeg.org/legal.html

When you planning to add support for newer versions of ffmpeg, at least that one which is in debian-multimedia repo for wheezy?

When volunteers have time to upgrade, or we could take another route and export/import using the FFmpeg compiled binary instead of loading version-specific dynamic libraries (but making that once-only change is also a big job).

If you would like to volunteer to help with this, please subscribe to audacity-devel and introduce yourself: https://lists.sourceforge.net/lists/listinfo/audacity-devel .


Gale

Well, I probably could help but I’m not a programmer.