Audacity 2.1.2 failed to compile on RHEL60like system

Hi All,

I tried to compile Audacity on Oracle Linux 6 x86_64. Mayby, it’s a bit unusual, but I have lots of audio tools installed: linuxsampler, LADSPA, LV2 plugins, JACK, etc I used Audacity 2.0.5 until now installed from linuxtech repo. So, I tried to compile the newest version.

I successfully installed wxWidgets-3.0.2 and “devel” rpms of all required libraries. Also I executed ldconfig and, during several unsuccessful compilation attemmpts, I even provided PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ for ./configure/

Still I’ve got this error:

g++ -DHAVE_CONFIG_H -I.  -Wno-deprecated-declarations -D__STDC_CONSTANT_MACROS -DLIBDIR=\"/usr/local//lib\"   -I../lib-src/portaudio-v19/include    -I../lib-src/lib-widget-extra -I/usr/local/lib/wx/include/gtk2-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread       -I/usr/include -I/usr/include     -I../lib-src/libnyquist -I/usr/include/soundtouch     -I../lib-src/lv2/include -I../lib-src/lv2/include -I../lib-src/portsmf  -I../lib-src/sbsms/include -I../lib-src/libvamp  -I/usr/local/lib/wx/include/gtk2-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -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/libpng12   -Wno-unused-local-typedefs -I../lib-src/portmixer/include  -DwxDEBUG_LEVEL=0  -Wall -I../include -I../lib-src/FileDialog                   -MT export/audacity-ExportPCM.o -MD -MP -MF export/.deps/audacity-ExportPCM.Tpo -c -o export/audacity-ExportPCM.o `test -f 'export/ExportPCM.cpp' || echo './'`export/ExportPCM.cpp
export/ExportPCM.cpp: In constructor ‘ExportPCMOptions::ExportPCMOptions(wxWindow*, int)’:
export/ExportPCM.cpp:135: warning: comparison between signed and unsigned integer expressions
export/ExportPCM.cpp: In member function ‘virtual int ExportPCM::Export(AudacityProject*, int, wxString, bool, double, double, MixerSpec*, Tags*, int)’:
export/ExportPCM.cpp:401: warning: comparison between signed and unsigned integer expressions
export/ExportPCM.cpp: In member function ‘bool ExportPCM::AddStrings(AudacityProject*, SNDFILE*, Tags*, int)’:
export/ExportPCM.cpp:708: error: ‘SF_STR_GENRE’ was not declared in this scope
export/ExportPCM.cpp:732: error: ‘SF_STR_TRACKNUMBER’ was not declared in this scope
export/ExportPCM.cpp: In member function ‘virtual wxWindow* ExportPCM::OptionsCreate(wxWindow*, int)’:
export/ExportPCM.cpp:877: warning: comparison between signed and unsigned integer expressions
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
make[2]: *** [export/audacity-ExportPCM.o] Error 1
make[2]: Leaving directory `/home/igor/Music/Tools/audacity212/audacity-minsrc-2.1.2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/igor/Music/Tools/audacity212/audacity-minsrc-2.1.2/src'
make: *** [all-recursive] Error 1

Now, trying compiling from Git

‘SF_STR_GENRE’ and ‘SF_STR_TRACKNUMBER’ were first defined in libsndfile in version 1.0.23. Check what version of libsndfile is on your system.

You could try configuring Audacity

--with-libsndfile=local



Gale

Thank you! It helped.

It’s also helped upgrading g++ upto 4.8.2 as well as binutils. On OL6.7/RHEL6.7/CentOS6.7 it’s recommended to use devtoolset-2. Something like this:

sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
sudo rpm --import http://ftp.scientificlinux.org/linux/scientific/5x/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern
sudo yum install devtoolset-2-gcc-c++-4.8.2-15.1.el6
echo "source /opt/rh/devtoolset-2/enable" >> ~/.bashrc
yum list devtoolset*
Installed Packages
devtoolset-2-binutils.x86_64                                      2.23.52.0.1-10.el6                              @DevToolset-2
devtoolset-2-gcc.x86_64                                           4.8.2-15.el6                                    @DevToolset-2
devtoolset-2-gcc-c++.x86_64                                       4.8.2-15.el6                                    @DevToolset-2
devtoolset-2-libstdc++-devel.x86_64                               4.8.2-15.el6                                    @DevToolset-2
devtoolset-2-runtime.noarch

Hope this info could help someone else too.