On Thu, Nov 5, 2020 at 8:21 AM Andrey Rahmatullin wrote: > > On Thu, Nov 05, 2020 at 08:08:17AM -0500, Tong Sun wrote: > > > > I used > > > > > > > > export DEB_BUILD_MAINT_OPTIONS = hardening=+all > > > > > > > > to fix the hardening issue, but it yields the following error from blhc: > > > > > > > > CPPFLAGS missing (-D_FORTIFY_SOURCE=2) > > > > > > > > See https://salsa.debian.org/debian/shc/-/jobs/1126952 > > > > > > > > I've tried some "solutions" that I found from the internet but nothing > > > > worked. > > > > > > > > Anyone know how to fix this please? > > > Remove "export CPPFLAGS = " from debian/rules. > > > > That was actually my "fix" -- There wasn't such a line and I got > > `CPPFLAGS missing (-D_FORTIFY_SOURCE=2)` in the first place. > And this "fix" removed -D_FORTIFY_SOURCE=2 from the main compilation > command as you can see if you compare the build logs, so removing it fixes > the actual problem.
removing it yields https://salsa.debian.org/debian/shc/-/jobs/1138279 the same as where it all begins -- https://salsa.debian.org/debian/shc/-/jobs/1126858 > > Anything else I can do? > If blhc complains even without this line, I suspect it captures the > comnpilation lines from the tests, in which case you can either ignore > that or change the test commands. Always read the build log manually > before trying to fix blhc output. Yeah for sure, I tried, but the blhc output is just beyond me. My "fix" was my guess out of blhc output how to fix it.

