All of lore.kernel.org
 help / color / mirror / Atom feed
* Help: consul do_compile failed after go upgrade to v1.12.
@ 2019-03-19  3:15 Hongzhi, Song
  2019-03-19  3:37 ` Bruce Ashfield
  0 siblings, 1 reply; 3+ messages in thread
From: Hongzhi, Song @ 2019-03-19  3:15 UTC (permalink / raw)
  To: Bruce Ashfield, meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]

Hi Bruce,

There is a failure on do_compile of consul under meta-cloud-services.

This is introduced by go-1.12 which was upgraded several days ago.


But it can't be reproduced on my ubuntu-host, while only be reproduced 
on Yocto.

I try my best to fix it but has no result.

So, I will be great appreciate for anyone's help.


Thanks,

Hongzhi


There are some info about the failure:


Error info:

[

    # github.com/hashicorp/consul/connect/certgen
    type..eUfRrckI: missing section for relocation target type..FEeY9FdU
    type..eUfRrckI: reloc 8 (R_CALL) to non-elf symbol type..FEeY9FdU
    (outer=type..FEeY9FdU) 49 (SABIALIAS)
    # github.com/hashicorp/consul
    type..eUfRrckI: missing section for relocation target type..FEeY9FdU
    type..K6Uq9NPs: missing section for relocation target type..tBBUxeDj

]

    The above info come from go/src/cmd/link/internal/ld/data.go


Commit ID from go upstream:

    685aca45dc8435df7b7e8059a42a8a98efdaf22c

    cmd/compile, cmd/link: separate stable and internal ABIs


Script: consul: run.do_compile

    The following command failed with -linkshared. It will pass if
    remove -linkshared.

    x86_64-poky-linux-go install *-linkshared* -p 128 -v -ldflags="-r
    /usr/lib/go/pkg/linux_amd64_dynlink  -extldflags ' -m64 -march=core2
    -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong 
    -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
    -Werror=format-security
    --sysroot=/ala-lpggp22/hsong/poky/build/tmp/work/core2-64-poky-linux/consul/git-r0/recipe-sysroot
    -Wl,-rpath-link=/ala-lpggp22/hsong/poky/build/tmp/work/core2-64-poky-linux/consul/git-r0/recipe-sysroot/usr/lib/go/pkg/linux_amd64_dynlink
    -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
    -fstack-protector-strong -Wl,-z,relro,-z,now'" -buildmode=pie
    `go_list_packages`


[EOF]



[-- Attachment #2: Type: text/html, Size: 2789 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help: consul do_compile failed after go upgrade to v1.12.
  2019-03-19  3:15 Help: consul do_compile failed after go upgrade to v1.12 Hongzhi, Song
@ 2019-03-19  3:37 ` Bruce Ashfield
  2019-03-25 18:10   ` Mark Asselstine
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2019-03-19  3:37 UTC (permalink / raw)
  To: Hongzhi, Song; +Cc: meta-virtualization

On Mon, Mar 18, 2019 at 11:16 PM Hongzhi, Song
<hongzhi.song@windriver.com> wrote:
>
> Hi Bruce,
>
> There is a failure on do_compile of consul under meta-cloud-services.
>
> This is introduced by go-1.12 which was upgraded several days ago.
>

Yep. I had also noticed this and reported it on the #overc freenode channel.
My hands are full with a few other issues, but I'm hoping to have a closer
look at it by the end of the week.

But if anyone else has a patch, I wouldn't object to it :D

Bruce

>
> But it can't be reproduced on my ubuntu-host, while only be reproduced on Yocto.
>
> I try my best to fix it but has no result.
>
> So, I will be great appreciate for anyone's help.
>
>
> Thanks,
>
> Hongzhi
>
>
> There are some info about the failure:
>
>
> Error info:
>
> [
>
> # github.com/hashicorp/consul/connect/certgen
> type..eUfRrckI: missing section for relocation target type..FEeY9FdU
> type..eUfRrckI: reloc 8 (R_CALL) to non-elf symbol type..FEeY9FdU (outer=type..FEeY9FdU) 49 (SABIALIAS)
> # github.com/hashicorp/consul
> type..eUfRrckI: missing section for relocation target type..FEeY9FdU
> type..K6Uq9NPs: missing section for relocation target type..tBBUxeDj
>
> ]
>
> The above info come from go/src/cmd/link/internal/ld/data.go
>
>
> Commit ID from go upstream:
>
> 685aca45dc8435df7b7e8059a42a8a98efdaf22c
>
> cmd/compile, cmd/link: separate stable and internal ABIs
>
>
> Script: consul: run.do_compile
>
> The following command failed with -linkshared. It will pass if remove -linkshared.
>
> x86_64-poky-linux-go install -linkshared -p 128 -v -ldflags="-r /usr/lib/go/pkg/linux_amd64_dynlink  -extldflags ' -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/ala-lpggp22/hsong/poky/build/tmp/work/core2-64-poky-linux/consul/git-r0/recipe-sysroot -Wl,-rpath-link=/ala-lpggp22/hsong/poky/build/tmp/work/core2-64-poky-linux/consul/git-r0/recipe-sysroot/usr/lib/go/pkg/linux_amd64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now'" -buildmode=pie `go_list_packages`
>
>
> [EOF]
>
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help: consul do_compile failed after go upgrade to v1.12.
  2019-03-19  3:37 ` Bruce Ashfield
@ 2019-03-25 18:10   ` Mark Asselstine
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Asselstine @ 2019-03-25 18:10 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

On Mon, Mar 18, 2019 at 11:38 PM Bruce Ashfield
<bruce.ashfield@gmail.com> wrote:
>
> On Mon, Mar 18, 2019 at 11:16 PM Hongzhi, Song
> <hongzhi.song@windriver.com> wrote:
> >
> > Hi Bruce,
> >
> > There is a failure on do_compile of consul under meta-cloud-services.
> >
> > This is introduced by go-1.12 which was upgraded several days ago.
> >
>
> Yep. I had also noticed this and reported it on the #overc freenode channel.
> My hands are full with a few other issues, but I'm hoping to have a closer
> look at it by the end of the week.
>
> But if anyone else has a patch, I wouldn't object to it :D

The issue is we are often overwriting GOROOT when we should not be.
Actually the go.bbclass is doing this when it should not be. This is
covered in detail here:
https://dave.cheney.net/2013/06/14/you-dont-need-to-set-goroot-really

As describe GOROOT is already properly set in our cross compiled go
tool and should not be overwritten. We can see this patch by doing the
equivalent of 'go env GOROOT' in a devshell (replacing go with the
full cross go toolname).

By overwriting GOROOT we are getting a mixmatch of std pkgs as well I
am not quite sure what tools are used as the GOROOT is used to define
two other paths:
$GOROOT/pkg/tool/$GOOS_$GOARCH and $GOROOT/pkg/$GOOS_$GOARCH
and $GOROOT/pkg/tool/$GOOS_$GOARCH simply doesn't exist.

I still need to do some investigation around this but I am able to
reproduce the issue and I am able to resolve the issue by not setting
GOROOT. Once I am satisfied with my findings I will send something
out, at this point it looks like a patch to oe-core's go.bbclass.

MarkA

>
> Bruce
>
> >
> > But it can't be reproduced on my ubuntu-host, while only be reproduced on Yocto.
> >
> > I try my best to fix it but has no result.
> >
> > So, I will be great appreciate for anyone's help.
> >
> >
> > Thanks,
> >
> > Hongzhi
> >
> >
> > There are some info about the failure:
> >
> >
> > Error info:
> >
> > [
> >
> > # github.com/hashicorp/consul/connect/certgen
> > type..eUfRrckI: missing section for relocation target type..FEeY9FdU
> > type..eUfRrckI: reloc 8 (R_CALL) to non-elf symbol type..FEeY9FdU (outer=type..FEeY9FdU) 49 (SABIALIAS)
> > # github.com/hashicorp/consul
> > type..eUfRrckI: missing section for relocation target type..FEeY9FdU
> > type..K6Uq9NPs: missing section for relocation target type..tBBUxeDj
> >
> > ]
> >
> > The above info come from go/src/cmd/link/internal/ld/data.go
> >
> >
> > Commit ID from go upstream:
> >
> > 685aca45dc8435df7b7e8059a42a8a98efdaf22c
> >
> > cmd/compile, cmd/link: separate stable and internal ABIs
> >
> >
> > Script: consul: run.do_compile
> >
> > The following command failed with -linkshared. It will pass if remove -linkshared.
> >
> > x86_64-poky-linux-go install -linkshared -p 128 -v -ldflags="-r /usr/lib/go/pkg/linux_amd64_dynlink  -extldflags ' -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/ala-lpggp22/hsong/poky/build/tmp/work/core2-64-poky-linux/consul/git-r0/recipe-sysroot -Wl,-rpath-link=/ala-lpggp22/hsong/poky/build/tmp/work/core2-64-poky-linux/consul/git-r0/recipe-sysroot/usr/lib/go/pkg/linux_amd64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now'" -buildmode=pie `go_list_packages`
> >
> >
> > [EOF]
> >
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-25 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19  3:15 Help: consul do_compile failed after go upgrade to v1.12 Hongzhi, Song
2019-03-19  3:37 ` Bruce Ashfield
2019-03-25 18:10   ` Mark Asselstine

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.