Hi everyone I’ve been debugging the opencolorio package for a day or two now and I’ve come up with some findings
gcc march=native causes a UB bug causing tests to fail, this only happens on x64 v3 and v4 to my knowledge.
clang march=native works flawlessly
besides using clang stdenv instead I wanted to ask how or if its possible to set meta.broken for only gcc on archs that are x64 v3 or v4. I looked at the docs and couldn’t figure out a good way to do it.
opened 05:19PM - 14 Apr 25 UTC
0.kind: build failure
### Nixpkgs version
- Unstable (25.05)
### Steps to reproduce
Build with `gcc… .arch = "alderlake"` and `gcc.tune = "alderlake"` or other.
### Can Hydra reproduce this build failure?
No, Hydra cannot reproduce this build failure.
### Link to Hydra build job
_No response_
### Relevant log output
```console
8 tests failed with 33 errors 21 skips.
Start 9: test_cpu_avx512
9/10 Test #9: test_cpu_avx512 .................. Passed 0.00 sec
Start 10: test_python
10/10 Test #10: test_python ...................... Passed 0.35 sec
30% tests passed, 7 tests failed out of 10
Total Test time (real) = 10.73 sec
The following tests FAILED:
2 - test_cpu (Failed)
3 - test_cpu_no_accel (Failed)
4 - test_cpu_sse2 (Failed)
5 - test_cpu_avx (Failed)
6 - test_cpu_avx+f16c (Failed)
7 - test_cpu_avx2 (Failed)
8 - test_cpu_avx2+f16c (Failed)
Errors while running CTest
make: *** [Makefile:71: test] Error 8
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:123:
FAILED: Index: 17 - Values: 0.896949828 and: 0.896951199 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:123:
FAILED: Index: 21 - Values: 1.10895336 and: 1.10895324 - Threshold: 1.00000001e-07
[ 694/1098] [GammaOpCPU / apply_basic_style_fwd ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:187:
FAILED: Index: 16 - Values: 0.830311298 and: 0.830311418 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:187:
FAILED: Index: 17 - Values: 0.976092517 and: 0.976092875 - Threshold: 1.00000001e-07
[ 695/1098] [GammaOpCPU / apply_basic_style_rev ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:279:
FAILED: Index: 17 - Values: 0.896949828 and: 0.896951199 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:279:
FAILED: Index: 21 - Values: -0.896949828 and: -0.896951199 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:279:
FAILED: Index: 25 - Values: 1.10895336 and: 1.10895324 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:279:
FAILED: Index: 29 - Values: -1.10895336 and: -1.10895324 - Threshold: 1.00000001e-07
[ 696/1098] [GammaOpCPU / apply_basic_mirror_style_fwd ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:370:
FAILED: Index: 16 - Values: 0.830311298 and: 0.830311418 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:370:
FAILED: Index: 17 - Values: 0.976092517 and: 0.976092875 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:370:
FAILED: Index: 20 - Values: -0.830311298 and: -0.830311418 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:370:
FAILED: Index: 21 - Values: -0.976092517 and: -0.976092875 - Threshold: 1.00000001e-07
[ 697/1098] [GammaOpCPU / apply_basic_mirror_style_rev ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:449:
FAILED: Index: 17 - Values: 0.896949828 and: 0.896951199 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:449:
FAILED: Index: 25 - Values: 1.10895336 and: 1.10895324 - Threshold: 1.00000001e-07
[ 698/1098] [GammaOpCPU / apply_basic_pass_thru_style_fwd ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:528:
FAILED: Index: 16 - Values: 0.830311298 and: 0.830311418 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:528:
FAILED: Index: 17 - Values: 0.976092517 and: 0.976092875 - Threshold: 1.00000001e-07
[ 699/1098] [GammaOpCPU / apply_basic_pass_thru_style_rev ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 16 - Values: 0.60383141 and: 0.603831291 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 17 - Values: 0.910603881 and: 0.91060406 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 20 - Values: 1.01142669 and: 1.01142657 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 21 - Values: 1.09394491 and: 1.09394503 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 22 - Values: 1.49998474 and: 1.49998403 - Threshold: 1.00000001e-07
[ 700/1098] [GammaOpCPU / apply_moncurve_style_fwd ] - FAILED
[ 701/1098] [GammaOpCPU / apply_moncurve_style_rev ] - PASSED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 10 - Values: 0.674750805 and: 0.674750686 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 14 - Values: -0.674750805 and: -0.674750686 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 16 - Values: 0.60383141 and: 0.603831291 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 17 - Values: 0.910603881 and: 0.91060406 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 20 - Values: -0.60383141 and: -0.603831291 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 21 - Values: -0.910603881 and: -0.91060406 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 24 - Values: 1.01142669 and: 1.01142657 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 25 - Values: 1.09394491 and: 1.09394503 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 26 - Values: 1.84183896 and: 1.84183872 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 28 - Values: -1.01142669 and: -1.01142657 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 29 - Values: -1.09394491 and: -1.09394503 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
# FAILED: Index: 30 - Values: -1.84183896 and: -1.84183872 - Threshold: 1.00000001e-07
```
### Additional context
Upstream report at https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/2146
If this is not fixed upstream we can disable all the cpu tests when `gcc.arch` is set. The package still works fine just some of the tests don't quite land in the thresholds anymore. If we want to go this direction I am happy to put in the PR
### System metadata
- system: `"x86_64-linux"`
- host os: `Linux 6.12.11, NixOS, 25.05 (Warbler), 25.05.20250409.f675531`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.28.1`
- channels(root): `"nixos-25.05beta737298.ed4a395ea001"`
- nixpkgs: `/nix/store/zd0x43g1jcav0xy0k6q9pdhy3bvif77n-source`
### Notify maintainers
@rastertail
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
### I assert that this issue is relevant for Nixpkgs
- [x] I assert that this is a bug and not a support request.
- [x] I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%220.kind%3A+build+failure%22).
- [x] I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it.
### Is this issue important to you?
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc
opened 05:13PM - 14 Apr 25 UTC
```
8 tests failed with 33 errors 21 skips.
Start 9: test_cpu… _avx512
9/10 Test #9: test_cpu_avx512 .................. Passed 0.00 sec
Start 10: test_python
10/10 Test #10: test_python ...................... Passed 0.35 sec
30% tests passed, 7 tests failed out of 10
Total Test time (real) = 10.73 sec
The following tests FAILED:
2 - test_cpu (Failed)
3 - test_cpu_no_accel (Failed)
4 - test_cpu_sse2 (Failed)
5 - test_cpu_avx (Failed)
6 - test_cpu_avx+f16c (Failed)
7 - test_cpu_avx2 (Failed)
8 - test_cpu_avx2+f16c (Failed)
Errors while running CTest
make: *** [Makefile:71: test] Error 8
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:123:
FAILED: Index: 17 - Values: 0.896949828 and: 0.896951199 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:123:
FAILED: Index: 21 - Values: 1.10895336 and: 1.10895324 - Threshold: 1.00000001e-07
[ 694/1098] [GammaOpCPU / apply_basic_style_fwd ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:187:
FAILED: Index: 16 - Values: 0.830311298 and: 0.830311418 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:187:
FAILED: Index: 17 - Values: 0.976092517 and: 0.976092875 - Threshold: 1.00000001e-07
[ 695/1098] [GammaOpCPU / apply_basic_style_rev ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:279:
FAILED: Index: 17 - Values: 0.896949828 and: 0.896951199 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:279:
FAILED: Index: 21 - Values: -0.896949828 and: -0.896951199 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:279:
FAILED: Index: 25 - Values: 1.10895336 and: 1.10895324 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:279:
FAILED: Index: 29 - Values: -1.10895336 and: -1.10895324 - Threshold: 1.00000001e-07
[ 696/1098] [GammaOpCPU / apply_basic_mirror_style_fwd ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:370:
FAILED: Index: 16 - Values: 0.830311298 and: 0.830311418 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:370:
FAILED: Index: 17 - Values: 0.976092517 and: 0.976092875 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:370:
FAILED: Index: 20 - Values: -0.830311298 and: -0.830311418 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:370:
FAILED: Index: 21 - Values: -0.976092517 and: -0.976092875 - Threshold: 1.00000001e-07
[ 697/1098] [GammaOpCPU / apply_basic_mirror_style_rev ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:449:
FAILED: Index: 17 - Values: 0.896949828 and: 0.896951199 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:449:
FAILED: Index: 25 - Values: 1.10895336 and: 1.10895324 - Threshold: 1.00000001e-07
[ 698/1098] [GammaOpCPU / apply_basic_pass_thru_style_fwd ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:528:
FAILED: Index: 16 - Values: 0.830311298 and: 0.830311418 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:528:
FAILED: Index: 17 - Values: 0.976092517 and: 0.976092875 - Threshold: 1.00000001e-07
[ 699/1098] [GammaOpCPU / apply_basic_pass_thru_style_rev ] - FAILED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 16 - Values: 0.60383141 and: 0.603831291 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 17 - Values: 0.910603881 and: 0.91060406 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 20 - Values: 1.01142669 and: 1.01142657 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 21 - Values: 1.09394491 and: 1.09394503 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:583:
FAILED: Index: 22 - Values: 1.49998474 and: 1.49998403 - Threshold: 1.00000001e-07
[ 700/1098] [GammaOpCPU / apply_moncurve_style_fwd ] - FAILED
[ 701/1098] [GammaOpCPU / apply_moncurve_style_rev ] - PASSED
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 10 - Values: 0.674750805 and: 0.674750686 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 14 - Values: -0.674750805 and: -0.674750686 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 16 - Values: 0.60383141 and: 0.603831291 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 17 - Values: 0.910603881 and: 0.91060406 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 20 - Values: -0.60383141 and: -0.603831291 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 21 - Values: -0.910603881 and: -0.91060406 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 24 - Values: 1.01142669 and: 1.01142657 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 25 - Values: 1.09394491 and: 1.09394503 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 26 - Values: 1.84183896 and: 1.84183872 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 28 - Values: -1.01142669 and: -1.01142657 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
FAILED: Index: 29 - Values: -1.09394491 and: -1.09394503 - Threshold: 1.00000001e-07
/build/source/tests/cpu/ops/gamma/GammaOpCPU_tests.cpp:699:
# FAILED: Index: 30 - Values: -1.84183896 and: -1.84183872 - Threshold: 1.00000001e-07
```
Specifically with `-march=alderlake`. Maybe you would want to open up the thresholds on all of these to support setting the march optimizations
Also waiting on gnu bugzilla to create an account for me to report it to them.