public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/104973] New: GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory)
@ 2022-03-18 2:05 sam at gentoo dot org
2022-03-18 2:33 ` [Bug go/104973] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: sam at gentoo dot org @ 2022-03-18 2:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104973
Bug ID: 104973
Summary: GCC 11.2.1 build failure with Go support (mv: cannot
stat 'cpugen.o': No such file or directory)
Product: gcc
Version: 11.2.1
URL: https://bugs.gentoo.org/828439
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: sam at gentoo dot org
CC: cmang at google dot com
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
Created attachment 52648
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52648&action=edit
build.log.xz
Initially reported downstream in Gentoo at https://bugs.gentoo.org/828439.
```
/bin/bash ../libtool --tag=CXX --mode=compile
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/xgcc
-shared-libgcc
-B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc -nostdinc++
-L/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src
-L/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127>
libtool: compile: mv -f "cpugen.o" "internal/.libs/cpu.o"
mv: cannot stat 'cpugen.o': No such file or directory
make[4]: *** [Makefile:3001: internal/cpu.lo] Error 1
make[4]: Leaving directory
'/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/x86_64-pc-linux-gnu/libgo'
make[3]: *** [Makefile:2327: all-recursive] Error 1
libtool: compile:
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/xgcc
-shared-libgcc
-B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc -nostdinc++
-L/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src
-L/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/x86_64-pc-linux-gn>
make[3]: Leaving directory
'/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/x86_64-pc-linux-gnu/libgo'
make[2]: *** [Makefile:1198: all] Error 2
make[2]: Leaving directory
'/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/x86_64-pc-linux-gnu/libgo'
make[1]: *** [Makefile:21736: all-target-libgo] Error 2
make[1]: *** Waiting for unfinished jobs....
```
Reported for both the 11.2.1 snapshots from 20211127 and 20220115. I don't see
any relevant changes in git since those.
I've attached the full (compressed) build.log which Dennis uploaded in the
original Gentoo bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/104973] GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory)
2022-03-18 2:05 [Bug go/104973] New: GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory) sam at gentoo dot org
@ 2022-03-18 2:33 ` pinskia at gcc dot gnu.org
2022-03-18 4:46 ` ian at airs dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-18 2:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104973
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you attach what is inside cpugen.go?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/104973] GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory)
2022-03-18 2:05 [Bug go/104973] New: GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory) sam at gentoo dot org
2022-03-18 2:33 ` [Bug go/104973] " pinskia at gcc dot gnu.org
@ 2022-03-18 4:46 ` ian at airs dot com
2022-03-18 9:28 ` pageexec at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ian at airs dot com @ 2022-03-18 4:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104973
--- Comment #2 from Ian Lance Taylor <ian at airs dot com> ---
Your build log shows a line like this:
libtool: compile:
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/gccgo
-B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
/usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include
-minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=internal/cpu
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu.go
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu_amd64.go
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu_x86.go
cpugen.go
My build log shows a line like this:
libtool: compile: /home/iant/gcc/gcc-11-objdir/./gcc/gccgo
-B/home/iant/gcc/gcc-11-objdir/./gcc/
-B/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/bin/
-B/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/lib/ -isystem
/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/include -isystem
/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/sys-include -fchecking=1
-minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=internal/cpu
../../../gcc-11-branch/libgo/go/internal/cpu/cpu.go
../../../gcc-11-branch/libgo/go/internal/cpu/cpu_amd64.go
../../../gcc-11-branch/libgo/go/internal/cpu/cpu_x86.go cpugen.go -fPIC -o
internal/.libs/cpu.o
Note that my line has a -o ption at the end but yours does not.
I think that is the root of the problem.
Earlier your log has this:
/usr/sbin/mkdir -p internal; files=`echo
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu.go
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu_amd64.go
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/libgo/go/internal/cpu/cpu_x86.go
cpugen.go | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; /bin/bash ./libtool
--tag GO --mode=compile
/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/gccgo
-B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
/usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include
-minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=`echo internal/cpu.lo |
sed -e 's/.lo$//'` -o internal/cpu.lo $files
My log has this:
/bin/mkdir -p internal; files=`echo
../../../gcc-11-branch/libgo/go/internal/cpu/cpu.go
../../../gcc-11-branch/libgo/go/internal/cpu/cpu_amd64.go
../../../gcc-11-branch/libgo/go/internal/cpu/cpu_x86.go cpugen.go | sed -e
's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; /bin/sh ./libtool --tag GO
--mode=compile /home/iant/gcc/gcc-11-objdir/./gcc/gccgo
-B/home/iant/gcc/gcc-11-objdir/./gcc/
-B/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/bin/
-B/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/lib/ -isystem
/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/include -isystem
/home/iant/gcc/gcc-11-install/x86_64-pc-linux-gnu/sys-include -fchecking=1
-minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=`echo internal/cpu.lo | sed
-e 's/.lo$//'` -o internal/cpu.lo $files
Here the -o option is present in both cases.
So why does the -o option disappear? Could this be somehow due to the patches
being applied at the start of your build log?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/104973] GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory)
2022-03-18 2:05 [Bug go/104973] New: GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory) sam at gentoo dot org
2022-03-18 2:33 ` [Bug go/104973] " pinskia at gcc dot gnu.org
2022-03-18 4:46 ` ian at airs dot com
@ 2022-03-18 9:28 ` pageexec at gmail dot com
2022-03-18 18:32 ` ian at airs dot com
2022-03-19 17:43 ` sam at gentoo dot org
4 siblings, 0 replies; 6+ messages in thread
From: pageexec at gmail dot com @ 2022-03-18 9:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104973
--- Comment #3 from PaX Team <pageexec at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> Can you attach what is inside cpugen.go?
i'm one of the original bug reproducers, this is what i get here:
------------------------------------------------------------
work # find . -name cpugen.go -ls
29921892 4 -rw-r--r-- 1 root root 74 Mar 18 10:13
./build/x86_64-pc-linux-gnu/libgo/cpugen.go
29922436 4 -rw-r--r-- 1 root root 74 Mar 18 10:13
./build/x86_64-pc-linux-gnu/32/libgo/cpugen.go
work # cat ./build/x86_64-pc-linux-gnu/libgo/cpugen.go
package cpu
const CacheLinePadSize = 64
const FunctionDescriptors = false
work # cat ./build/x86_64-pc-linux-gnu/32/libgo/cpugen.go
package cpu
const CacheLinePadSize = 64
const FunctionDescriptors = false
------------------------------------------------------------
the relevant build log:
libtool: compile:
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/./gcc/gccgo
-B/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/./gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
/usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include
-fchecking=1 -minline-all-stringops -O2 -g -m32 -I . -c
-fgo-pkgpath=golang.org/x/sys/cpu
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/byteorder.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/cpu.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/cpu_gccgo_x86.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/cpu_linux_noinit.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/cpu_x86.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/hwcap_linux.go
gcpugen.go -fPIC -o golang.org/x/sys/.libs/cpu.o
libtool: compile:
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/./gcc/gccgo
-B/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/./gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
/usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include
-fchecking=1 -minline-all-stringops -O2 -g -m32 -I . -c
-fgo-pkgpath=golang.org/x/sys/cpu
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/byteorder.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/cpu.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/cpu_gccgo_x86.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/cpu_linux_noinit.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/cpu_x86.go
/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libgo/go/golang.org/x/sys/cpu/hwcap_linux
.go gcpugen.go -o golang.org/x/sys/cpu.o >/dev/null 2>&1
note that there's a -o output specified but it's for the 'wrong' file name.
i've got these cpu.o files:
work # find . -name cpu.o -ls
29922270 60 -rw-r--r-- 1 root root 58160 Mar 18 10:13
./build/x86_64-pc-linux-gnu/libgo/cpu.o
29923192 44 -rw-r--r-- 1 root root 41656 Mar 18 10:13
./build/x86_64-pc-linux-gnu/32/libgo/internal/cpu.o
29922867 44 -rw-r--r-- 1 root root 43384 Mar 18 10:13
./build/x86_64-pc-linux-gnu/32/libgo/internal/.libs/cpu.o
29927256 92 -rw-r--r-- 1 root root 92688 Mar 18 10:15
./build/x86_64-pc-linux-gnu/32/libgo/golang.org/x/sys/cpu.o
29927254 96 -rw-r--r-- 1 root root 95608 Mar 18 10:15
./build/x86_64-pc-linux-gnu/32/libgo/golang.org/x/sys/.libs/cpu.o
would you like me to upload anything of the above or any other build files?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/104973] GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory)
2022-03-18 2:05 [Bug go/104973] New: GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory) sam at gentoo dot org
` (2 preceding siblings ...)
2022-03-18 9:28 ` pageexec at gmail dot com
@ 2022-03-18 18:32 ` ian at airs dot com
2022-03-19 17:43 ` sam at gentoo dot org
4 siblings, 0 replies; 6+ messages in thread
From: ian at airs dot com @ 2022-03-18 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104973
--- Comment #4 from Ian Lance Taylor <ian at airs dot com> ---
The golang.org/x/sys/cpu.o is a different object file. That one uses
gcpugen.go, not cpugen.go. The original reporter is not reporting any problems
involving gcpugen.go. The cpugen.go (not gcpugen.go) file is an input for
internal/cpu.o.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/104973] GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory)
2022-03-18 2:05 [Bug go/104973] New: GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory) sam at gentoo dot org
` (3 preceding siblings ...)
2022-03-18 18:32 ` ian at airs dot com
@ 2022-03-19 17:43 ` sam at gentoo dot org
4 siblings, 0 replies; 6+ messages in thread
From: sam at gentoo dot org @ 2022-03-19 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104973
--- Comment #5 from Sam James <sam at gentoo dot org> ---
I'm forwarding a report from downstream which two people have commented in:
1. Dennis, the original reporter;
2. PaX Team, who commented too.
They're likely the same issue or related. I can't reproduce it myself yet, but
I've tried repeatedly.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-19 17:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 2:05 [Bug go/104973] New: GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory) sam at gentoo dot org
2022-03-18 2:33 ` [Bug go/104973] " pinskia at gcc dot gnu.org
2022-03-18 4:46 ` ian at airs dot com
2022-03-18 9:28 ` pageexec at gmail dot com
2022-03-18 18:32 ` ian at airs dot com
2022-03-19 17:43 ` sam at gentoo dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).