Unit Go CGO_CFLAGS_ALLOW

Max Romanov max.romanov at nginx.com
Thu Jun 10 13:59:46 UTC 2021


Hello!

> On 10 Jun 2021, at 00:24, Васильев Zmey! Олег <zmey1992 at ya.ru> wrote:
> 
> Hi!
>  
> Tried to build Unit 1.24 and found out that I can't compile Go module without environment variable set: CGO_CFLAGS_ALLOW='-Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS|-fcf-protection'
> Go complains that there are invalid (untrusted) flags:
> go build unit.nginx.org/go: invalid flag in #cgo CFLAGS: -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS
> go build unit.nginx.org/go: invalid flag in #cgo CFLAGS: -fcf-protection

Most likely these flags were added because you have specified it when configuring Unit.

>  
> So please consider to either add CGO_CFLAGS_ALLOW to build script or remove these options.

If I’m right thinking you are building Unit and Go module from sources with these flags, it is up to you to control your building environment.

If my assumption is wrong, please describe what you are doing with more details.

>  
> WBR, Oleg.

—
Best regards,
Max

> _______________________________________________
> unit mailing list
> unit at nginx.org
> https://mailman.nginx.org/mailman/listinfo/unit <https://mailman.nginx.org/mailman/listinfo/unit>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20210610/5560d982/attachment.htm>


More information about the unit mailing list