https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123976
Bug ID: 123976
Summary: GCC 15.2.0 (libgcc) does not build on PPC Mac OS X
10.5.8, Leopard, because of missing "md-unwind-def.h"
Product: gcc
Version: 15.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: Peter_Dyballa at web dot de
Target Milestone: ---
I am trying to build the compiler collection within MacPorts. Which means that
many patches are applied to the original sources. Building the compilers starts
with "gcc10-bootstrap". Configure is invoked like this:
configure --prefix=/opt/local --build=powerpc-apple-darwin9
--enable-languages=c,c++,objc,obj-c++,lto,fortran,m2,jit
--libdir=/opt/local/lib/gcc15 --infodi r=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-15
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-15 --with-gxx-include-dir=/opt/local/include/gcc15/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/op t/local
--with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release
--disable-multilib --enable-lto --enable-libstdcxx-time --without-build-config
--with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc
--with-libiconv-prefix=/opt/local --disable-tls --with-pkgversion="MacPorts
gcc15 15.2.0_0"
The error comes from this:
make[3]: Entering directory
`/opt/local/var/macports/build/gcc15-678e8911/work/build/powerpc-apple-darwin9/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
ln -s
/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/gthr-posix.h
gthr-default.h
ln -s
/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/config/no-unwind.h
md-unwind-support.h
ln -s
/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/unwind-generic.h
unwind.h
DEFINES=''
HEADERS='/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/config/i386/darwin-lib.h'
\
/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/mkheader.sh
> tmp-libgcc_tm.h
/bin/sh
/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/../move-if-change
tmp-libgcc_tm.h libgcc_tm.h
echo timestamp > libgcc_tm.stamp
/opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/xgcc
-B/opt/local/var/macports/build/gcc15-678e8911/work/build/./gcc/
-B/opt/local/powerpc-apple-darwin9/bin/ -B/opt/local/powerpc-apple-darwin9/lib/
-isystem /opt/local/powerpc-apple-darwin9/include -isystem
/opt/local/powerpc-apple-darwin9/sys-include -fno-checking -g -O2 -pipe -Os
-O2 -g -O2 -pipe -Os -DIN_GCC -W -Wall -Wno-error=narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -isystem ./include -mmacosx-version-min=10.5
-Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -maltivec -g
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -mmacosx-version-min=10.5
-Wa,-force_cpusubtype_ALL -fno-common -mlong-double-128 -maltivec -I. -I.
-I../.././gcc
-I/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc
-I/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/.
-I/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/../gcc
-I/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/../include
-o unwind-dw2_s.o -MT unwind-dw2_s.o -MD -MP -MF unwind-dw2_s.dep -DSHARED
-fexceptions -c
/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/unwind-dw2.c
In file included from
/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/unwind-dw2.c:38:
/opt/local/var/macports/build/gcc15-678e8911/work/gcc-15.2.0/libgcc/unwind-dw2.h:25:10:
fatal error: md-unwind-def.h: No such file or directory
25 | #include "md-unwind-def.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [unwind-dw2_s.o] Error 1
make[3]: Leaving directory
`/opt/local/var/macports/build/gcc15-678e8911/work/build/powerpc-apple-darwin9/libgcc'
For this old version of Mac OS X two MacPorts ports (packages) exist: libunwind
and libunwind-headers. The former contains libunwind, the latter contains C
header files, but none by the name of "md-unwind-def.h". Both are not
installed. The "gcc10-bootstrap" compiler is actually: gcc (GCC) 10.5.0.
"gcc-mp-14 (MacPorts gcc14 14.2.0_1) 14.2.0" also exists on this Mac plus much
older versions of GCC 4.0 and 4.2. GCC 15 is meant to be MacPorts' default
compiler for some software packages written in up-to-date C or C++ code – but
does not compile…
The case is already described here: https://trac.macports.org/ticket/73167, an
unclear manual solution seems to be provided. Another report describes the
problem on Mac OS X 10.4, Tiger:
https://github.com/iains/gcc-15-branch/issues/3.
The problem seems to be that at least one symlink is not created. Which one is
that? Does a patch exist for Makefile or Makefile.in to apply it
"automatically" before configure's invocation?
--
Pete