Compiling audacity-minsrc-2.2.1 in CentOS 7

Help for Audacity 2.x.x on GNU/Linux.
Forum rules
ImageThis forum is for Audacity 2.x.x 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
joseluisbz
Posts: 4
Joined: Sat Dec 09, 2017 6:58 pm
Operating System: Linux Fedora/RHEL

Compiling audacity-minsrc-2.2.1 in CentOS 7

Post by joseluisbz » Sat Dec 09, 2017 7:15 pm

Hi I have

Code: Select all

$ gcc --version
gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ 

Bow I'm trying to configure and make.

Code: Select all

$ ./configure --prefix=/usr/local/Custom/audacity --with-ffmpeg --with-lame --with-libid3tag --with-libmad --with-sbsms --with-libsndfile --with-soundtouch --with-libsoxr --with-libtwolame --with-libvorbis --with-lv2 --with-midi --with-portmidi --with-widgetextra --with-portmixer --with-portaudio=local --with-libflac --with-libvamp
now trying to make

Code: Select all

effects/vamp/audacity-LoadVamp.o: In function `VampEffectsModule::FindPlugins(PluginManagerInterface&)':
LoadVamp.cpp:(.text+0x2dd): undefined reference to `_VampHost::Vamp::HostExt::PluginLoader::listPlugins[abi:cxx11]()'
LoadVamp.cpp:(.text+0x375): undefined reference to `_VampHost::Vamp::HostExt::PluginLoader::loadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, int)'
effects/vamp/audacity-LoadVamp.o: In function `VampEffectsModule::FindPlugin(wxString const&, int&, bool&)':
LoadVamp.cpp:(.text+0xcd2): undefined reference to `_VampHost::Vamp::HostExt::PluginLoader::loadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, int)'
effects/vamp/audacity-VampEffect.o: In function `VampEffect::Init()':
VampEffect.cpp:(.text+0x1bff): undefined reference to `_VampHost::Vamp::HostExt::PluginLoader::loadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2348: audacity] Error 1
make[2]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
make[1]: *** [Makefile:1585: all] Error 2
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
make: *** [Makefile:808: all-recursive] Error 1
$
How solve this error?

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

Re: Compiling audacity-minsrc-2.2.1 in CentOS 7

Post by steve » Sat Dec 09, 2017 7:23 pm

I can't see the cause of the error in the extracts that you have posted, but my guess would be missing dependencies.
Check carefully through the config log for errors and warnings.

There may be something here: https://wiki.audacityteam.org/wiki/Developing_On_Linux
In particular, ensure that libvamp is available.

The most up to date information about building on Linux is in the source code here: https://github.com/audacity/audacity/bl ... er/INSTALL
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

joseluisbz
Posts: 4
Joined: Sat Dec 09, 2017 6:58 pm
Operating System: Linux Fedora/RHEL

Re: Compiling audacity-minsrc-2.2.1 in CentOS 7

Post by joseluisbz » Sat Dec 09, 2017 9:06 pm

I can't edit the Question.

Previosly I did:

Installing wxWidgets

Code: Select all

$ tar xvf wxWidgets-3.0.3.tar.bz2 -C /usr/local/Sources/
$ cd /usr/local/Sources/wxWidgets-3.0.3
$ ./configure --prefix=/usr/local/Custom/wxwidgets --enable-unicode --enable-debug --disable-shared 
$ time make
$ sudo make install
Installing libsbsms

Code: Select all

$ tar xvf /usr/local/Sources/libsbsms-2.0.2.tar.gz -C /usr/local/Sources/
$ cd /usr/local/Sources/libsbsms-2.0.2
$ ./configure --prefix=/usr/local/Custom/sbsms
$ make
$ sudo make install

export PATH=/usr/local/Custom/wxwidgets/bin:$PATH
I working on CentOS 7, Updating bin, lib and include folders.

Code: Select all

$ more /etc/environment
PATH=/usr/local/Custom/wxwidgets/bin:(another bin folder programs...)
CPATH=/usr/local/Custom/wxwidgets/include:/usr/local/Custom/sbsms/include:/usr/local/Custom/wxwidgets/lib/wx/include/gtk3-unicode-static-3.1/wx:(another include folder programs...)

Code: Select all

$ more /etc/ld.so.conf.d/custom. conf
...
/usr/local/Custom/wxwidgets/lib
/usr/local/Custom/sbsms/lib
...
Installing the Dependencies/programs needed by Audicity.

Code: Select all

$ sudo yum install epel-release
$ sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
$ sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
$ sudo yum install ffmpeg ffmpeg-devel
$ sudo yum install lame lame-libs lame-devel
$ sudo yum install flac flac-libs flac-devel ibogg-devel
$ sudo yum install libid3tag libid3tag-devel
$ sudo yum install libmad libmad-devel
$ sudo yum install libsndfile libsndfile-devel
$ sudo yum install soundtouch soundtouch-devel
$ sudo yum install cmake3
$ sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
$ sudo yum install soxr soxr-devel
$ sudo yum install twolame twolame-libs twolame-devel 
$ sudo yum install vamp-plugin-sdk vamp-plugin-sdk-devel
$ sudo yum install libvorbis libvorbis-devel
$ sudo yum install lv2 lv2-devel
$ sudo yum install portaudio portaudio-devel jack-audio-connection-kit libffado libxml++  alsa-lib-devel 
$ sudo yum install portmidi portmidi-devel
Set folder Source for Audicity

Code: Select all

$ tar -xvf /usr/local/Sources/audacity-minsrc-2.2.1.tar.xz -C /usr/local/Sources/
$ cd /usr/local/Sources/audacity-minsrc-2.2.1-rc3
Now using configure

Code: Select all

$ ./configure --prefix=/usr/local/Custom/audacity --with-ffmpeg --with-lame --with-libid3tag --with-libmad --with-sbsms --with-libsndfile --with-soundtouch --with-libsoxr --with-libtwolame --with-libvorbis --with-lv2 --with-midi --with-portmidi --with-widgetextra --with-portmixer --with-portaudio --with-libflac --with-libvamp
final result configure

Code: Select all

Finished configure:
EXPAT: using SYSTEM libraries
FFMPEG: using SYSTEM libraries
LAME: using SYSTEM libraries
LIBFLAC: using SYSTEM libraries
LIBID3TAG: using SYSTEM libraries
LIBMAD: using SYSTEM libraries
LIBNYQUIST: using LOCAL libraries
LIBSBSMS: using LOCAL libraries
LIBSNDFILE: using SYSTEM libraries
LIBSOUNDTOUCH: using SYSTEM libraries
LIBSOXR: using SYSTEM libraries
LIBTWOLAME: using SYSTEM libraries
LIBVAMP: using SYSTEM libraries
LIBVORBIS: using SYSTEM libraries
LV2: using LOCAL libraries
PORTAUDIO: using SYSTEM libraries
PORTSMF: using LOCAL libraries
PORTMIDI: using LOCAL libraries
WIDGETEXTRA: using LOCAL libraries
ladspa plugin support: enabled
audiounit plugin support: disabled
VST plugin support: enabled
prefix=/usr/local/Custom/audacity

Run 'configure --help' for an explanation of these options,
otherwise run 'make' to build Audacity.
$ 
ERROR make

Code: Select all

$ time make

Code: Select all

audacity-AudioIO.o: In function `SystemTime(bool)':
AudioIO.cpp:(.text+0x174): undefined reference to `PaUtil_GetTime'
audacity-AudioIO.o: In function `audacityAudioCallback(void const*, void*, unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*)':
AudioIO.cpp:(.text+0xcb8c): undefined reference to `PaUtil_GetTime'
import/audacity-ImportFLAC.o:(.rodata._ZTV10MyFLACFile[_ZTV10MyFLACFile]+0x148): undefined reference to `FLAC::Decoder::File::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
import/audacity-ImportFLAC.o:(.rodata._ZTV10MyFLACFile[_ZTV10MyFLACFile]+0x160): undefined reference to `FLAC::Decoder::File::init_ogg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ondemand/audacity-ODDecodeFlacTask.o:(.rodata._ZTV10ODFLACFile[_ZTV10ODFLACFile]+0x148): undefined reference to `FLAC::Decoder::File::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ondemand/audacity-ODDecodeFlacTask.o:(.rodata._ZTV10ODFLACFile[_ZTV10ODFLACFile]+0x160): undefined reference to `FLAC::Decoder::File::init_ogg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
effects/vamp/audacity-LoadVamp.o: In function `VampEffectsModule::FindPlugins(PluginManagerInterface&)':
LoadVamp.cpp:(.text+0x2dd): undefined reference to `_VampHost::Vamp::HostExt::PluginLoader::listPlugins[abi:cxx11]()'
LoadVamp.cpp:(.text+0x375): undefined reference to `_VampHost::Vamp::HostExt::PluginLoader::loadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, int)'
effects/vamp/audacity-LoadVamp.o: In function `VampEffectsModule::FindPlugin(wxString const&, int&, bool&)':
LoadVamp.cpp:(.text+0xcd2): undefined reference to `_VampHost::Vamp::HostExt::PluginLoader::loadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, int)'
effects/vamp/audacity-VampEffect.o: In function `VampEffect::Init()':
VampEffect.cpp:(.text+0x1bff): undefined reference to `_VampHost::Vamp::HostExt::PluginLoader::loadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, float, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2348: audacity] Error 1
make[2]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
make[1]: *** [Makefile:1585: all] Error 2
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
make: *** [Makefile:808: all-recursive] Error 1

real	22m32.431s
user	19m37.477s
sys	1m40.626s
$ 

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

Re: Compiling audacity-minsrc-2.2.1 in CentOS 7

Post by steve » Sat Dec 09, 2017 10:26 pm

joseluisbz wrote:

Code: Select all

AudioIO.cpp:(.text+0x174): undefined reference to `PaUtil_GetTime'
You will need to specify the local library for portaudio because there's a fix in it that is not yet gone upstream.

This is the configure command that I usually use (on Debian / Ubuntu):
Debug build:

Code: Select all

../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading --enable-debug
Release build:

Code: Select all

../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading
The two dots at the start is because I create a "build" folder, then run configure and make from there (keeps the scr directory clean).
"--disable-dynamic-loading" is because both Debian and Ubuntu have later a version of FFmpeg tha Audacity can't load dynamically.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

joseluisbz
Posts: 4
Joined: Sat Dec 09, 2017 6:58 pm
Operating System: Linux Fedora/RHEL

Re: Compiling audacity-minsrc-2.2.1 in CentOS 7

Post by joseluisbz » Sun Dec 10, 2017 3:15 am

Here my result


Disabling FLAC

Code: Select all

$ ./configure --prefix=/usr/local/Custom/audacity --with-ffmpeg --with-lame --with-libid3tag --with-libmad --with-sbsms --with-libsndfile --with-soundtouch --with-libsoxr --with-libtwolame --with-libvorbis --with-lv2 --with-midi --with-portmidi --with-widgetextra --with-portmixer --with-portaudio=local --without-libflac --with-libvamp=local

Code: Select all

Finished configure:
EXPAT: using SYSTEM libraries
FFMPEG: using SYSTEM libraries
LAME: using SYSTEM libraries
LIBFLAC: disabled
LIBID3TAG: using SYSTEM libraries
LIBMAD: using SYSTEM libraries
LIBNYQUIST: using LOCAL libraries
LIBSBSMS: using LOCAL libraries
LIBSNDFILE: using SYSTEM libraries
LIBSOUNDTOUCH: using SYSTEM libraries
LIBSOXR: using SYSTEM libraries
LIBTWOLAME: using SYSTEM libraries
LIBVAMP: using LOCAL libraries
LIBVORBIS: using SYSTEM libraries
LV2: using LOCAL libraries
PORTAUDIO: using LOCAL libraries
PORTSMF: using LOCAL libraries
PORTMIDI: using LOCAL libraries
WIDGETEXTRA: using LOCAL libraries
ladspa plugin support: enabled
audiounit plugin support: disabled
VST plugin support: enabled
prefix=/usr/local/Custom/audacity

Run 'configure --help' for an explanation of these options,
otherwise run 'make' to build Audacity.
$ 
Result $ time make

Code: Select all

cd .. && /bin/sh ./config.status src/configunix.h
config.status: creating src/configunix.h
config.status: src/configunix.h is unchanged
make[2]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
Making all in tests
make[1]: Entering directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/tests'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/tests'
make[1]: Entering directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3'
rm -f audacity
cp src/audacity audacity
[ -e plug-ins ] || ln -s ./plug-ins
[ -e nyquist ] || ln -s ./nyquist
[ -e locale ] || ln -s po locale
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3'

real	22m57.487s
user	20m14.023s
sys	1m46.819s
$ 

configure FLAC disabled again

Code: Select all

./configure --prefix=/usr/local/Custom/audacity --with-ffmpeg --with-lame --with-libid3tag --with-libmad --with-sbsms --with-libsndfile --with-soundtouch --with-libsoxr --with-libtwolame --with-libvorbis --with-lv2 --with-midi --with-portmidi --with-widgetextra --with-portmixer --with-portaudio=local --without-libflac --with-libvamp=local --with-ffmpeg="system" --disable-dynamic-loading --with-lib-preference="local system" 

Code: Select all

Finished configure:
EXPAT: using SYSTEM libraries
FFMPEG: using SYSTEM libraries
LAME: using LOCAL libraries
LIBFLAC: disabled
LIBID3TAG: using SYSTEM libraries
LIBMAD: using SYSTEM libraries
LIBNYQUIST: using LOCAL libraries
LIBSBSMS: using LOCAL libraries
LIBSNDFILE: using LOCAL libraries
LIBSOUNDTOUCH: using SYSTEM libraries
LIBSOXR: using LOCAL libraries
LIBTWOLAME: using LOCAL libraries
LIBVAMP: using LOCAL libraries
LIBVORBIS: using SYSTEM libraries
LV2: using LOCAL libraries
PORTAUDIO: using LOCAL libraries
PORTSMF: using LOCAL libraries
PORTMIDI: using LOCAL libraries
WIDGETEXTRA: using LOCAL libraries
ladspa plugin support: enabled
audiounit plugin support: disabled
VST plugin support: enabled
prefix=/usr/local/Custom/audacity

Run 'configure --help' for an explanation of these options,
otherwise run 'make' to build Audacity.
$ 
$ time make result

Code: Select all

cd .. && /bin/sh ./config.status src/configunix.h
config.status: creating src/configunix.h
config.status: src/configunix.h is unchanged
make[2]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
Making all in tests
make[1]: Entering directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/tests'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/tests'
make[1]: Entering directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3'
rm -f audacity
cp src/audacity audacity
[ -e plug-ins ] || ln -s ./plug-ins
[ -e nyquist ] || ln -s ./nyquist
[ -e locale ] || ln -s po locale
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3'

real	19m50.078s
user	17m10.758s
sys	1m36.539s
$ 
The last Question:
Is there option to enable FLAC?

joseluisbz
Posts: 4
Joined: Sat Dec 09, 2017 6:58 pm
Operating System: Linux Fedora/RHEL

Re: Compiling audacity-minsrc-2.2.1 in CentOS 7

Post by joseluisbz » Mon Dec 11, 2017 9:23 am

Hi, I enabled FLAC on CentOS


Checking FLAC

Code: Select all

$ sudo yum list installed | grep flac
flac-libs.x86_64                          1.3.0-5.el7_1              @anaconda  
$ 
It is a old version!!!

Compiling with --with-libflac

The error raise!!!

Code: Select all

/usr/bin/ld: export/audacity-ExportFLAC.o: undefined reference to symbol 'FLAC__metadata_object_vorbiscomment_append_comment'
/usr/local/Custom/flac/lib/libFLAC.so.8: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2348: audacity] Error 1
make[2]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
make[1]: *** [Makefile:1585: all] Error 2
make[1]: Leaving directory '/usr/local/Sources/audacity-minsrc-2.2.1-rc3/src'
make: *** [Makefile:808: all-recursive] Error 1
Apparently this function comes from FLAC 1.3.1 version
https://xiph.org/flac/api/group__flac__ ... bject.html

How solved this? Installing a new version of FLAC

Code: Select all

$ tar xvf /usr/local/Sources/flac-1.3.2.tar.xz -C /usr/local/Sources/
$ cd /usr/local/Sources/flac-1.3.2
$ ./configure --prefix=/usr/local/Custom/flac --with-ogg=/usr/local/Custom/libogg --disable-thorough-tests
$ make
$ sudo make install
Now in configure:

Code: Select all

FLAC_CFLAGS="-I/usr/local/Custom/flac/include" FLAC_LIBS="-L/usr/local/Custom/flac/lib -lFLAC -lFLAC++" \
./configure --prefix=/usr/local/Custom/audacity --with-ffmpeg --with-lame --with-libid3tag --with-libmad --with-sbsms --with-libsndfile --with-soundtouch --with-libsoxr --with-libtwolame --with-libvorbis --with-lv2 --with-midi --with-portmidi --with-widgetextra --with-portmixer --with-portaudio=local --with-libflac --with-libvamp=local
Finally
Available Anywhere!

Code: Select all

$ sudo ln -s /usr/local/Custom/audacity/bin/audacity /usr/bin/audacity
Test
$ audacity
$ sudo sublime3 /usr/share/applications/audacity.desktop
Audacity(E).png
Audacity(E).png (103.38 KiB) Viewed 730 times

Post Reply