Bugzilla – Bug 221
Configure failure on Ubuntu 10.10 and Gentoo "Your version of portaudio does not include required functions"
Last modified: 2018-08-20 11:54:02 UTC
See http://audacity.238276.n2.nabble.com/audacity-trunk-fails-to-build-tp5417386p5419334.html and http://audacity.238276.n2.nabble.com/configure-error-on-Ubuntu-10-10-td5495951.html#a5495951 (Build logs available there) configure failed for lib-src/portmixer Benjamin Drung gets this problem on Ubuntu 10.10 and says there is no system port audio version nor other portmixer headers installed. Richard thinks it's an Audacity problem which only shows up with very recent toolchains (maybe GCC-version sensitive). The problem has been reported as a Gentoo bug as well. The speculation there was that some change in recent GCC had broken one of the autoconf macros we use in the portmixer configure script (AC_EGREP_HEADERS?).
We have found the reason for the failing AC_EGREP_HEADER: gcc 4.5 changed the behavior: If a header named in a #include directive is not found, the compiler exits immediately. This avoids a cascade of errors arising from declarations expected to be found in that header being missing. The configure script checks the existence of PaMacCore_GetStreamInputDevice in pa_mac_core.h, which is used in src/px_mac_coreaudio.c. Afterwards it checks if src/px_mac_coreaudio.c should be built. On Ubuntu, we don't want to build src/px_mac_coreaudio.c and we don't have the required AudioUnit/AudioUnit.h header, which leads to this bug. The fix (suggested by Matthias) is to only run the AC_EGREP_HEADER test, if you build src/px_mac_coreaudio.c. This means to change the order of AC_CHECK_HEADERS and AC_EGREP_HEADER in configure.ac.
You can find more details in the Ubuntu bug: https://launchpad.net/bugs/629955
Created attachment 44 [details] configure.ac.patch Here is my patch for switching the order. After applying the patch you have to run autoreconf in lib-src/portmixer.
Created attachment 45 [details] configure.ac_v2.patch Here's the patch made with svn (-p0 instead of -p1).
Fixed by http://code.google.com/p/audacity/source/detail?r=10699. Unless anyone has any other input I think we can just move it to "RESOLVED - FIXED".
Created attachment 46 [details] autoreconf.patch One thing is missing. The configure files needs to be regenerated by running autoreconf. You can use the attached patch if you don't have autoreconf installed on your system. I wrote that to the mailing list two days ago, but I don't find the mail in the archive [1]. [1] http://sourceforge.net/mailarchive/forum.php?forum_name=audacity-devel
(In reply to comment #6) autoreconf.patch applied.
Benjamin, can we resolve this fixed or do you want to retest (which you can't do due to the portaudio build problem: http://audacity.238276.n2.nabble.com/audacity-trunk-fails-to-build-on-Ubuntu-tp5602646p5602646.html ) ?
Yes, this bug is fixed. I was able to successfully build audacity revision 10703 on Ubuntu 10.10 (maverick).