compilation error

Help for Audacity on GNU/Linux.
Forum rules
ImageThis forum is for Audacity on GNU/Linux.
Please state:
  • which version of Linux you are using,
  • the exact three-section version number of Audacity from Help menu > About Audacity,
  • whether you installed your distribution's release, PPA version, or compiled Audacity from source code.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade (see https://www.audacityteam.org/download/).
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
dom55
Posts: 2
Joined: Mon Apr 15, 2013 6:19 am
Operating System: Please select

compilation error

Post by dom55 » Mon Apr 15, 2013 6:40 am

Hello

The compilation of the sources (obtained from the svn repository of audacity) gives some fatal errors given below:

does somebody understand what is the matter ?

the ./configure didn't show fatal error.
he OS is OpenSuse 12.2 64 bits.

thank you for your help

Dom
/////////////////////////////////////////////
make[1] : on entre dans le répertoire « /home/dom/audacity/src »
g++ -c -I../lib-src/portmixer/include -Wall -I/usr/lib64/wx-2.8-stl/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../lib-src/FileDialog -I/home/dom/audacity/lib-src/lib-widget-extra -I../lib-src/libsndfile/src -I../lib-src/libid3tag -I../lib-src/libsoxr/src -I../lib-src/sbsms/include -I../lib-src/soundtouch/include -I../lib-src/libnyquist -I../lib-src/libvamp -I../lib-src/expat -I../lib-src/twolame/libtwolame -I../lib-src/portsmf -I../lib-src/portaudio-v19/include -fno-strict-aliasing -I./include -I. -DLIBDIR="/usr/local//lib64" -D__STDC_CONSTANT_MACROS -Wall -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 AudacityApp.cpp -o AudacityApp.o
In file included from WaveTrack.h:17:0,
from AudioIO.h:35,
from AudacityApp.cpp:61:
WaveClip.h:57:1: warning: type attributes ignored after type is already defined [-Wattributes]
In file included from AudacityApp.cpp:70: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:70:

steve
Site Admin
Posts: 80687
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: compilation error

Post by steve » Mon Apr 15, 2013 8:04 am

Check which version of FFMpeg you have installed.
Currently supported versions are 0.5 through 0.8. http://manual.audacityteam.org/o/man/fa ... html#linff

If you don't have a supported version of FFMpeg, the easiest workaround is to build Audacity without FFMpeg support.

The following commands should reset the configuration and build without FFMpeg support:

Code: Select all

make distclean
./configure --without-ffmpeg 
make
The down side of building without FFMpeg is that you lose support for proprietary file formats that are supported by FFMpeg, such as WMA, AAC, and so on.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

auduser2
Posts: 2
Joined: Sun Jan 12, 2014 11:33 pm
Operating System: Please select

Re: compilation error

Post by auduser2 » Sun Jan 12, 2014 11:40 pm

Use the ffmpeg-comat includes in src/FFmpeg.h

#include <ffmpeg-compat/libavcodec/avcodec.h>
#include <ffmpeg-compat/libavformat/avformat.h>
#include <ffmpeg-compat/libavutil/fifo.h>
#include <ffmpeg-compat/libavutil/mathematics.h>

I just added them before the others and it compiled for me.

steve
Site Admin
Posts: 80687
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: compilation error

Post by steve » Mon Jan 13, 2014 12:43 pm

auduser2 wrote:Use the ffmpeg-comat includes in src/FFmpeg.h

#include <ffmpeg-compat/libavcodec/avcodec.h>
#include <ffmpeg-compat/libavformat/avformat.h>
#include <ffmpeg-compat/libavutil/fifo.h>
#include <ffmpeg-compat/libavutil/mathematics.h>

I just added them before the others and it compiled for me.
Which Linux distro?
Did you need to install ffmpeg-compat-devel separately or was it already installed on your machine?

I've not found much documentation about ffmpeg-compat. Is that the "correct" way to use FFmpeg-compat or is it a "hack"?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply