Bug 1383552 - OpenEXR FTBFS against glibc-2.24.90+
Summary: OpenEXR FTBFS against glibc-2.24.90+
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ilmbase
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-11 02:00 UTC by Luya Tshimbalanga
Modified: 2016-10-21 16:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-16 15:03:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1387415 0 medium CLOSED glibc: iszero macro defined in <math.h> breaks existing code 2021-02-22 00:41:40 UTC

Internal Links: 1387415

Description Luya Tshimbalanga 2016-10-11 02:00:03 UTC
Description of problem:
Koschei reported the recent change from glibc cause failure to build application like Blender with OpenEXR. Here is the build log result from October 3 and onward:
https://kojipkgs.fedoraproject.org/work/tasks/1403/15951403/build.log

https://apps.fedoraproject.org/koschei/package/blender

Version-Release number of selected component (if applicable):
2.2.0

How reproducible:
See Koschei report on blender:
http://koji.fedoraproject.org/koji/buildinfo?buildID=715866

Steps to Reproduce:
1. Attempt to rebuilt Blender on Rawhide
2.
3.

Actual results:
Failure due to the change from glibc

Expected results:
OpenEXC should not generate error

Additional info:

Comment 1 Florian Weimer 2016-10-11 07:11:58 UTC
Out of curiosity, why do you think this is not a glibc bug?

Comment 2 Rex Dieter 2016-10-11 13:11:56 UTC
Some of the errors, include:

/usr/include/OpenEXR/ImathFun.h:135:1: error: 'Imath_2_2::iszero' declared as an 'inline' variable
 iszero (T a, T t)
 ^~~~~~
/usr/include/OpenEXR/ImathFun.h:137:5: error: expected primary-expression before 'return'
     return (IMATH_INTERNAL_NAMESPACE::abs (a) <= t) ? 1 : 0;
     ^~~~~~
/usr/include/OpenEXR/ImathFun.h:137:5: error: expected '}' before 'return'
/usr/include/OpenEXR/ImathFun.h:137:5: error: expected ';' before 'return'
/usr/include/OpenEXR/ImathFun.h: In function 'bool finitef(float)':
/usr/include/OpenEXR/ImathFun.h:249:1: error: ambiguating new declaration of 'bool finitef(float)'
 finitef (float f)
/usr/include/OpenEXR/ImathFun.h: In function 'bool finited(double)':
/usr/include/OpenEXR/ImathFun.h:260:22: error: 'Int64' does not name a type
     union {double d; Int64 i;} u;
                      ^~~~~
/usr/include/OpenEXR/ImathFun.h:263:15: error: 'union finited(double)::<anonymous>' has no member named 'i'
     return (u.i & 0x7ff0000000000000LL) != 0x7ff0000000000000LL;
               ^
/usr/include/OpenEXR/ImathFun.h: At global scope:
/usr/include/OpenEXR/ImathFun.h:267:1: error: expected declaration before '}' token
 IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
 ^

something definitely going bad there, but my guess would be a simple rebuild won't help this (can't hurt to try though)

Comment 3 Rex Dieter 2016-10-11 14:37:47 UTC
Not surprising, rebuild failed with similar errors,

https://koji.fedoraproject.org/koji/taskinfo?taskID=16048818

it would appear that at leaset some glibc math-related functions changed behavior

Comment 4 Rex Dieter 2016-10-11 14:46:58 UTC
adjusting summary

Comment 5 Kevin Kofler 2016-10-12 01:45:54 UTC
I guess this is namespace pollution from glibc macros. As workarounds, you can try:
#undef iszero
or replacing iszero with (iszero) to avoid the function-like macro expansion.

The later errors are probably collateral damage from the parse errors caused by the accidental macro expansion.

Comment 6 Rex Dieter 2016-10-16 14:41:21 UTC
Trying minimalistic (iszero) approach first... (and fyi, the offending header is in ilmbase, a dependency of OpenEXR)

Comment 7 Rex Dieter 2016-10-16 15:03:16 UTC
%changelog
* Sun Oct 16 2016 Rex Dieter <rdieter> - 2.2.0-6
- workaround glibc iszero macro (#1383552)

Comment 8 Florian Weimer 2016-10-21 16:42:36 UTC
glibc-2.24.90-12.fc26 (available in a couple of hours) should no longer need the workaround.


Note You need to log in before you can comment on or make changes to this bug.