Error installing Audacity 2.0.4 in Ubuntu 10.04

I followed the instructions at

to install the latest version of Audacity but I am getting an error message after I type

sudo make install



make[1]: Entering directory /home/jch/audacity-read-only/src' g++ -c -I../lib-src/portmixer/include -Wall -I/usr/lib/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/jch/audacity-read-only/lib-src/lib-widget-extra -I../lib-src/libsoxr/src -I../lib-src/sbsms/include -I/usr/include/soundtouch -I../lib-src/libnyquist -I../lib-src/portsmf -I../lib-src/portaudio-v19/include -fno-strict-aliasing -I./include -I. -DLIBDIR="/usr/local//lib" -D__STDC_CONSTANT_MACROS -Wall -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 export/ExportPCM.cpp -o export/ExportPCM.o export/ExportPCM.cpp: In member function ‘bool ExportPCM::AddStrings(AudacityProject*, SNDFILE*, Tags*, int)’: export/ExportPCM.cpp:740: error: ‘SF_STR_GENRE’ was not declared in this scope export/ExportPCM.cpp:764: error: ‘SF_STR_TRACKNUMBER’ was not declared in this scope make[1]: *** [export/ExportPCM.o] Error 1 make[1]: Leaving directory /home/jch/audacity-read-only/src’
make: *** [audacity] Error 2

I thought perhaps I didn’t have the right version of libwxgtk or python-wxgtk, and indeed the latter was not installed, but even after I installed python-wxgtk2.8 I received the same error. I’m relatively new to compiling, so could someone advise me what to do? I had been using an earlier version of Audacity, which I uninstalled before attempting to install this version.

Follow these steps instead:
http://wiki.audacityteam.org/wiki/CompilingAudacityForBeginners#simple .


Gale

Hi, Gale,

These are the steps I followed:

sudo apt-get install subversion
svn checkout http://audacity.googlecode.com/svn/audacity-src/trunk/ audacity-read-only
sudo apt-get build-dep audacity
#sudo apt-get install cmake [cmake was already installed, so I skipped this step]
cd audacity-read-only
./configure
sudo make install

I also installed python-wxgtk2.8. Everything seemed to work until the last command, sudo make install. Is there another process I should follow on this page? For example, do I need to install and run autogen?

Is it 64-bit Ubuntu?

Try:

sudo make clean
svn up
./configure
make dep
sudo make install

Any reason not to update to a modern version of Ubuntu?


Gale

I tried your commands and after “sudo make install” it returned what appears to be the same error as before:

export/ExportFLAC.cpp -o export/ExportFLAC.o
g++ -c -I../lib-src/portmixer/include   -Wall -I/usr/lib/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/jch/audacity-read-only/lib-src/lib-widget-extra          -I../lib-src/libsoxr/src -I../lib-src/sbsms/include -I/usr/include/soundtouch   -I../lib-src/libnyquist            -I../lib-src/portsmf -I../lib-src/portaudio-v19/include  -fno-strict-aliasing -I./include -I. -DLIBDIR="/usr/local//lib" -D__STDC_CONSTANT_MACROS   -Wall -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12     export/ExportPCM.cpp -o export/ExportPCM.o
export/ExportPCM.cpp: In member function ‘bool ExportPCM::AddStrings(AudacityProject*, SNDFILE*, Tags*, int)’:
export/ExportPCM.cpp:740: error: ‘SF_STR_GENRE’ was not declared in this scope
export/ExportPCM.cpp:764: error: ‘SF_STR_TRACKNUMBER’ was not declared in this scope
make[1]: *** [export/ExportPCM.o] Error 1
make[1]: Leaving directory `/home/jch/audacity-read-only/src'
make: *** [audacity] Error 2

I’m using 32-bit Ubuntu. I’ve been reluctant to upgrade to Ubuntu 12.04 because of the new GUI and the fact that I have a dual boot with Windows XP using an early version of Grub, so my understanding is I’d have to do some manual installation to keep the dual boot working the way it’s been set up.

In the meantime, Audacity 2.0.3 appears to install without a hitch; perhaps this is the best solution since I’m using an old version of Ubuntu? The reason I wanted to upgrade from Audacity 1.3.12-2 was to make use of keyboard shortcuts for the Effects menu, and I’m hoping 2.0.3 will offer that. If you have other suggestions for installing 2.0.4, though, I’m happy to try them.

I would guess the compilation problem is due to the additional support for WAV metadata that came in with 2.0.4 - perhaps another include is wanted. I’ll see if I can find anything out.

2.0.3 includes the effects shortcuts though import and export of those shortcuts is broken in 2.0.3 (but fixed in 2.0.4).


Gale

One other thing you could try - clean out remnants of any previous attempt (or actual) Audacity installation and start again:

If you have ever had the repository version of Audacity installed, use Synaptic to reinstall it, then use Synaptic to “completely remove” it.
Then, delete the audacity-read-only directory.
Then open a new terminal window and run the following commands:

svn checkout http://audacity.googlecode.com/svn/audacity-src/trunk/ audacity-read-only
sudo apt-get build-dep audacity

Check the terminal output at this point - there should be nothing to install because all dependencies should be already present - check that is true, and install any missing dependencies if necessary.

cd audacity-read-only
./configure |tee configuration.log

You will probably see a lot of “warnings” but there should be no “errors”. The “|tee configuration.log” creates a copy of the terminal output so that you can open it in a text editor and easily search for the word “error”.

make |tee build.log

Again the “tee” command allows you to easily search for the first occurrence of the word “error”. You may find references such as “ErrorDialog.o” within this file, but there should be no error messages.

Assuming that there are no errors (fingers crossed):

./audacity

Audacity should launch. If it does, then you are good to install:

sudo make install

Steve,
Thanks for your suggestions. I have attempted your instructions, including re-installing the repository version of Audacity and then removing it completely (and I also uninstalled Audacity 2.0.3 from the command line). Everything worked fine until

make |tee build.log

when I encountered an error, which is the same error I’ve had before:

export/ExportFLAC.cpp -o export/ExportFLAC.o 
g++ -c -I../lib-src/portmixer/include   -Wall -I/usr/lib/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/jch/audacity-read-only/lib-src/lib-widget-extra          -I../lib-src/libsoxr/src -I../lib-src/sbsms/include -I/usr/include/soundtouch   -I../lib-src/libnyquist            -I../lib-src/portsmf -I../lib-src/portaudio-v19/include  -fno-strict-aliasing -I./include -I. -DLIBDIR="/usr/local//lib" -D__STDC_CONSTANT_MACROS   -Wall -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12     export/ExportPCM.cpp -o export/ExportPCM.o 
export/ExportPCM.cpp: In member function ‘bool ExportPCM::AddStrings(AudacityProject*, SNDFILE*, Tags*, int)’: 
export/ExportPCM.cpp:740: error: ‘SF_STR_GENRE’ was not declared in this scope 
export/ExportPCM.cpp:764: error: ‘SF_STR_TRACKNUMBER’ was not declared in this scope 
make[1]: *** [export/ExportPCM.o] Error 1 
make[1]: Leaving directory `/home/jch/audacity-read-only/src' 
make: *** [audacity] Error 2

The build log itself showed no error that I could find, but I’ll include it in this post for reference.
I was stopped at this point because when I typed

./audacity

it said “no such file or directory.”
I’m satisfied to use Audacity 2.0.3 as long as I have Ubuntu 10.04; the next time I upgrade Audacity it looks like I’ll have to upgrade Ubuntu as well.
build.log (391 KB)

What version of libsndfile do you have?

I think that’s the problem.
‘SF_STR_GENRE’ and ‘SF_STR_TRACKNUMBER’ are defined in libsndfile. They were introduced 1n 2010, which looks like it was an update to libsndfile1 version 1.0.23. If you are still on Lucid then you’ve probably got libsndfile1 version 1.0.21-2 and there are no later versions in the Ubuntu repositories until Ubuntu Precise.

Building libsndfile is not normally required because it is included in virtually all Linux distributions. The source code is included with Audacity but I note that in the README it says:
“Wherever possible, you should use the packages supplied by your Linux distribution.”

What I don’t know is whether building and installing the current 1.0.25 version of libsndfile will break anything else on your machine - there’s a lot of programs that are dependent on libsndfile. Let me know if you want to take the chance.

You are correct: I have libsndfile1 1.0.21-2.

Is there a way to know what programs are dependent on this package? That would give me an idea whether I’d want to build the newer version.

Yes, and there’s loads of stuff.
Open Synaptic package manager and select libsndfile for removal. Before Synaptic removes it you will be asked if you also want to remove …(a load of other applications).
After seeing the list - back out of the changes (cancel the operation).

You know that you shouldn’t really be still on Lucid as it became obsolete last May :wink: What is it that’s putting you off upgrading to a supported OS? Is it the Unity Desktop?
One possible approach would be to back up all of your data, have a go at updating libsndfile, and if you trash your machine, install a new OS :wink:

I see there are many programs I use that depend on libsndfile, so I don’t want to try to change this file at this point. I’ve put off upgrading Ubuntu partly because of the new Unity desktop, and partly because I have a dual boot with Windows XP (another obsolete OS, I know!) using an old version of Grub, and I would have to go through a manual process of installation in order to maintain my dual boot. Since all the programs I’m currently using still work in 10.04, I haven’t taken the 3 days or so that I would probably need to upgrade and configure the new OS the way I’d want. I expect I’ll have to upgrade sometime in the next year, but I’m putting it off as long as I can.

I was put off by Unity desktop. I tried it when it first came out and I don’t like the “App” look. If I want Apps I’ll get a smart phone. I switched to Debian, and I love it :smiley:
I’ve also tried Mint with the MATE desktop - if you like the old Gnome 2 desktop then MATE is a good option. I’m currently running Gnome 3 on Debian but I might give MATE a go at some point. (I sometimes feel sorry for users that are confined to the “like it or lump it” approach of other OS’s :wink:)

That was my last Windows OS before I upgraded to Linux, and probably my favourite MS OS. I still have an old XP box that I occasionally use for testing, and I have XP installed as a virtual machine on my main Linux laptop (using Virtualbox). XP runs pretty well in Virtualbox - a little slower than on real hardware, but my laptop is quite old and does not have hardware virtualization. It should run fantastically on an i3 or i5 processor.


That should not be too much of a problem.
If you delete your old Linux partitions before re-installing (you could use a Live CD to do that) then you should be able to install Linux into the free space and simply overwrite the old version of Grub with the current version. Advanced installers such as Ubuntu and Mint should make that quite a painless process.

Always best not to rush these things :wink:

Thanks for the other desktop suggestions–I will definitely check them out when I take the plunge and upgrade. I appreciate all the support you provide for Audacity.

If you don’t care about the WAV metadata you could also try reverting src/export/ExportPCM.cpp to r12243 ( http://code.google.com/p/audacity/source/detail?r=12243 ) that is, the version before the one where these changes were added.

rm src/export/ExportPCM.cpp
svn up -r 12243 src/export/ExportPCM.cpp

Gale