Problem discussed at: http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00058.html ... and: https://github.com/Homebrew/homebrew-core/issues/14418 The MacOS 10.13 profile needs a whole load of additional package masks to prevent the installation of affected ebuilds, and core packages may need to be Gentoo-patched now until upstream catches up :( Symptom: > $ ls /var/empty/ > $ ls "doesn't exist" > ls: Illegal instruction: 4 ... so sys-apps/coreutils-8.26 'ls' appears to use '%n', but only when reporting failures.
... unless sys-devel/m4 can be patched with https://raw.githubusercontent.com/macports/macports-ports/edf0ee1e2cf/devel/m4/files/secure_snprintf.patch and that's enough to fix all instances... how many packages use their own bundled versions of m4, or are affected by the same problem elsewhere. This would be much easier to fix if there was a specific compiler option which generated an error on this usage, rather than relying on runtime crashes :(
Actually, this is a more useful resource: https://github.com/Homebrew/homebrew-core/pull/15129
So I think I've adequately solved the vasnprintf() case automatically, pending upstream changes, as per https://github.com/srcshelton/gentoo-ebuilds/blob/master/README.md#fixes-for-compiling-prefix-packages-on-macos-1013-high-sierra-and-later As noted, what other cases there may be is unclear...
This problem also cause error when compiling bison at stage 2 of bootstrap on macOS. http://lists.gnu.org/archive/html/bug-bison/2017-09/msg00001.html
m4 fix pushed flex failure is caused by m4 bison fix pushed
*** Bug 634762 has been marked as a duplicate of this bug. ***
coreutils bumped (removed need for a fix) curl fix pending
bootstrapping works, glib fails blocking emerge -e world completion.
glib issue is a mismatch between clang and system headers, need to upgrade clang :(
%n problem is also in portage-utils-0.64-r1 and causes an error at the end of emaint sync. Goes away when patching autotools/gnulib/lib/vasnprintf.c with bison-3.0.4-darwin17-printf-n.patch out of the bison ebuild. Updating gnulib with autogen.sh isn't straight-forward. Perhaps upstream can make a new release?
I was already working on that (I recently bumped gnulib release), but I don't want to update all my machines to HS until I know I can make it work, so I don't have access all the time to it :)
portage-utils-0.65 compiles/runs on high-sierra
clang-5.0.1 is now in the tree (thanks to Michael Weiser) I will keyword it shortly. This version is able to compile glib on High Sierra.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=bd802a20f3c8d250fd85ed66272df93583edde2a commit bd802a20f3c8d250fd85ed66272df93583edde2a Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2018-01-04 09:46:00 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2018-01-04 09:46:00 +0000 scripts/bootstrap-prefix: update snapshots Bug: https://bugs.gentoo.org/642656 Bug: https://bugs.gentoo.org/618396 Bug: https://bugs.gentoo.org/632500 Bug: https://bugs.gentoo.org/638816 scripts/bootstrap-prefix.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)}