system clang on powerpc64 vs building lang/gcc7-devel with it: xgcc gets segmentation fault

Mark Millard markmi at dsl-only.net
Tue Jul 4 19:34:46 UTC 2017


I have submitted: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81315
for the below, presuming for now that the problem is on the GCC side
of things. Hopefully it is not tied to include-fixed/ now being empty.

[We will see if the GCC folks object to the include-fixed/ having
empty or not.]


I was trying to build lang/gcc7-devel on FreeBSD head -r320570
on a powerpc64. The xgcc stage got the following segmentation
fault. (By contrast 32-bit powerpc's build completed without
having this problem.)

And the crash was repeatable: the below is from a -save-temps
rerun.


xgcc: warning: -pipe ignored because -save-temps specified
Reading specs from /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc/specs
COLLECT_GCC=/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc/xgcc
Target: powerpc64-portbld-freebsd12.0
Configured with: /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/configure --enable-multilib --with-build-config=bootstrap-debug --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc7 --libexecdir=/usr/local/libexec/gcc7 --program-suffix=7 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc7/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --enable-languages=c,c++,objc,fortran --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/gcc7 --build=powerpc64-portbld-freebsd12.0
Thread model: posix
gcc version 7.1.1 20170629 (FreeBSD Ports Collection) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc' '-B' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc' '-nostdinc++' '-L/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/src' '-L/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/src/.libs' '-L/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/libsupc++/.libs' '-B' '/usr/local/powerpc64-portbld-freebsd12.0/bin/' '-B' '/usr/local/powerpc64-portbld-freebsd12.0/lib/' '-isystem' '/usr/local/powerpc64-portbld-freebsd12.0/include' '-isystem' '/usr/local/powerpc64-portbld-freebsd12.0/sys-include' '-I' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/../libgcc' '-I' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/include/powerpc64-portbld-freebsd12.0' '-I' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/include' '-I' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/libsupc++' '-D' '_GLIBCXX_SHARED' '-fno-implicit-templates' '-Wall' '-Wextra' '-Wwrite-strings' '-Wcast-qual' '-Wabi' '-fdiagnostics-show-location=once' '-ffunction-sections' '-fdata-sections' '-frandom-seed=class_type_info.lo' '-O2' '-pipe' '-B' '/usr/local/bin/' '-D' 'LIBICONV_PLUG' '-g' '-fno-strict-aliasing' '-B' '/usr/local/bin/' '-D' 'LIBICONV_PLUG' '-c' '-fPIC' '-D' 'PIC' '-D' '_GLIBCXX_SHARED' '-o' 'class_type_info.o'
 /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc/cc1plus -E -quiet -nostdinc++ -v -I /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/../libgcc -I /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/include/powerpc64-portbld-freebsd12.0 -I /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/include -I /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/libsupc++ -iprefix /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/gcc/../lib/gcc7/gcc/powerpc64-portbld-freebsd12.0/7.1.1/ -isystem /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc/include -isystem /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc/include-fixed -D _GLIBCXX_SHARED -D LIBICONV_PLUG -D LIBICONV_PLUG -D PIC -D _GLIBCXX_SHARED -isystem /usr/local/powerpc64-portbld-freebsd12.0/include -isystem /usr/local/powerpc64-portbld-freebsd12.0/sys-include /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/libsupc++/class_type_info.cc -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fno-implicit-templates -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=class_type_info.lo -fno-strict-aliasing -fPIC -g -fworking-directory -O2 -fpch-preprocess -o class_type_info.ii
ignoring nonexistent directory "/usr/local/powerpc64-portbld-freebsd12.0/include"
ignoring nonexistent directory "/usr/local/powerpc64-portbld-freebsd12.0/sys-include"
ignoring nonexistent directory "/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/gcc/../lib/gcc7/gcc/powerpc64-portbld-freebsd12.0/7.1.1/include"
ignoring nonexistent directory "/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/gcc/../lib/gcc7/gcc/powerpc64-portbld-freebsd12.0/7.1.1/include-fixed"
ignoring nonexistent directory "/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/gcc/../lib/gcc7/gcc/powerpc64-portbld-freebsd12.0/7.1.1/../../../../../powerpc64-portbld-freebsd12.0/include"
ignoring nonexistent directory "/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/gcc/../lib/gcc7/gcc/../../../lib/gcc7/gcc/powerpc64-portbld-freebsd12.0/7.1.1/include"
ignoring nonexistent directory "/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/gcc/../lib/gcc7/gcc/../../../lib/gcc7/gcc/powerpc64-portbld-freebsd12.0/7.1.1/include-fixed"
ignoring nonexistent directory "/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/gcc/../lib/gcc7/gcc/../../../lib/gcc7/gcc/powerpc64-portbld-freebsd12.0/7.1.1/../../../../../powerpc64-portbld-freebsd12.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/../libgcc
 /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/include/powerpc64-portbld-freebsd12.0
 /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/include
 /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/libsupc++
 /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc/include
 /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc/include-fixed
 /usr/local/include
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc' '-B' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc' '-nostdinc++' '-L/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/src' '-L/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/src/.libs' '-L/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/libsupc++/.libs' '-B' '/usr/local/powerpc64-portbld-freebsd12.0/bin/' '-B' '/usr/local/powerpc64-portbld-freebsd12.0/lib/' '-isystem' '/usr/local/powerpc64-portbld-freebsd12.0/include' '-isystem' '/usr/local/powerpc64-portbld-freebsd12.0/sys-include' '-I' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/../libgcc' '-I' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/include/powerpc64-portbld-freebsd12.0' '-I' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/powerpc64-portbld-freebsd12.0/libstdc++-v3/include' '-I' '/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/libsupc++' '-D' '_GLIBCXX_SHARED' '-fno-implicit-templates' '-Wall' '-Wextra' '-Wwrite-strings' '-Wcast-qual' '-Wabi' '-fdiagnostics-show-location=once' '-ffunction-sections' '-fdata-sections' '-frandom-seed=class_type_info.lo' '-O2' '-pipe' '-B' '/usr/local/bin/' '-D' 'LIBICONV_PLUG' '-g' '-fno-strict-aliasing' '-B' '/usr/local/bin/' '-D' 'LIBICONV_PLUG' '-c' '-fPIC' '-D' 'PIC' '-D' '_GLIBCXX_SHARED' '-o' 'class_type_info.o'
 /usr/obj/portswork/usr/ports/lang/gcc7-devel/work/.build/./gcc/cc1plus -fpreprocessed class_type_info.ii -quiet -dumpbase class_type_info.cc -auxbase-strip class_type_info.o -g -O2 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -version -fno-implicit-templates -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=class_type_info.lo -fno-strict-aliasing -fPIC -o class_type_info.s
GNU C++14 (FreeBSD Ports Collection) version 7.1.1 20170629 (powerpc64-portbld-freebsd12.0)
	compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 4.0.0 (tags/RELEASE_400/final 297347), GMP version 6.1.2, MPFR version 3.1.5-p2, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++14 (FreeBSD Ports Collection) version 7.1.1 20170629 (powerpc64-portbld-freebsd12.0)
	compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 4.0.0 (tags/RELEASE_400/final 297347), GMP version 6.1.2, MPFR version 3.1.5-p2, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 9b3c45692665b5f6f0fb0529d1f75edd
/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/libsupc++/class_type_info.cc: In member function 'virtual bool __cxxabiv1::__class_type_info::__do_upcast(const __cxxabiv1::__class_type_info*, void**) const':
/usr/obj/portswork/usr/ports/lang/gcc7-devel/work/gcc-7-20170629/libstdc++-v3/libsupc++/class_type_info.cc:45:6: internal compiler error: Segmentation fault
 bool __class_type_info::
      ^~~~~~~~~~~~~~~~~
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.





===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-ppc mailing list