Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 917448

Summary: sci-libs/hdf5-1.14.2: configure strips -Werror from CFLAGS with s/-Werror//g, cannot handle -Werror=option leading to configure: error: C compiler cannot create executables
Product: Gentoo Linux Reporter: Alfred Wingate <parona>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 920131    
Attachments: sci-libs/hdf5-1.14.2 build.log (gzip compressed)
config.log
emerge --info

Description Alfred Wingate 2023-11-16 17:52:50 UTC
CFLAGS="-Werror=odr" leads to CFLAGS="=odr" which is invalid leading to configure test failures.

https://github.com/HDFGroup/hdf5/commit/41526f68f3482f2b3a7aa581288bc86e9c6dcb43#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810

configure:5612: checking whether the C compiler works
configure:5634: x86_64-pc-linux-gnu-gcc  -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin =odr =lto-type-mismatch =strict-aliasing    -Wl,-O1 -Wl,--as-needed -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing conftest.c  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find odr: No such file or directory
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find lto-type-mismatch: No such file or directory
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find strict-aliasing: No such file or directory
collect2: error: ld returned 1 exit status

Reproducible: Always

Steps to Reproduce:
1.Have -Werror=option syntax in your CFLAGS
2.Try to build hdf-1,14.2 (Any version after 1.13.2 should be susceptible)
Actual Results:  
configure failure

Expected Results:  
Success
Comment 1 Alfred Wingate 2023-11-16 17:55:56 UTC
Created attachment 874897 [details]
sci-libs/hdf5-1.14.2 build.log (gzip compressed)
Comment 2 Alfred Wingate 2023-11-16 17:56:33 UTC
Created attachment 874898 [details]
config.log
Comment 3 Alfred Wingate 2023-11-16 17:57:00 UTC
Created attachment 874899 [details]
emerge --info
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-17 09:32:04 UTC
commit b1d7fc92778540233048297ff682e789a8d38ce5 (HEAD -> master, origin/master, origin/HEAD)
Author: Sam James <sam@gentoo.org>
Date:   Sun Dec 17 09:31:15 2023 +0000

    sci-libs/hdf5: fix -Werror mangling, rebase patches

    Closes: https://bugs.gentoo.org/917448
    Signed-off-by: Sam James <sam@gentoo.org>