Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via or IRC

Bug 636604

Summary: sys-libs/compiler-rt-sanitizers: -D_FORTIFY_SOURCE=2 flag gives error: redefinition of 'realpath'
Product: Gentoo Linux Reporter: Haelwenn Monnier <contact>
Component: Current packagesAssignee: LLVM support project <llvm>
Status: UNCONFIRMED ---    
Severity: normal CC: aptx945, z23
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: lzma /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/temp/build.log

Description Haelwenn Monnier 2017-11-05 11:51:03 UTC
When building with '-D_FORTIFY_SOURCE=2' in the CLFAGS/CXXFLAGS the build fails, when the flag isn’t present the build doesn’t fail.

I found this issue ( leading me to it.
Comment 1 Haelwenn Monnier 2017-11-05 11:58:43 UTC
Created attachment 502690 [details]
lzma /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/temp/build.log
Comment 2 Haelwenn Monnier 2018-02-20 03:51:36 UTC
I have this bug again on 5.0.1 btw.
Comment 3 Derek Dolney 2020-03-09 02:36:06 UTC
I have the same problem with 8.0.1.

-D_FORTIFY_SOURCE=1 doesn't work either.
Comment 4 OwenJia 2020-07-22 09:06:19 UTC
I have the same problem with 10.0.1.

CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -frename-registers -fstack-clash-protection -D_FORTIFY_SOURCE=2"