[macports-ports] branch master updated: mawk: Fix #55204 by (unfortunately) disabling _FORTIFY_SOURCE.

Ryan Schmidt ryandesign at macports.org
Thu Nov 2 14:10:15 UTC 2017


On Nov 1, 2017, at 19:09, Toby Peterson wrote:

> tobypeterson pushed a commit to branch master
> in repository macports-ports.
> 
> 
> https://github.com/macports/macports-ports/commit/20d860625d3d6087809bfff4c578f70edf01a527
> 
> The following commit(s) were added to refs/heads/master by this push:
> 
>      new 20d8606  mawk: Fix #55204 by (unfortunately) disabling _FORTIFY_SOURCE.
> 
> 20d8606 is described below
> 
> 
> commit 20d860625d3d6087809bfff4c578f70edf01a527
> 
> Author: Toby Peterson <toby at macports.org>
> AuthorDate: Wed Nov 1 17:08:09 2017 -0700
> 
> 
>     mawk: Fix #55204 by (unfortunately) disabling _FORTIFY_SOURCE.

Remember that "#55204" now refers to *pull request* 55204. To refer to *ticket* 55204, use the complete URL. It should be on a line by itself with a word in front of it like "Closes" or "Fixes" or "See"; Trac will recognize those formats and will automatically add a comment to the ticket about the commit, and close the ticket if applicable.


mawk: Disable _FORTIFY_SOURCE

Closes: https://trac.macports.org/ticket/55204


> +# Ticket #55204: Remove when buildbots no longer using Xcode 8
> +configure.cflags-append -D_FORTIFY_SOURCE=0

I was intentionally not updating the Sierra buildbot worker to Xcode 9 nor the El Capitan buildbot worker to Xcode 8 because those versions of Xcode do not contain the macOS SDK matching the OS version, and this causes problems for some projects. I recall cmake had problems with this originally, but I think we fixed the cmake portgroup and/or updated cmake to a newer version. A more recent instance of this problem is with Qt; see https://trac.macports.org/ticket/55195.

However I realize now that I did already update the Yosemite buildbot worker to Xcode 7, which only contains the 10.11 SDK, and I'm not aware of bug reports specifically because of that, so maybe it's ok.

I know there are increasingly other projects that rely on the existence of the newest SDK even when building on older OS versions. So maybe I should update Xcode on the El Capitan and Sierra the buildbot workers after all.

In the ticket, you said the problem was because of old versions of clang. If that's the case, then an alternate fix would be to blacklist those versions of clang that cause the problem, and let MacPorts pick an alternative compiler, such as a newer clang from MacPorts. The compiler_blacklist_versions portgroup can be used to target specific versions of Xcode clang. If some MacPorts-provided versions of clang are also affected, they can be blacklisted by name. However, if it is the case that all versions of clang before the one in Xcode 9 are affected, then blacklisting those will limit the ability to install mawk on older systems. Maybe a simple utility like mawk shouldn't have such hefty compiler requirements, and this compile failure could instead be considered a bug in mawk and reported to its developers.




More information about the macports-dev mailing list