On 10/20/25 00:58, H.J. Lu wrote:
On Mon, Oct 20, 2025 at 6:52 AM Josef Melcr <[email protected]> wrote:
On 10/20/25 00:32, H.J. Lu wrote:
On Mon, Oct 20, 2025 at 6:27 AM Josef Melcr <[email protected]> wrote:
Hi,
On 10/19/25 23:25, H.J. Lu wrote:
On Fri, Oct 17, 2025 at 5:40 PM Josef Melcr <[email protected]> wrote:
gcc/testsuite/ChangeLog:
* gcc.dg/ipa/ipcp-cb-spec1.c: New test.
* gcc.dg/ipa/ipcp-cb-spec2.c: New test.
* gcc.dg/ipa/ipcp-cb1.c: New test.
These run-time tests should be moved to libgomp to avoid
xgcc: fatal error: cannot read spec file 'libgomp.spec': No such file
or directory
compilation terminated.
compiler exited with status 1
FAIL: gcc.dg/ipa/ipcp-cb1.c (test for excess errors)
Will do, sorry if it caused any issues. Could you please elaborate on
what the problem is and possibly how to reproduce it? I have not
encountered it during my testing.
The run-time gomp tests use libgomp.spec which is available in
the libgomp build directory. You didn't see the issue since you
have installed GCC 16 before. You will see the problem if you
remove the installed GCC 16. I have
[hjl@gnu-tgl-3 gcc]$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: x86_64-pc-linux-gnu
Configured with: /export/gnu/import/git/gitlab/x86-gcc/configure
--disable-bootstrap --enable-cet --with-demangler-in-ld
--prefix=/usr/gcc-16.0.0-x86-64 --with-local-prefix=/usr/local
--enable-gnu-indirect-function --enable-clocale=gnu --with-system-zlib
--with-target-system-zlib --with-fpmath=sse --with-tls=gnu2
--disable-libcc1 --disable-libcilkrts --disable-libsanitizer
--enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251019 (experimental) (GCC)
[hjl@gnu-tgl-3 gcc]$
But there is no /usr/gcc-16.0.0-x86-64 since it hasn't been installed yet.
So is it because gcc is not installed? I tried removing the install directory, but the
test still works when run with `make check-gcc RUNTESTFLAGS="-v -v
ipa.exp=ipcp-cb1.c"` in the build directory. Though I have of course have different
builds installled in their own directories, they should not be interfering. Running
./xgcc -v in $build_dir/gcc gives me the following:
```
Using built-in specs.
COLLECT_GCC=./xgcc
Target: x86_64-pc-linux-gnu
Configured with: /home/pjepjeno/gcc/src/trunk/configure
--prefix=/home/pjepjeno/gcc/build/trunk/install
If you have removed /home/pjepjeno/gcc/build/trunk/install, your xgcc must
pick up libgomp.spec somewhere. Please run strace on gcc.dg/ipa/ipcp-cb1.c.
I got
$ strace
/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/
/export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gcc.dg/ipa/ipcp-cb1.c
-fdiagnostics-plain-output -O3 -fopenmp -flto -std=gnu99
-fdump-ipa-cp-details -lm -o ./ipcp-cb1.exe 2>&1 | grep
libgomp.spec
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/x86_64-pc-linux-gnu/16.0.0/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/../lib/gcc/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/16.0.0/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../x86_64-pc-linux-gnu/lib/../lib64/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../x86_64-pc-linux-gnu/16.0.0/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../lib64/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/lib/x86_64-pc-linux-gnu/16.0.0/libgomp.spec", R_OK) = -1
ENOENT (No such file or directory)
access("/lib/../lib64/libgomp.spec", R_OK) = -1 ENOENT (No such file
or directory)
access("/usr/lib/x86_64-pc-linux-gnu/16.0.0/libgomp.spec", R_OK) = -1
ENOENT (No such file or directory)
access("/usr/lib/../lib64/libgomp.spec", R_OK) = -1 ENOENT (No such
file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../x86_64-pc-linux-gnu/lib/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "libgomp.spec", O_RDONLY) = -1 ENOENT (No such file
or directory)
write(2, "xgcc: fatal error: cannot read s"..., 87xgcc: fatal error:
cannot read spec file ‘libgomp.spec’: No such file or directory
Turns out it's grabbing the file from my system path, the strace output
is below. I'll submit the patch to move it to libgomp, thank you for
bringing this up.
```
[pjepjeno@pjepjeno-arch ~/gcc] strace build/trunk/objs/gcc/xgcc
-B/home/pjepjeno/gcc/build/trunk/objs/gcc
src/trunk/gcc/testsuite/gcc.dg/ipa/ipcp-cb1.c -fdiagnostics-plain-output
-O3 -fopenmp -flto -std=gnu99 -fdump-ipa-cp-details -lm -o ipcp-cb1 2>&1
| grep libgomp.spec
access("/home/pjepjeno/gcc/build/trunk/objs/gcc/x86_64-pc-linux-gnu/16.0.0/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/home/pjepjeno/gcc/build/trunk/objs/gcc/libgomp.spec", R_OK) =
-1 ENOENT (No such file or directory)
access("/home/pjepjeno/gcc/build/trunk/objs/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/home/pjepjeno/gcc/build/trunk/objs/gcc/../lib/gcc/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/home/pjepjeno/gcc/build/trunk/objs/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/16.0.0/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/home/pjepjeno/gcc/build/trunk/objs/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../x86_64-pc-linux-gnu/lib/../lib64/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/home/pjepjeno/gcc/build/trunk/objs/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../x86_64-pc-linux-gnu/16.0.0/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/home/pjepjeno/gcc/build/trunk/objs/gcc/../lib/gcc/x86_64-pc-linux-gnu/16.0.0/../../../../lib64/libgomp.spec",
R_OK) = -1 ENOENT (No such file or directory)
access("/lib/x86_64-pc-linux-gnu/16.0.0/libgomp.spec", R_OK) = -1 ENOENT
(No such file or directory)
access("/lib/../lib64/libgomp.spec", R_OK) = 0
openat(AT_FDCWD, "/lib/../lib64/libgomp.spec", O_RDONLY) = 3
newfstatat(AT_FDCWD, "/lib/../lib64/libgomp.spec",
{st_mode=S_IFREG|0644, st_size=169, ...}, 0) = 0
```
Best regards,
Josef