* how to debug go build errors
@ 2018-02-08 23:24 Martin Sebor
2018-02-09 0:39 ` Ian Lance Taylor
2018-02-09 0:41 ` Martin Sebor
0 siblings, 2 replies; 4+ messages in thread
From: Martin Sebor @ 2018-02-08 23:24 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: GCC Mailing List
Hi Ian,
While testing what should be an innocuous patch to add LTO
to a bunch of middle-end warning options
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00381.html
I get Go errors during ordinary bootstrap about undefined names
for errno constants:
/opt/notnfs/msebor/src/gcc/84212/libgo/go/syscall/env_unix.go:96:10:
error: reference to undefined name âEINVALâ
Bootstrapping all other front ends (including Ada and Brig),
succeeds and there are no regressions in the test suite.
I have no experience with Go. Does anything about the patch
jump out at you that could be causing this? If not, can you
suggest how to debug it?
Thanks
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to debug go build errors
2018-02-08 23:24 how to debug go build errors Martin Sebor
@ 2018-02-09 0:39 ` Ian Lance Taylor
2018-02-09 0:50 ` Martin Sebor
2018-02-09 0:41 ` Martin Sebor
1 sibling, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2018-02-09 0:39 UTC (permalink / raw)
To: Martin Sebor; +Cc: GCC Mailing List
On Thu, Feb 8, 2018 at 3:24 PM, Martin Sebor <msebor@gmail.com> wrote:
>
> While testing what should be an innocuous patch to add LTO
> to a bunch of middle-end warning options
>
> https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00381.html
>
> I get Go errors during ordinary bootstrap about undefined names
> for errno constants:
>
> /opt/notnfs/msebor/src/gcc/84212/libgo/go/syscall/env_unix.go:96:10: error:
> reference to undefined name ‘EINVAL’
>
> Bootstrapping all other front ends (including Ada and Brig),
> succeeds and there are no regressions in the test suite.
>
> I have no experience with Go. Does anything about the patch
> jump out at you that could be causing this? If not, can you
> suggest how to debug it?
No, I don't see why your patch would cause this problem.
EINVAL should be defined in the generated file
TARGET/libgo/sysinfo.go. You should see, among many others, the lines
const _EINVAL = 22
and
const EINVAL = Errno(_EINVAL)
That file is built by the shell script libgo/mksysinfo.sh, which looks
at the generated file TARGET/libgo/gen-sysinfo.go. The gen-sysinfo.go
file is built by running the C compiler with the -fdump-go-spec option
on the file libgo/sysinfo.c (essentially GCC_FOR_TARGET
-fdump-go-spec=gen-sysinfo.go -std=gnu99 -S sysinfo.c). I guess
something along that chain has broken, but I don't know what.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to debug go build errors
2018-02-09 0:39 ` Ian Lance Taylor
@ 2018-02-09 0:50 ` Martin Sebor
0 siblings, 0 replies; 4+ messages in thread
From: Martin Sebor @ 2018-02-09 0:50 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: GCC Mailing List
On 02/08/2018 05:39 PM, Ian Lance Taylor wrote:
> On Thu, Feb 8, 2018 at 3:24 PM, Martin Sebor <msebor@gmail.com> wrote:
>>
>> While testing what should be an innocuous patch to add LTO
>> to a bunch of middle-end warning options
>>
>> https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00381.html
>>
>> I get Go errors during ordinary bootstrap about undefined names
>> for errno constants:
>>
>> /opt/notnfs/msebor/src/gcc/84212/libgo/go/syscall/env_unix.go:96:10: error:
>> reference to undefined name âEINVALâ
>>
>> Bootstrapping all other front ends (including Ada and Brig),
>> succeeds and there are no regressions in the test suite.
>>
>> I have no experience with Go. Does anything about the patch
>> jump out at you that could be causing this? If not, can you
>> suggest how to debug it?
>
> No, I don't see why your patch would cause this problem.
>
> EINVAL should be defined in the generated file
> TARGET/libgo/sysinfo.go. You should see, among many others, the lines
> const _EINVAL = 22
> and
> const EINVAL = Errno(_EINVAL)
>
> That file is built by the shell script libgo/mksysinfo.sh, which looks
> at the generated file TARGET/libgo/gen-sysinfo.go. The gen-sysinfo.go
> file is built by running the C compiler with the -fdump-go-spec option
> on the file libgo/sysinfo.c (essentially GCC_FOR_TARGET
> -fdump-go-spec=gen-sysinfo.go -std=gnu99 -S sysinfo.c). I guess
> something along that chain has broken, but I don't know what.
I've figured out what was causing it -- a silly typo. (Our
emails must have crossed by barely a couple of minutes).
Thanks for the quick reply though!
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to debug go build errors
2018-02-08 23:24 how to debug go build errors Martin Sebor
2018-02-09 0:39 ` Ian Lance Taylor
@ 2018-02-09 0:41 ` Martin Sebor
1 sibling, 0 replies; 4+ messages in thread
From: Martin Sebor @ 2018-02-09 0:41 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: GCC Mailing List
Never mind. I see the problem. I overlooked a few failures
in the preprocessor test suite. Turns out the patch accidentally
deletes the -d option from the .opt file. I didn't notice it in
the diff because the "-d" at the beginning of the line looks just
like the option is still there!
@@ -1186,7 +1186,6 @@ ansi
C ObjC C++ ObjC++
A synonym for -std=c89 (for C) or -std=c++98 (for C++).
-d
C ObjC C++ ObjC++ Joined
; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
Sorry for the noise!
On 02/08/2018 04:24 PM, Martin Sebor wrote:
> Hi Ian,
>
> While testing what should be an innocuous patch to add LTO
> to a bunch of middle-end warning options
>
> https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00381.html
>
> I get Go errors during ordinary bootstrap about undefined names
> for errno constants:
>
> /opt/notnfs/msebor/src/gcc/84212/libgo/go/syscall/env_unix.go:96:10:
> error: reference to undefined name âEINVALâ
>
> Bootstrapping all other front ends (including Ada and Brig),
> succeeds and there are no regressions in the test suite.
>
> I have no experience with Go. Does anything about the patch
> jump out at you that could be causing this? If not, can you
> suggest how to debug it?
>
> Thanks
> Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-09 0:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 23:24 how to debug go build errors Martin Sebor
2018-02-09 0:39 ` Ian Lance Taylor
2018-02-09 0:50 ` Martin Sebor
2018-02-09 0:41 ` Martin Sebor
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).