audacity 1.3.12-5 FTBFS on maverick

Bug #629955 reported by Benjamin Drung
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Audacity
Fix Released
Unknown
Gentoo Linux
Fix Released
Medium
audacity (Debian)
Fix Released
Unknown
audacity (Ubuntu)
Fix Released
High
Unassigned
gcc-4.5 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: audacity

audacity 1.3.12-5 fails to build from source on maverick:

configure failed for lib-src/portmixer

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?).

Full build log: http://launchpadlibrarian.net/53254262/buildlog_ubuntu-maverick-amd64.audacity_1.3.12-5_FAILEDTOBUILD.txt.gz

Tags: ftbfs
Revision history for this message
In , Gale (gale) wrote :

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?).

Benjamin Drung (bdrung)
Changed in audacity (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Benjamin Drung (bdrung)
affects: gcc-4.5 (Debian) → audacity (Debian)
Revision history for this message
Matthias Klose (doko) wrote :

what is the issues here with gcc-4.5?

Changed in gcc-4.5 (Ubuntu):
status: New → Incomplete
Revision history for this message
Benjamin Drung (bdrung) wrote :

audacity 1.3.12-5 builds on lucid (gcc-4.4), but not on maverick (gcc-4.5). It's either a direct or indirect issue of the newer gcc. According to the Gentoo bug tracker, the build failure could be caused by a changed behavior which will break the AC_EGREP_HEADERS macro.

Benjamin Drung (bdrung)
tags: added: ftbfs
Benjamin Drung (bdrung)
description: updated
Revision history for this message
Benjamin Drung (bdrung) wrote :

I was able to limit the error to one command in lib-src/portmixer/configure.ac:

AC_EGREP_HEADER([PaMacCore_GetStreamInputDevice], [pa_mac_core.h], , [have_support=no])

Revision history for this message
Benjamin Drung (bdrung) wrote :

Attached a very small testcase that triggers this issue. Extract the testcase tarball and run

autoreconf
./configure

The testcase fails if it shows the warning "Missing support in pa_mac_core.h".

Changed in audacity (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Matthias Klose (doko) wrote :

comparing the two config.log files, when run with 4.3 and 4.4:

@@ -140,15 +143,17 @@
 configure:2927: checking for egrep
 configure:2989: result: /bin/grep -E
 configure:2994: checking for ANSI C header files
-configure:3014: gcc-4.3 -c -g -O2 conftest.c >&5
+configure:3014: gcc -c -g -O2 conftest.c >&5
 configure:3014: $? = 0
-configure:3087: gcc-4.3 -o conftest -g -O2 conftest.c >&5
+configure:3087: gcc -o conftest -g -O2 conftest.c >&5
 configure:3087: $? = 0
 configure:3087: ./conftest
 configure:3087: $? = 0
 configure:3098: result: yes
 In file included from conftest.c:10:
-./pa_mac_core.h:46:33: error: AudioUnit/AudioUnit.h: No such file or directory
+./pa_mac_core.h:46: fatal error: AudioUnit/AudioUnit.h: No such file or directory
+compilation terminated.
+configure:3136: WARNING: "Missing support in pa_mac_core.h"
 configure:3279: creating ./config.status

 ## ---------------------- ##

I cannot find the AudioUnit/AudioUnit.h file in any case, so the test should fail in both cases, even when using gcc-4.3.

gcc-4.4 prints an extra line "compilation terminated.", which lets the test fail. Not yet sure why ...

Revision history for this message
Matthias Klose (doko) wrote :

comparing the config log 4.4/sid with 4.4/maverick:

@@ -139,16 +143,18 @@
 configure:2927: checking for egrep
 configure:2989: result: /bin/grep -E
 configure:2994: checking for ANSI C header files
-configure:3014: gcc-4.4 -c -g -O2 conftest.c >&5
+configure:3014: gcc -c -g -O2 conftest.c >&5
 configure:3014: $? = 0
-configure:3087: gcc-4.4 -o conftest -g -O2 conftest.c >&5
+configure:3087: gcc -o conftest -g -O2 conftest.c >&5
 configure:3087: $? = 0
 configure:3087: ./conftest
 configure:3087: $? = 0
 configure:3098: result: yes
 In file included from conftest.c:10:
-./pa_mac_core.h:46:33: error: AudioUnit/AudioUnit.h: No such file or directory
-configure:3276: creating ./config.status
+./pa_mac_core.h:46: fatal error: AudioUnit/AudioUnit.h: No such file or directory
+compilation terminated.
+configure:3136: WARNING: "Missing support in pa_mac_core.h"
+configure:3279: creating ./config.status

 ## ---------------------- ##
 ## Running config.status. ##

Revision history for this message
Matthias Klose (doko) wrote :

upstream GCC behaviour, however this seems to be part of the Linaro changes:

Debian unstable:
$ gcc-4.4 -E pa_mac_core.h | wc -l
pa_mac_core.h:46:33: error: AudioUnit/AudioUnit.h: No such file or directory
29

$ gcc-4.4 -E pa_mac_core.h | wc -l
pa_mac_core.h:46: fatal error: AudioUnit/AudioUnit.h: No such file or directory
compilation terminated.
4

$ gcc-4.5 -E pa_mac_core.h | wc -l
pa_mac_core.h:46:33: fatal error: AudioUnit/AudioUnit.h: No such file or directory
compilation terminated.
4

Announced as change in GCC-4.5:

that's in gcc-4.5 changes: 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.

Revision history for this message
Matthias Klose (doko) wrote :

the configure check should only run the test, if the included file is available.

Changed in gcc-4.5 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Benjamin Drung (bdrung) wrote :

To sum up the discussion on IRC:

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.

The fix (suggested by Matthias) is to only run the AC_EGREP_HEADER test, if you build src/px_mac_coreaudio.c.

Revision history for this message
In , G-benjamin (g-benjamin) wrote :

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.

Revision history for this message
In , G-benjamin (g-benjamin) wrote :

You can find more details in the Ubuntu bug: https://launchpad.net/bugs/629955

Benjamin Drung (bdrung)
Changed in audacity (Ubuntu):
milestone: none → ubuntu-10.10
Revision history for this message
In , G-benjamin (g-benjamin) wrote :

Created attachment 44
configure.ac.patch

Here is my patch for switching the order. After applying the patch you have to run autoreconf in lib-src/portmixer.

Benjamin Drung (bdrung)
Changed in audacity (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package audacity - 1.3.12-7

---------------
audacity (1.3.12-7) experimental; urgency=low

  * Fix interchanged bug numbers from previous upload.
  * Support FFmpeg >= 0.6 (Closes: #593162, LP: #602934).

audacity (1.3.12-6) unstable; urgency=low

  * Build with jack on all architectures (Due to a bug, jack was already
    enabled on all architectures except on i386, amd64, powerpc).
  * Fix build failure with GCC 4.5 (Closes: #564865, LP: #629955).
 -- Benjamin Drung <email address hidden> Wed, 22 Sep 2010 02:37:52 +0200

Changed in audacity (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
In , G-benjamin (g-benjamin) wrote :

Created attachment 45
configure.ac_v2.patch

Here's the patch made with svn (-p0 instead of -p1).

Revision history for this message
In , Gale (gale) wrote :

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".

Revision history for this message
In , G-benjamin (g-benjamin) wrote :

Created attachment 46
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

Revision history for this message
In , Vaughan-audacityteam (vaughan-audacityteam) wrote :

(In reply to comment #6)

autoreconf.patch applied.

Revision history for this message
In , Gale (gale) wrote :

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 ) ?

Revision history for this message
In , G-benjamin (g-benjamin) wrote :

Yes, this bug is fixed. I was able to successfully build audacity revision 10703 on Ubuntu 10.10 (maverick).

Changed in audacity (Debian):
status: Unknown → Fix Released
Changed in gentoo:
status: Unknown → Fix Released
Changed in gentoo:
importance: Unknown → Medium
Changed in audacity:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.