2

When building Audacity from source the configuration fails and prints this error:

configure: error: Could not find wx-config: is wxWidgets installed?
is wx-config in your path?

I've read the build instructions in the readme, then downloaded all the needed dependencies. The distro version is 16.04.

UPDATE

I have identified the source of the problem. I was trying to use the nonexistant Xenial repository for wxWidgets. Utopic was the latest distro listed on the repository page, so I added deb http://repos.codelite.org/wx3.0.2/ubuntu/ utopic universe to /etc/apt/sources.list.

./configure was successful. make failed, generating the follwing errors:

commands/CommandManager.cpp:115:21: fatal error: gtk/gtk.h: No such file or directory compilation terminated.

Makefile:3695: recipe for target 'commands/audacity-CommandManager.o' failed

make[2]: *** [commands/audacity-CommandManager.o] Error 1 make[2]: Leaving directory '/home/obalaban/Downloads/audacity-minsrc-2.1.2/src'

Makefile:1346: recipe for target 'all' failed

make[1]: *** [all] Error 2 make[1]: Leaving directory '/home/obalaban/Downloads/audacity-minsrc-2.1.2/src' Makefile:716: recipe for target 'all-recursive' failed

make: *** [all-recursive] Error 1

UPDATE

After following andrew.46's recommendations, my build failed yet again.

BlockFile.cpp: In function ‘void ComputeMinMax256(float*, float*, float*, int*)’:
/usr/include/wx-3.0/wx/math.h:91:31: error: ‘isnan’ was not declared in this scope
#define wxIsNaN(x) isnan(x)
^ BlockFile.cpp:339:11: note: in expansion of macro ‘wxIsNaN’

   if (wxIsNaN(summary256[3*i+2]))    
        ^

/usr/include/wx-3.0/wx/math.h:91:31: note: suggested alternative:

#define wxIsNaN(x) isnan(x)  
                         ^

BlockFile.cpp:339:11: note: in expansion of macro ‘wxIsNaN’

  if (wxIsNaN(summary256[3*i+2]))  
        ^

In file included from /usr/include/wx-3.0/wx/math.h:58:0,
from /usr/include/wx-3.0/wx/gdicmn.h:23,
from /usr/include/wx-3.0/wx/utils.h:26,
from BlockFile.cpp:51:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’

 isnan(_Tp __x)  
  ^

Makefile:2440: recipe for target 'audacity-BlockFile.o' failed
make[2]: * [audacity-BlockFile.o] Error 1
make[2]: Leaving directory '/home/obalaban/audacity-build/audacity/src'
Makefile:1362: recipe for target 'all' failed
make[1]: *
[all] Error 2
make[1]: Leaving directory '/home/obalaban/audacity-build/audacity/src'
Makefile:781: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

  • Have you added 'Sources' to your Repository list and tried with: sudo apt-get build-dep audacity? This should pick up the required -dev file... BTW release version 2.1.2 is available in the Xenial repositories, are you building the git version? – andrew.46 Aug 13 '16 at 3:21
  • I downloaded the source code from fosshub. – LostSoul Aug 13 '16 at 3:53
2

To compile Audacity under Xenial Xerus (bearing in mind that there is also a reasonable Xenial Repository version of 2.1.2 available) use the following:

Use the build dependencies:

Activate the 'Source' Repositories by following this trail:

Dash > Software & Updates > Ubuntu Software > Source Code

Click on the 'Source Code' box and allow the Repositories to reload. Then install the build dependencies and a few extras:

sudo apt-get build-dep audacity
sudo apt-get install checkinstall

Download Audacity source and build:

Use the following single command to automate the whole process:

mkdir -v $HOME/Desktop/audacity_build && cd $HOME/Desktop/audacity_build && \
wget https://github.com/audacity/audacity/archive/Audacity-2.1.2.tar.gz && \
tar xvf Audacity-2.1.2.tar.gz && cd audacity-Audacity-2.1.2 && \
./configure --without-ffmpeg && make -j 4 && \
sudo checkinstall --pakdir "$HOME/Desktop/audacity_build" \
     --backup=no --deldoc=yes --pkgname audacity --pkgversion 2.1.2 \
     --fstrans=no --deldesc=yes --delspec=yes --default

If you are interested in living on the edge a little more you could always try the git repository with a few small modifications to the code above...

Keep your version:

Not a bad idea to pin your package, since you will doubtless be experimenting with your build:

echo "audacity hold" | sudo dpkg --set-selections

And then a newer repository version will not trump your own...

Notes:

  • Compile failed against FFmpeg so it is removed from the process (./configure --without-ffmpeg). This will limit a few of the export and import capabilities of Audacity but you may not use this? Worthwhile to get to the bottom of this failure nevertheless...
  • Remembering that a simple sudo apt-get install audacity will get a decent version of Audacity 2.1.2 under Xenial Xerus...
  • I followed your instructions but the build failed. So I installed Audacity using apt. – LostSoul Aug 13 '16 at 8:22
  • @LostSoul So you get a decent copy anyway :). Can I ask what the build failure was? I tested pretty comprehensively on my own system... – andrew.46 Aug 13 '16 at 8:26
  • 1
    @LostSoul Thanks for putting the build failure details in your question. This looks like a bug that has been fixed: bugs.debian.org/cgi-bin/bugreport.cgi?bug=824264 . Are you using the Repository version of WxWidgets? If not remove your compiled version or even PPA version and install the Repository version, this works well with Audacity under Xenial... – andrew.46 Aug 13 '16 at 10:06
0

Check whether the development packages for wxWidgets are installed, these files contain header files needed to compile wxWidgets. If you have Synaptic, you can type:

libwxgtk

Look for packages that end with -dev

In these case, you could install libwxgtk3.0-dev it contains the wx-config script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.