https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126911
Bug ID: 126911
Summary: [17 Regression] GCC/nvptx vs. PR modula2/125129: Many
tests fail to link on FreeBSD
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: build
Severity: normal
Priority: P3
Component: modula2
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: gaius at gcc dot gnu.org, ro at CeBiTec dot Uni-Bielefeld.DE
Blocks: 125129
Target Milestone: ---
Target: nvptx
As of commit r17-3227-gb3275d4a1f199872dffd9df4967673722f270671 "PR
modula2/125129: Many tests fail to link on FreeBSD", the GCC build for
'--target=nvptx-none' with '--enable-languages=m2' in effect hangs at:
[...]
python3 [...]/source-gcc/gcc/m2/tools-src/mktargetsrc.py --fpim \
-D=[...]/source-gcc/gcc/m2/gm2-libs-cor-common/SYSTEM.def \
-M=[...]/source-gcc/gcc/m2/gm2-libs-cor-common/SYSTEM.mod \
-I=[...]/source-gcc/gcc/m2/gm2-libs \
-I=[...]/source-gcc/gcc/m2/gm2-libs-cor-common \
-I=[...]/source-gcc/gcc/m2/gm2-libs-iso \
-C=[...]/build-gcc/./gcc/gm2\ -B[...]/build-gcc/./gcc/\ -o
m2/gm2-libs-coroutines/SYSTEM.def
[...]/source-gcc/gcc/m2/gm2-libs-cor-common/SYSTEM.mod
failed to execute: [...]/build-gcc/./gcc/gm2 -B[...]/build-gcc/./gcc/
-fpim -I[...]/source-gcc/gcc/m2/gm2-libs
-I[...]/source-gcc/gcc/m2/gm2-libs-cor-common
-I[...]/source-gcc/gcc/m2/gm2-libs-iso -fno-scaffold-main -fno-scaffold-dynamic
-fno-scaffold-static -fno-m2-plugin -c -fdump-system-exports -o /dev/null
[...]/source-gcc/gcc/m2/gm2-libs-cor-common/SYSTEM.mod >
691a2d43-2af7-4e80-aad9-45c0796b961b.txt with an exit code: 256
test -d m2/gm2-libs-log || /bin/bash [...]/source-gcc/gcc/../mkinstalldirs
m2/gm2-libs-log
mkdir -p -- m2/gm2-libs-log
test -d m2/gm2-libs-iso || /bin/bash [...]/source-gcc/gcc/../mkinstalldirs
m2/gm2-libs-iso
mkdir -p -- m2/gm2-libs-iso
test -d m2/gm2-libs || /bin/bash [...]/source-gcc/gcc/../mkinstalldirs
m2/gm2-libs
python3 [...]/source-gcc/gcc/m2/tools-src/def2doc.py -t -uLibraries
-s[...]/source-gcc/gcc/m2 -b[...]/build-gcc/gcc/m2 -o m2/gm2-libs.texi
The 'python3' process is busy-looping, occupying 100 % CPU; per 'strace' an
endless loop of:
[...]
read(4, "", 8192) = 0
[...]
..., with:
$ readlink /proc/3567332/fd/4
[...]/build-gcc/gcc/m2/gm2-libs-coroutines/SYSTEM.def
$ wc -c < [...]/build-gcc/gcc/m2/gm2-libs-coroutines/SYSTEM.def
0
(That sounds like what Rainer reported in PR125129 comment 6.)
Now, Modula-2 certainly has never been working properly for GCC/nvptx (missing
features in the latter), and the "failed to execute: [...]/build-gcc/./gcc/gm2
[...]" might well be what's causing the breakage, but despite, this shouldn't
cause the GCC build to stall.
I've not yet looked into repairing the Python script (presumably).
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125129
[Bug 125129] Many tests fail to link on FreeBSD