public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ian at airs dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug go/104973] GCC 11.2.1 build failure with Go support (mv: cannot stat 'cpugen.o': No such file or directory)
Date: Fri, 18 Mar 2022 04:46:16 +0000	[thread overview]
Message-ID: <bug-104973-4-stjkcEGFPN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104973-4@http.gcc.gnu.org/bugzilla/>

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?

  parent reply	other threads:[~2022-03-18  4:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  2:05 [Bug go/104973] New: " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-104973-4-stjkcEGFPN@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).