2 years ago
#43802
Gio
GCC Fortran frontend builds correctly; fails to install
I'm building gcc 11.2.0 to be the system compiler for my current system (Ubuntu 21, using gcc 9.3) and an LFS system that will reside on another device. When building with --enable-languages=all
, the bootstrap failed for ambiguous reasons; to simplify (at the cost of time, of course), I started over, this time targeting the languages piecemeal.
The first run consisted of the C, C++, and Objective-C frontends and this was successful. Next, I moved on to the Fortran frontend. While compilation appeared successful, it failed to install with the following:
g++ -std=c++11 -c -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../../gcc-11.2.0/gcc -I../../gcc-11.2.0/gcc/build -I../../gcc-11.2.0/gcc/../include -I../../gcc-11.2.0/gcc/../libcpp/include \
-o build/genmddeps.o ../../gcc-11.2.0/gcc/genmddeps.c
cc1plus: error: ‘-Werror=format-diag’: no option -Wformat-diag
The build was configured with: ../gcc-11.2.0/configure --prefix=/usr --disable-multilib --enable-shared --enable-static --enable-languages=fortran --enable-default-pie --with-pic --disable-nls --enable-lto --enable-libssp --enable-libatomic --enable-libgomp --disable-libvtv
The install was attempted with: make DESTDIR=/usr/etc/sys-gcc install
I attempted to build/install twice: the first was after building the C-family targets without cleaning the directory, while the second was performed in a fresh directory. Both builds were completed with no errors, but both generated the same error when I attempted to install them to my staging point (DESTDIR
).
I have two questions:
- Why did this occur?
- How may I fix it?
UPDATE
The problem appeared to resolve itself this morning after a full system restart. I don't know why this would have an effect... Memory issues, perhaps? Regardless, I'll mark this as closed, but if anyone can explain the odd behavior I'd like to hear it.
gcc
gfortran
0 Answers
Your Answer