Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 636604 - sys-libs/compiler-rt-sanitizers: -D_FORTIFY_SOURCE=2 flag gives error: redefinition of 'realpath'
Summary: sys-libs/compiler-rt-sanitizers: -D_FORTIFY_SOURCE=2 flag gives error: redefi...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: LLVM support project
Keywords: PullRequest
Depends on:
Reported: 2017-11-05 11:51 UTC by Haelwenn Monnier
Modified: 2021-03-25 12:32 UTC (History)
4 users (show)

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

lzma /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/temp/build.log (build.log.lzma,86.42 KB, application/octet-stream)
2017-11-05 11:58 UTC, Haelwenn Monnier

Note You need to log in before you can comment on or make changes to this bug.
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"
Comment 5 Haelwenn Monnier 2021-03-06 09:42:27 UTC
btw seems to be related.
Comment 6 Alessandro Barbieri 2021-03-25 12:32:31 UTC
I can build it with GCC hardened