math.c broken on i386, when compiling with -O1 -C

Bug #1714514 reported by Dimitri John Ledkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
frama-c (Ubuntu)
Fix Released
Critical
Unassigned
glibc (Ubuntu)
Invalid
Wishlist
Unassigned
jemalloc (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

# cat <<EOF >math.c
#include <math.h>
int main() {return 0;}
EOF

# gcc -C -O1 math.c

expected, no output, exit code 0, like on amd64.

Actual is exit code 1 with output:

In file included from /usr/include/math.h:472:0,
                 from math.c:1:
/usr/include/i386-linux-gnu/bits/mathinline.h: In function 'floor':
/usr/include/i386-linux-gnu/bits/mathinline.h:746:1: error: expected ':' or ')' before string constant
 __inline_mathcodeNP (floor, __x, \
 ^
/usr/include/i386-linux-gnu/bits/mathinline.h: In function 'floorf':
/usr/include/i386-linux-gnu/bits/mathinline.h:746:1: error: expected ':' or ')' before string constant
 __inline_mathcodeNP (floor, __x, \
 ^
/usr/include/i386-linux-gnu/bits/mathinline.h: In function 'floorl':
/usr/include/i386-linux-gnu/bits/mathinline.h:746:1: error: expected ':' or ')' before string constant
 __inline_mathcodeNP (floor, __x, \
 ^
/usr/include/i386-linux-gnu/bits/mathinline.h: In function 'ceil':
/usr/include/i386-linux-gnu/bits/mathinline.h:764:1: error: expected ':' or ')' before string constant
 __inline_mathcodeNP (ceil, __x, \
 ^
/usr/include/i386-linux-gnu/bits/mathinline.h: In function 'ceilf':
/usr/include/i386-linux-gnu/bits/mathinline.h:764:1: error: expected ':' or ')' before string constant
 __inline_mathcodeNP (ceil, __x, \
 ^
/usr/include/i386-linux-gnu/bits/mathinline.h: In function 'ceill':
/usr/include/i386-linux-gnu/bits/mathinline.h:764:1: error: expected ':' or ')' before string constant
 __inline_mathcodeNP (ceil, __x, \
 ^

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

frama-c package, compiles jemalloc with '-C' in CPPFLAGS and thus ftbfs.
Will try to fix frama-c to not use '-C' when compiling jemalloc sub-component.
'-C' is not default CPPFLAG for jemalloc.

Changed in glibc (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in jemalloc (Ubuntu):
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → Medium
tags: added: ftbfs
tags: added: i386
tags: added: i386mustdie
tags: added: 32bitmustdie
Changed in frama-c (Ubuntu):
importance: Undecided → Critical
status: New → Triaged
Changed in jemalloc (Ubuntu):
importance: Medium → Wishlist
Revision history for this message
Adam Conrad (adconrad) wrote :

This sort of seems like a classic case of "don't do that, then"?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package frama-c - 20170501+phosphorus+dfsg-1ubuntu1

---------------
frama-c (20170501+phosphorus+dfsg-1ubuntu1) artful; urgency=medium

  * Do not use '-C' CPPFLAG when compiling jemalloc, as math.h bombs out
    with -C on i386. LP: #1714514

 -- Dimitri John Ledkov <email address hidden> Thu, 31 Aug 2017 23:47:37 +0100

Changed in frama-c (Ubuntu):
status: Triaged → Fix Released
description: updated
description: updated
description: updated
summary: - math.c broken on i386, when compiling with -O2 -C
+ math.c broken on i386, when compiling with -O1 -C
Changed in glibc (Ubuntu):
importance: High → Wishlist
Changed in jemalloc (Ubuntu):
status: Triaged → Invalid
Changed in glibc (Ubuntu):
status: Triaged → Invalid
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.