Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834628 - dev-libs/imath-3.1.4-r3 fails to build on x86 because of missing intrinsics _cvtss_sh/_cvtsh_ss
Summary: dev-libs/imath-3.1.4-r3 fails to build on x86 because of missing intrinsics _...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Bernd
URL: https://github.com/AcademySoftwareFou...
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2022-03-05 15:35 UTC by bzoloid
Modified: 2022-03-16 22:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (emerge.log,13.19 KB, text/plain)
2022-03-05 15:35 UTC, bzoloid
Details
emerge --info (emerge-info.txt,6.66 KB, text/plain)
2022-03-05 15:36 UTC, bzoloid
Details
Patch fixing the issue (imath_f16c.patch,291 bytes, patch)
2022-03-05 15:38 UTC, bzoloid
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bzoloid 2022-03-05 15:35:02 UTC
On x86 targets that support f16c (ivybridge in my case), dev-libs/imath tries to use the intrinsics _cvtss_sh/_cvtsh_ss because __F16C__ is defined, but only includes the intrinsics header when __x86_64__ is defined.


Reproducible: Always

Steps to Reproduce:
1. Compile dev-libs/imath-3.1.4-r3 on x86 arch with f16c support

Actual Results:  
Compilation error: '_cvtsh_ss' was not declared in this scope
(see emerge.log)

Expected Results:  
Successful compilation.
Comment 1 bzoloid 2022-03-05 15:35:53 UTC
Created attachment 766358 [details]
Build log
Comment 2 bzoloid 2022-03-05 15:36:58 UTC
Created attachment 766359 [details]
emerge --info
Comment 3 bzoloid 2022-03-05 15:38:28 UTC
Created attachment 766360 [details, diff]
Patch fixing the issue

Attached a patch fixing the issue on my side.
Comment 4 Larry the Git Cow gentoo-dev 2022-03-16 22:35:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69ac80abe1f3e048a17c956017a9b1a32ef4cf4c

commit 69ac80abe1f3e048a17c956017a9b1a32ef4cf4c
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2022-03-06 09:17:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-03-16 22:33:26 +0000

    dev-libs/imath: add header for f16c instructions on x86
    
    On x86 targets supporting the f16c instructions, a header for the
    __cvtss_sh / __cvtsh_ss intrinsics is missing, leading to a build
    failure.
    
    Reported-by: bzoloid <bzoloid@gmail.com>
    Bug: https://github.com/AcademySoftwareFoundation/Imath/issues/239
    Closes: https://bugs.gentoo.org/834628
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/24612
    Signed-off-by: Sam James <sam@gentoo.org>

 ...alf.h-include-intrinsics-for-f16c-capable.patch | 26 ++++++++
 dev-libs/imath/imath-3.1.4-r4.ebuild               | 74 ++++++++++++++++++++++
 2 files changed, 100 insertions(+)