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

Bug 906000

Summary: app-crypt/yubihsm-shell-2.4.0 fails to compile (MUSL-SYSTEM): <command-line>: error: "_FORTIFY_SOURCE" redefined
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Jason A. Donenfeld <zx2c4>
Status: CONFIRMED ---    
Severity: normal CC: linus+bugs.go
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
Stop CMake from adding compiler option -D_FORTIFY_SOURCE=2

Description Agostino Sarubbo gentoo-dev 2023-05-09 06:18:16 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-crypt/yubihsm-shell-2.4.0 fails to compile (MUSL-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc but this bug MAY or MAY NOT BE related to musl.
Comment 1 Agostino Sarubbo gentoo-dev 2023-05-09 06:18:18 UTC
Created attachment 861363 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-05-09 06:18:19 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: lib/CMakeFiles/yubihsm.dir/__/aes_cmac/aes.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/__/aes_cmac/aes_cmac.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/__/common/ecdh.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/__/common/hash.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/__/common/openssl-compat.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/__/common/pkcs5.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/__/common/rand.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/error.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/lib_util.c.o 
FAILED: lib/CMakeFiles/yubihsm.dir/yubihsm.c.o 
FAILED: lib/CMakeFiles/yubihsm_http.dir/lib_util.c.o 
FAILED: lib/CMakeFiles/yubihsm_http.dir/yubihsm_curl.c.o 
FAILED: lib/CMakeFiles/yubihsm_usb.dir/lib_util.c.o 
FAILED: lib/CMakeFiles/yubihsm_usb.dir/yubihsm_libusb.c.o 
FAILED: lib/CMakeFiles/yubihsm_usb.dir/yubihsm_usb.c.o 
FAILED: lib/tests/CMakeFiles/test_parsing.dir/test_parsing.c.o 
<command-line>: error: "_FORTIFY_SOURCE" redefined
Comment 3 Linus Nordberg 2024-07-06 19:36:37 UTC
Created attachment 897220 [details, diff]
Stop CMake from adding compiler option -D_FORTIFY_SOURCE=2

This is not a great solution unless _FORTIFY_SOURCE is being used in all Gentoo profiles.

Besides that, should this change have its own patch file?