I’m trying to build Audacity 2.2.2 on Raspbian Stretch. I have the latest code tree from github. My compiler is gcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516. I have wxWidgets installed. When configuring Audacity, I’m using the following command:
checking for lrintf... yes
checking whether C++ compiler accepts -msse... no
configure: error: Need a version of gcc with -msse
configure: error: ../../../lib-src/sbsms/configure failed for lib-src/sbsms
The -msse flag is specifc to x86 platforms. I found the following reference on the gnu.org site:
Use scalar floating-point instructions present in the SSE instruction set. This instruction set is supported by Pentium III and newer chips, and in the AMD line by Athlon-4, Athlon XP and Athlon MP chips. The earlier version of the SSE instruction set supports only single-precision arithmetic, thus the double and extended-precision arithmetic are still done using 387. A later version, present only in Pentium 4 and AMD x86-64 chips, supports double-precision arithmetic too.
For the x86-32 compiler, you must use -march=cpu-type, -msse or -msse2 switches to enable SSE extensions and make this option effective. For the x86-64 compiler, these extensions are enabled by default.
Why would failing to use an x86 flag cause my ARM-based compile to fail? I think this may be a bug.
UPDATE: While this options is not documented under configure --help for the application, there is a flag --disable-sse that will get the config and build through. I don’t know if this is the right thing to do, but it works. It would be helpful to make a note of this option on the compile page under the heading “Compiling on Unix” that can be found at http://wiki.audacityteam.org/wiki/Developing_On_Linux.
Can someone out there with deep knowledge of Audacity confirm that disabling sse on ARM (Raspberry Pi Stretch) is the correct thing to do?
I have two reasons for compiling it on Rasbian - 1) The current raspbian package is 2.1.2-2 which is two years old, and 2) what I REALLY want to do is to use mod-script-pipe so I can control Audacity functions from the command line. This plugin is not provided in the standard package. After trying for two days to compile, I’ve given up on this. So if I use the current apt build, I would need a compiled object file for mod-script-pipe. I’ve cloned the current audacity tree and reverted to the 2.1.2 tag in an attempt to compile only the object file, to no avail.
If I could find a 2.1.2 version of mod-script-pipe, I’d be done.
mod-script-pipe has been getting a lot of attention in this release, with many more commands supported, so definitely a good idea to go with the latest development code if possible. SSE is used for performance optimisations and I’d guess that compiling with SSE disabled “should” work (losing the benefits of the optimisation), but as we have now dropped official support for Windows XP, we only build and test with SSE enabled. So yes, it “should” work as far as I’m aware, but it is largely untested.
When you get it working (being optimistic ), take a look at pipeclient.py (https://github.com/audacity/audacity/blob/master/scripts/piped-work/pipeclient.py). It should work with Python 2.7 or later (Python 3 recommended) and can be imported as a module to make writing and reading to the pipe easier. Note also that the temp directory where the pipe is created is hard coded to “/tmp” (rather than using TMPDIR environmental variable).
BIG THANK YOU!!! to Steve for engaging me in this “quest.” Since the apt package of Audacity for RPi is two years old, and there’s no reference to the -msse flag before mine this week, I assume that no one is working on compiling Audacity for RPi except maybe me. So I will borrow Steve’s optimism and carry on.
Let me give you a little bit of background on WHY I want to do this. FACT ONE: I’ve been a podcaster for more than 10 years. My show has been on a hiatus for the past three years because my kids reached college age and I got distracted. But my wife and I want to get back into our show (http://catholicfamilypodcast.com). FACT TWO: RPi3 has become a pretty powerful platform with a Broadcom BCM2837 SoC with a 64-bit processor — a 1.2GHz quad-core ARM Cortex-A53 CPU that claims roughly 10 times the speed of the processor in the original model. RPi is small, efficient and can run on 12 volts DC if necessary, making it portable. I’ve used the apt version of Audacity on the RPi and the performance is pretty good. FACT THREE: Someone finally made a high quality RPI audio card with both inputs and outputs (https://blokas.io/). This creates an opportunity for creating a killer platform for podcasting on RPi. Using the standard RPi touchscreen, I want to create the ultimate podcasting platform that can be run by touch commands to record and publish a podcast. But to make it REALLY hum, I need the automation of mod-script-pipe, and to do that, I have to compile from source.
So all of this being said, I will continue down this path hoping that this community may see some value in this project which I’m happy to share with all. I’ll keep this thread here until I get past the compile phase, then move it over to the Podcasting forum. Once again, thanks for the support.
PROGRESS!! I backed off both the git repos for wxWidgets and Audacity to the last released versions of both programs (3.0.4 for wxWidgets and 3.1.2 for Audacity) and was able to compile and run successfully! At this point, I have a running version of Audacity 3.1.2 on Raspbian.
HOWEVER, there’s a problem. When I move into the mod-script-pipe directory and attempt to compile mod-script-pipe, I get an error:
ScripterCallback.cpp:16:19: fatal error: wx/wx.h: No such file or directory
Obviously, the build doesn’t know where the wx library headers are (which are in /usr/local/include/wx-3.0/wx). How can I configure the plugin to know where the wx files are?
The current source code for mod-script-pipe is here, though I don’t know if it will work with older versions of Audacity: https://github.com/audacity/audacity/tree/master/lib-src/mod-script-pipe
Because mod-script-pipe is not yet shipped with Audacity, it has quite regularly been broken and stayed that way until someone notices and fixes it. Trying to find an old version that works could be tricky. If you can get Audacity 2.3.0 alpha to build (the current development code), then the current version of mod-script-pipe should work, though not that mod-script-pipe must be built on the same day that you run ./configure for Audacity.
Run ./configure (+ options) in the root directory of the Audacity source, then cd to the mod-script-file directory and run “make” (to build mod-script-pipe), then cd back to the root of the Audacity source and run “make” again (to build Audacity).
If .configure completes without error, but building mod-script-file fails, then you may need to run
in the mod-script-file directory,
in the root directory of the Audacity source,
then go through the configure and make steps again.
There is, but scripting is currently under heavy development, so the commands are changing radically in new versions of Audacity.
Note that scripting is still classed as “experimental”, so it is subject to change without notice.
The information in the 2.2.2 manual (Scripting - Audacity Manual) should be mostly correct for recent releases, but Audacity 2.3.0 (the next release) has a lot of changes.