Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic for detecting _libc_fpstate API #1232

Merged

Conversation

abram
Copy link
Contributor

@abram abram commented Feb 15, 2022

This fixes use of the incorrect libc API on x86 64-bit Linux, which was causing OpenEXR compilation to fail on the latest 64-bit Ubuntu.

See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/sys/ucontext.h which defines two different _libc_fpstate structs inside an #ifdef __x86_64__

I will note that I haven't attempted to test this change on all platforms, but it fixed a broken compile for me and I believe it makes more sense this way. The lines of code I'm changing here came from #798 and were copied from https://github.com/void-linux/void-packages/blob/80bbc168faa25448bd3399f4df331b836e74b85c/srcpkgs/ilmbase/patches/musl-_fpstate.patch.

If @pullmoll (original author of the Void Linux patch) has any comment I would appreciate it!

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 15, 2022

CLA Signed

The committers are authorized under a signed CLA.

This fixes use of the incorrect API on x86 64-bit Linux, which was causing OpenEXR compilation to fail on the latest 64-bit Ubuntu.

See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/sys/ucontext.h which defines two different `_libc_fpstate` structs inside an `#ifdef __x86_64__`

Signed-off-by: Abe Fettig <[email protected]>
@abram abram force-pushed the libc_fpstate-64bit-fix branch from 458760e to 23456de Compare February 17, 2022 03:31
@cary-ilm
Copy link
Member

I'm not able to validate the behavior either, although it seems reasonable, so let's go with it until proven otherwise.

@cary-ilm cary-ilm merged commit 383d3a0 into AcademySoftwareFoundation:main Mar 17, 2022
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Apr 2, 2022
…1232)

This fixes use of the incorrect API on x86 64-bit Linux, which was causing OpenEXR compilation to fail on the latest 64-bit Ubuntu.

See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/sys/ucontext.h which defines two different `_libc_fpstate` structs inside an `#ifdef __x86_64__`

Signed-off-by: Abe Fettig <[email protected]>
Signed-off-by: Cary Phillips <[email protected]>
@cary-ilm cary-ilm mentioned this pull request Apr 2, 2022
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Apr 2, 2022
…1232)

This fixes use of the incorrect API on x86 64-bit Linux, which was causing OpenEXR compilation to fail on the latest 64-bit Ubuntu.

See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/sys/ucontext.h which defines two different `_libc_fpstate` structs inside an `#ifdef __x86_64__`

Signed-off-by: Abe Fettig <[email protected]>
Signed-off-by: Cary Phillips <[email protected]>
cary-ilm pushed a commit that referenced this pull request Apr 7, 2022
This fixes use of the incorrect API on x86 64-bit Linux, which was causing OpenEXR compilation to fail on the latest 64-bit Ubuntu.

See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/sys/ucontext.h which defines two different `_libc_fpstate` structs inside an `#ifdef __x86_64__`

Signed-off-by: Abe Fettig <[email protected]>
Signed-off-by: Cary Phillips <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants