[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-10-08 Thread chrisj at rtems dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

Chris Johns  changed:

   What|Removed |Added

 CC||chrisj at rtems dot org

--- Comment #17 from Chris Johns  ---
I see the same issue when building tools for RTEMS using the RSB. I have
collected the posted parts in a patch and attached it to a ticket in RTEMS's
trac:

https://devel.rtems.org/ticket/3171

An RTEMS tools build now fails with:

../../../../gcc-7.2.0/libstdc++-v3/libsupc++/atexit_thread.cc:27:10: fatal
error: bits/gthr.h: No such file or directory   
 #include "bits/gthr.h"   
  ^   

so there seems to be more issues.

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-09-03 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #16 from Jack Howarth  ---
The component on this bug should probably be switched back off of 'target' to
'libstdc++' as the broken stamps implementation is likely just latent on other
targets because none of them have filesystems with the fine time granularity of
APFS yet,

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-09-03 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #15 from Jack Howarth  ---
Maybe I'm just thick, but from the generated
x86_64-apple-darwin17.0.0/libstdc++-v3/include/Makefile, it is entirely unclear
to me how the stamp mechanism and the current install-headers insures that
install-headers has completed in its entirety.  

The way I read the current Makefile is that it is merely checking for the
existence of the include subdirectories having been installed and not that that
they have been completely populated. Looks like a broken implementation of
stamps to me.

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-09-03 Thread romain.services at mm dot st
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #14 from Romain Bossart  ---
Thank you Jack, gcc-7.2.0 now compiles correctly on my i7 system (8 cores HT)
with encrypted APFS

Best regards

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-09-02 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #13 from Jack Howarth  ---
The following hack allows gcc 7.2.0 to complete the 3 stage bootstrap of the
c,c++,fortran,lto,objc,obj-c++ language set under High Sierra on an APFS
volume...

diff -uNr gcc-7.2.0.orig/libstdc++-v3/include/Makefile.in
gcc-7.2.0/libstdc++-v3/include/Makefile.in
--- gcc-7.2.0.orig/libstdc++-v3/include/Makefile.in 2017-07-25
14:05:07.0 -0400
+++ gcc-7.2.0/libstdc++-v3/include/Makefile.in  2017-09-02 12:22:08.0
-0400
@@ -1764,6 +1764,8 @@
 @GLIBCXX_HOSTED_TRUE@install-data-local: install-headers
 @GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers

+.NOTPARALLEL: install-headers
+
 # This is a subset of the full install-headers rule.  We only need ,
 # , , , , , , ,
 # , , , , ,

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-09-02 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #12 from Jack Howarth  ---
Just to add in things that don't fix these failures, the following doesn't
help...

--- gcc-7.2.0/libstdc++-v3/include/Makefile.in.orig 2017-09-02
11:00:08.0 -0400
+++ gcc-7.2.0/libstdc++-v3/include/Makefile.in  2017-09-02 11:12:38.0
-0400
@@ -1887,16 +1887,37 @@
 # developer tries to create them via make in the include build
 # directory. (This is more of an example of how this kind of rule can
 # be made.)
-.PRECIOUS: $(std_headers) $(c_base_headers) $(tr1_headers) $(tr2_headers)
+.PRECIOUS: $(std_headers) $(bits_headers) $(c_base_headers) $(tr1_headers)
$(tr2_headers)
   $(decimal_headers) $(ext_headers) $(experimental_headers)
-  $(experimental_bits_headers)
+  $(experimental_bits_headers) $(bits_host_headers)
$(bits_sup_headers)
+  $(backward_headers) $(ext_compat_headers) $(ext_host_headers) 
+  $(experimental_filesystem_headers)
$(experimental_bits_filesystem_headers)
+  $(c_compatibility_headers) $(debug_headers) $(parallel_headers)
+  $(profile_headers) $(profile_impl_headers) $(host_headers)
$(thread_host_headers)
 $(std_headers): ; @:
+$(bits_headers): ; @:
+$(bits_host_headers): ; @:
+$(bits_sup_headers): ; @:
+$(backward_headers): ; @:
 $(c_base_headers): ; @:
 $(tr1_headers): ; @:
+$(tr2_headers): ; @:
 $(decimal_headers): ; @:
 $(ext_headers): ; @:
+$(ext_compat_headers): ; @:
+$(ext_host_headers): ; @:
 $(experimental_headers): ; @:
 $(experimental_bits_headers): ; @:
+$(experimental_filesystem_headers): ; @:
+$(experimental_bits_filesystem_headers): ; @:
+$(c_compatibility_headers): ; @:
+$(debug_headers): ; @:
+$(parallel_headers): ; @:
+$(profile_headers): ; @:
+$(profile_impl_headers): ; @:
+$(host_headers): ; @:
+$(thread_host_headers): ; @:
+

 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-30 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #11 from Jack Howarth  ---
For what it's worth, I managed to partially suppress the missing headers
bootstrap failure for libstdc++-v3 with the change...

++-v3/include/Makefile.in
--- libstdc++-v3/include/Makefile.in.orig   2017-08-29 22:22:17.0
-0400
+++ libstdc++-v3/include/Makefile.in2017-08-29 20:06:57.0 -0400
@@ -1761,7 +1761,7 @@
 # host_headers_extra are taken out of the build tree staging area;
 # the rest are taken from the original source tree.

-@GLIBCXX_HOSTED_TRUE@install-data-local: install-headers
+@GLIBCXX_HOSTED_TRUE@install-data-local: install-freestanding-headers
 @GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers

 # This is a subset of the full install-headers rule.  We only need ,

However this change just moves the missing header error from stage1 to stage2.

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-26 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #10 from Jack Howarth  ---
I managed to reproduce this issue on an 8 core non-HT system booted from an
APFS volume on an old SATA2 HDD so the issue doesn't seem to be dependent on
really fast IO...

Making all in include
mkdir -p ./x86_64-apple-darwin17.0.0/bits/stdc++.h.gch
mkdir -p ./x86_64-apple-darwin17.0.0/bits/stdc++.h.gch
/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/./gcc/xgcc -shared-libgcc
-B/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/./gcc -nostdinc++
-L/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/src
-L/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/src/.libs
-L/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/libsupc++/.libs
-B/sw/lib/gcc7/x86_64-apple-darwin17.0.0/bin/
-B/sw/lib/gcc7/x86_64-apple-darwin17.0.0/lib/ -isystem
/sw/lib/gcc7/x86_64-apple-darwin17.0.0/include -isystem
/sw/lib/gcc7/x86_64-apple-darwin17.0.0/sys-include-x c++-header -nostdinc++
-g -O2 
-I/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/include/x86_64-apple-darwin17.0.0
-I/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/include
-I/sw/src/fink.build/gcc7-7.2.0-1/gcc-7.2.0/libstdc++-v3/libsupc++
-I/sw/include -O2 -g -std=gnu++0x
/sw/src/fink.build/gcc7-7.2.0-1/gcc-7.2.0/libstdc++-v3/include/precompiled/stdc++.h
\
-o x86_64-apple-darwin17.0.0/bits/stdc++.h.gch/O2ggnu++0x.gch
/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/./gcc/xgcc -shared-libgcc
-B/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/./gcc -nostdinc++
-L/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/src
-L/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/src/.libs
-L/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/libsupc++/.libs
-B/sw/lib/gcc7/x86_64-apple-darwin17.0.0/bin/
-B/sw/lib/gcc7/x86_64-apple-darwin17.0.0/lib/ -isystem
/sw/lib/gcc7/x86_64-apple-darwin17.0.0/include -isystem
/sw/lib/gcc7/x86_64-apple-darwin17.0.0/sys-include-x c++-header -nostdinc++
-g -O2 
-I/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/include/x86_64-apple-darwin17.0.0
-I/sw/src/fink.build/gcc7-7.2.0-1/darwin_objdir/x86_64-apple-darwin17.0.0/libstdc++-v3/include
-I/sw/src/fink.build/gcc7-7.2.0-1/gcc-7.2.0/libstdc++-v3/libsupc++
-I/sw/include -O2 -g
/sw/src/fink.build/gcc7-7.2.0-1/gcc-7.2.0/libstdc++-v3/include/precompiled/stdc++.h
-o x86_64-apple-darwin17.0.0/bits/stdc++.h.gch/O2g.gch
/sw/src/fink.build/gcc7-7.2.0-1/gcc-7.2.0/libstdc++-v3/include/precompiled/stdc++.h:35:10:
fatal error: cctype: No such file or directory
 #include 
  ^~~~
compilation terminated.
make[5]: *** [x86_64-apple-darwin17.0.0/bits/stdc++.h.gch/O2g.gch] Error 1
make[5]: *** Waiting for unfinished jobs
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
make[1]: *** [stage1-bubble] Error 2

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-25 Thread misty at brew dot sh
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #9 from Misty De Meo  ---
My VM has two cores, and repros this problem.

I reported this to Apple, who assigned the bug ID rdar://33924943. It was
reported to me that Apple engineers believed it was fixed in the latest beta,
but it is still reproducing.

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-24 Thread romain.services at mm dot st
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #8 from Romain  ---
Hi Jack,

Thanks. My system is a Core i7 (HT enabled), so I have 8 cores, good catch!

Regards,
Romain

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-23 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

--- Comment #7 from Jack Howarth  ---
(In reply to Romain from comment #6)
> Hi, 
> 
> > It might be an interesting exercise to encrypt the APFS volume and see if 
> > that
> throws just enough additional filesystem overhead in to make the problem go
> latent.
> 
> I'm also trying to compile gcc-7.2.0 on macOS 10.13, and I'm using encrypted
> APFS, but it does not make this bug disappear.
> 
> Regards,
> Romain

FX and Romain,
 How many cores does each of your build systems have? Jeremy Sequoia says
he hasn't seen this on any of his build systems with APFS for MacPorts gcc6 or
later bootstraps but he is using 4 core systems in each case. I have seen
instances where particular race conditions don't show up on 8 core systems but
plague dual core systems.

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-22 Thread romain.services at mm dot st
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

Romain  changed:

   What|Removed |Added

 CC||romain.services at mm dot st

--- Comment #6 from Romain  ---
Hi, 

> It might be an interesting exercise to encrypt the APFS volume and see if that
throws just enough additional filesystem overhead in to make the problem go
latent.

I'm also trying to compile gcc-7.2.0 on macOS 10.13, and I'm using encrypted
APFS, but it does not make this bug disappear.

Regards,
Romain

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-20 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

Francois-Xavier Coudert  changed:

   What|Removed |Added

Version|7.1.0   |7.2.0

--- Comment #5 from Francois-Xavier Coudert  ---
Same bug exists with GCC 7.2.0 and GCC 6.4.0, when compiled on a APFS
filesystem.

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-17 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

Eric Gallager  changed:

   What|Removed |Added

 Target||x86_64-apple-darwin17.0.0
 Status|UNCONFIRMED |NEW
   Keywords||build
   Last reconfirmed||2017-08-17
  Component|libstdc++   |target
 CC||egallager at gcc dot gnu.org,
   ||howarth.at.gcc at gmail dot com
   Host||x86_64-apple-darwin17.0.0
 Ever confirmed|0   |1
  Build||x86_64-apple-darwin17.0.0

--- Comment #4 from Eric Gallager  ---
Redoing lost comments:

https://gcc.gnu.org/ml/gcc-bugs/2017-08/msg01294.html

Jack Howarth  changed:

   What|Removed |Added

 CC||howarth.at.gcc at gmail dot
com

--- Comment #3 from Jack Howarth  ---
I don't see this issue with the gcc7-7.1.0-1 fink package build on High Sierra.
This is from a clean install of fink master on 10.13 using the proposed changes
from...

https://github.com/fink/fink/pull/143

to bootstrap fink git master on 10.13 and patching all the fink package
dependencies that trip over the increased format string strictness in 10.13...

http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html

https://gcc.gnu.org/ml/gcc-bugs/2017-08/msg01310.html

Francois-Xavier Coudert  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-08-13
 Ever confirmed|0   |1

--- Comment #4 from Francois-Xavier Coudert  ---
We have a Homebrew user report it, and I can see it myself. It is intermittent,
and I have seen it happen twice, always with "make -j4" (2 out of 4 parallel
builds). Building with -j1 does not appear to trigger the issue.

https://gcc.gnu.org/ml/gcc-bugs/2017-08/msg01311.html

--- Comment #5 from Francois-Xavier Coudert  ---
I've also found one case where the error is slightly different (also "make
-j4"):

make "AR_FLAGS=rc" "CC_FOR_BUILD=clang"
"CC_FOR_TARGET=/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/./gcc/xgcc
-B/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/./gcc/" "CFLAGS=-g -O2 
-m32" "CXXFLAGS=-g -O2  -m32" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g
-O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644"
"INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c"
"LDFLAGS=-m32" "LIBCFLAGS=-g -O2  -m32" "LIBCFLAGS_FOR_TARGET=-g -O2"
"MAKE=make" "MAKEINFO=makeinfo --split-size=500 --split-size=500
--split-size=500 " "SHELL=/bin/sh" "RUNTESTFLAGS="
"exec_prefix=/usr/local/Cellar/gcc/7.1.0"
"infodir=/usr/local/Cellar/gcc/7.1.0/share/info"
"libdir=/usr/local/Cellar/gcc/7.1.0/lib/gcc/7"
"includedir=/usr/local/Cellar/gcc/7.1.0/include"
"prefix=/usr/local/Cellar/gcc/7.1.0"
"tooldir=/usr/local/Cellar/gcc/7.1.0/x86_64-apple-darwin17.0.0"
"gxx_include_dir=/usr/local/Cellar/gcc/7.1.0/include/c++/7.1.0" "AR=ar"
"AS=/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/./gcc/as"
"LD=/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/./gcc/collect-ld"
"RANLIB=ranlib"
"NM=/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/./gcc/nm"
"NM_FOR_BUILD=" "NM_FOR_TARGET=nm" "DESTDIR=" "WERROR=" all-recursive
Making all in include
mkdir -p ./x86_64-apple-darwin17.0.0/bits/stdc++.h.gch
mkdir -p ./x86_64-apple-darwin17.0.0/bits/stdc++.h.gch
/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/./gcc/xgcc -shared-libgcc
-B/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/./gcc -nostdinc++
-L/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/x86_64-apple-darwin17.0.0/i386/libstdc++-v3/src
-L/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/x86_64-apple-darwin17.0.0/i386/libstdc++-v3/src/.libs
-L/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/x86_64-apple-darwin17.0.0/i386/libstdc++-v3/libsupc++/.libs
-B/usr/local/Cellar/gcc/7.1.0/x86_64-apple-darwin17.0.0/bin/
-B/usr/local/Cellar/gcc/7.1.0/x86_64-apple-darwin17.0.0/lib/ -isystem
/usr/local/Cellar/gcc/7.1.0/x86_64-apple-darwin17.0.0/include -isystem
/usr/local/Cellar/gcc/7.1.0/x86_64-apple-darwin17.0.0/sys-include  -m32 -x
c++-header -nostdinc++ -g -O2  -m32 
-I/private/tmp/gcc-20170813-56216-v7ncm/gcc-7.1.0/build/x86_64-apple-darwin17.0.0/i386/libstdc++-v3/include/x86_64-apple-darwin17.0.0

[Bug target/81797] gcc 7.1.0 fails to build on macOS 10.13 (High Sierra):

2017-08-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||build
 Target||x86_64-apple-darwin17.0.0
  Component|libstdc++   |target
   Host||x86_64-apple-darwin17.0.0
  Build||x86_64-apple-darwin17.0.0

--- Comment #14 from Jonathan Wakely  ---
I'm changing the component, because I don't think this is a libstdc++ issue.