All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runc-opencontainers: use bfd even with ld-is-gold
@ 2021-05-03 13:40 Martin Jansa
       [not found] ` <f58ef464-89ce-755a-988b-5ebc6fc28fbe@gmail.com>
  2021-05-07  3:08 ` Bruce Ashfield
  0 siblings, 2 replies; 5+ messages in thread
From: Martin Jansa @ 2021-05-03 13:40 UTC (permalink / raw)
  To: meta-virtualization; +Cc: raj.khem, Martin Jansa

* just a work around for internal error in binutils-2.36 gold:
  http://errors.yoctoproject.org/Errors/Details/580099/
  CGO_ENABLED=1 x86_64-oe-linux-go build -trimpath  -tags "seccomp seccomp                       netgo osusergo" -ldflags "-w -extldflags -static -X main.gitCommit="fce58ab2d5c488bc573d02712db476a6daa9a60c-dirty" -X main.version=1.0.0-rc93+dev " -o runc .
  TOPDIR/tmp-glibc/work/core2-64-oe-linux/runc-opencontainers/1.0.0-rc93+gitAUTOINC+fce58ab2d5-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.0.1/ld: internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
  collect2: error: ld returned 1 exit status

* it fails like this only together with gcc-11, with gcc-10.3 it
  builds fine even with gold

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 recipes-containers/runc/runc-opencontainers_git.bb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/recipes-containers/runc/runc-opencontainers_git.bb b/recipes-containers/runc/runc-opencontainers_git.bb
index f3ff9a8..51ba7c9 100644
--- a/recipes-containers/runc/runc-opencontainers_git.bb
+++ b/recipes-containers/runc/runc-opencontainers_git.bb
@@ -8,3 +8,10 @@ SRC_URI = " \
 RUNC_VERSION = "1.0.0-rc93"
 
 CVE_PRODUCT = "runc"
+
+# use BFD when ld-is-gold is used to work around:
+# http://errors.yoctoproject.org/Errors/Details/580099/
+# CGO_ENABLED=1 x86_64-oe-linux-go build -trimpath  -tags "seccomp seccomp                       netgo osusergo" -ldflags "-w -extldflags -static -X main.gitCommit="fce58ab2d5c488bc573d02712db476a6daa9a60c-dirty" -X main.version=1.0.0-rc93+dev " -o runc .
+# TOPDIR/tmp-glibc/work/core2-64-oe-linux/runc-opencontainers/1.0.0-rc93+gitAUTOINC+fce58ab2d5-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.0.1/ld: internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
+# collect2: error: ld returned 1 exit status
+LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
-- 
2.30.2


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

* Re: [PATCH] runc-opencontainers: use bfd even with ld-is-gold
       [not found] ` <f58ef464-89ce-755a-988b-5ebc6fc28fbe@gmail.com>
@ 2021-05-03 15:39   ` Martin Jansa
       [not found]   ` <167B98ADE3C05EB1.24705@lists.yoctoproject.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2021-05-03 15:39 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-virtualization

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

runc-opencontainers is the only recipe currently failing like this for me
with gold, so instead of switching system linker I would prefer to force
bfd only here.

But there is also one more issue which is probably introduced by gcc-11 (I
had older version of your patches with 11.0.1 in my branches, so waiting
for build to confirm if it's reproducible with 11.1.0 as well):

NOTE: > Executing update_font_cache intercept ...
NOTE: Exit code 132. Output:
+ '[' True = False -a qemuwrapper-cross '!=' nativesdk-qemuwrapper-cross ']'
+ qemu-i386 -r 3.2.0 -E
LD_LIBRARY_PATH=/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs/usr/lib:/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs/lib
-L
/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs
-E FC_DEBUG=16
/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs/usr/libexec/fc-cache
--sysroot=/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs
--system-only -v
qemu: uncaught target signal 4 (Illegal instruction) - core dumped



On Mon, May 3, 2021 at 5:25 PM Khem Raj <raj.khem@gmail.com> wrote:

>
>
> On 5/3/21 6:40 AM, Martin Jansa wrote:
> > * just a work around for internal error in binutils-2.36 gold:
> >    http://errors.yoctoproject.org/Errors/Details/580099/
> >    CGO_ENABLED=1 x86_64-oe-linux-go build -trimpath  -tags "seccomp
> seccomp                       netgo osusergo" -ldflags "-w -extldflags
> -static -X main.gitCommit="fce58ab2d5c488bc573d02712db476a6daa9a60c-dirty"
> -X main.version=1.0.0-rc93+dev " -o runc .
> >
> TOPDIR/tmp-glibc/work/core2-64-oe-linux/runc-opencontainers/1.0.0-rc93+gitAUTOINC+fce58ab2d5-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.0.1/ld:
> internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
> >    collect2: error: ld returned 1 exit status
> >
> > * it fails like this only together with gcc-11, with gcc-10.3 it
> >    builds fine even with gold
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >   recipes-containers/runc/runc-opencontainers_git.bb | 7 +++++++
> >   1 file changed, 7 insertions(+)
> >
> > diff --git a/recipes-containers/runc/runc-opencontainers_git.bb
> b/recipes-containers/runc/runc-opencontainers_git.bb
> > index f3ff9a8..51ba7c9 100644
> > --- a/recipes-containers/runc/runc-opencontainers_git.bb
> > +++ b/recipes-containers/runc/runc-opencontainers_git.bb
> > @@ -8,3 +8,10 @@ SRC_URI = " \
> >   RUNC_VERSION = "1.0.0-rc93"
> >
> >   CVE_PRODUCT = "runc"
> > +
> > +# use BFD when ld-is-gold is used to work around:
> > +# http://errors.yoctoproject.org/Errors/Details/580099/
> > +# CGO_ENABLED=1 x86_64-oe-linux-go build -trimpath  -tags "seccomp
> seccomp                       netgo osusergo" -ldflags "-w -extldflags
> -static -X main.gitCommit="fce58ab2d5c488bc573d02712db476a6daa9a60c-dirty"
> -X main.version=1.0.0-rc93+dev " -o runc .
> > +#
> TOPDIR/tmp-glibc/work/core2-64-oe-linux/runc-opencontainers/1.0.0-rc93+gitAUTOINC+fce58ab2d5-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.0.1/ld:
> internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
> > +# collect2: error: ld returned 1 exit status
>
> this is because of dwarf-5 defaults in gcc 11 and gold has gotten some
> fixed recently fixes these issues, but we are not backporting them yet
> and perhaps will wait for binutils 2.37 to get it all. Maybe you should
> not use gold as system linker until then to avoid these pitfalls.
>
> > +LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold',
> ' -fuse-ld=bfd ', '', d)}"
> >
>

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

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

* Re: [meta-virtualization] [PATCH] runc-opencontainers: use bfd even with ld-is-gold
       [not found]   ` <167B98ADE3C05EB1.24705@lists.yoctoproject.org>
@ 2021-05-06 17:55     ` Martin Jansa
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2021-05-06 17:55 UTC (permalink / raw)
  To: Khem Raj, meta-virtualization

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

On Mon, May 03, 2021 at 05:39:10PM +0200, Martin Jansa via lists.yoctoproject.org wrote:
> runc-opencontainers is the only recipe currently failing like this for me
> with gold, so instead of switching system linker I would prefer to force
> bfd only here.

In my world builds with ld-is-gold I've found only 2 more recipes which
trigger this internal error.

> But there is also one more issue which is probably introduced by gcc-11 (I
> had older version of your patches with 11.0.1 in my branches, so waiting
> for build to confirm if it's reproducible with 11.1.0 as well):
>
> NOTE: > Executing update_font_cache intercept ...
> NOTE: Exit code 132. Output:
> + '[' True = False -a qemuwrapper-cross '!=' nativesdk-qemuwrapper-cross ']'
> + qemu-i386 -r 3.2.0 -E
> LD_LIBRARY_PATH=/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs/usr/lib:/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs/lib
> -L
> /jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs
> -E FC_DEBUG=16
> /jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs/usr/libexec/fc-cache
> --sysroot=/jenkins/mjansa/build/ose/honister/BUILD/work/qemux86-webos-linux/webos-image-ros-world/1.0-r3/rootfs
> --system-only -v
> qemu: uncaught target signal 4 (Illegal instruction) - core dumped

In case someone sees this Illegal instruction as well, then in my case
it was caused by missing "-cpu n270" in qemuwrapper-cross script,
because of how webOS sets PACKAGE_ARCH to be MACHINE_ARCH by default
QEMU_OPTIONS didn't include QEMU_EXTRAOPTIONS_core2-32.

It used to work with default cpu in qemu-i386 until now, I think it
stopped working when fontconfig was rebuilt with gcc-11, but not 100%
sure.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

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

* Re: [meta-virtualization] [PATCH] runc-opencontainers: use bfd even with ld-is-gold
  2021-05-03 13:40 [PATCH] runc-opencontainers: use bfd even with ld-is-gold Martin Jansa
       [not found] ` <f58ef464-89ce-755a-988b-5ebc6fc28fbe@gmail.com>
@ 2021-05-07  3:08 ` Bruce Ashfield
  2021-05-07  8:43   ` Martin Jansa
  1 sibling, 1 reply; 5+ messages in thread
From: Bruce Ashfield @ 2021-05-07  3:08 UTC (permalink / raw)
  To: Martin Jansa; +Cc: meta-virtualization, Khem Raj

This is on master-next now.

From the follow ups, I assume that this is still needed. Once I get a
bit of soak and runtime testing done on some other queued changes,
this will be part of my next push.

Bruce

On Mon, May 3, 2021 at 9:40 AM Martin Jansa <Martin.Jansa@gmail.com> wrote:
>
> * just a work around for internal error in binutils-2.36 gold:
>   http://errors.yoctoproject.org/Errors/Details/580099/
>   CGO_ENABLED=1 x86_64-oe-linux-go build -trimpath  -tags "seccomp seccomp                       netgo osusergo" -ldflags "-w -extldflags -static -X main.gitCommit="fce58ab2d5c488bc573d02712db476a6daa9a60c-dirty" -X main.version=1.0.0-rc93+dev " -o runc .
>   TOPDIR/tmp-glibc/work/core2-64-oe-linux/runc-opencontainers/1.0.0-rc93+gitAUTOINC+fce58ab2d5-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.0.1/ld: internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
>   collect2: error: ld returned 1 exit status
>
> * it fails like this only together with gcc-11, with gcc-10.3 it
>   builds fine even with gold
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  recipes-containers/runc/runc-opencontainers_git.bb | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/recipes-containers/runc/runc-opencontainers_git.bb b/recipes-containers/runc/runc-opencontainers_git.bb
> index f3ff9a8..51ba7c9 100644
> --- a/recipes-containers/runc/runc-opencontainers_git.bb
> +++ b/recipes-containers/runc/runc-opencontainers_git.bb
> @@ -8,3 +8,10 @@ SRC_URI = " \
>  RUNC_VERSION = "1.0.0-rc93"
>
>  CVE_PRODUCT = "runc"
> +
> +# use BFD when ld-is-gold is used to work around:
> +# http://errors.yoctoproject.org/Errors/Details/580099/
> +# CGO_ENABLED=1 x86_64-oe-linux-go build -trimpath  -tags "seccomp seccomp                       netgo osusergo" -ldflags "-w -extldflags -static -X main.gitCommit="fce58ab2d5c488bc573d02712db476a6daa9a60c-dirty" -X main.version=1.0.0-rc93+dev " -o runc .
> +# TOPDIR/tmp-glibc/work/core2-64-oe-linux/runc-opencontainers/1.0.0-rc93+gitAUTOINC+fce58ab2d5-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.0.1/ld: internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
> +# collect2: error: ld returned 1 exit status
> +LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
> --
> 2.30.2
>
>
> 
>


-- 
- 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] 5+ messages in thread

* Re: [meta-virtualization] [PATCH] runc-opencontainers: use bfd even with ld-is-gold
  2021-05-07  3:08 ` Bruce Ashfield
@ 2021-05-07  8:43   ` Martin Jansa
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2021-05-07  8:43 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization, Khem Raj

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

Thanks Bruce, yes it's still needed as work around for those with
ld-is-gold in DISTRO_FEATURES. Once binutils are upgraded in oe-core I'll
retest and send removal of this once it starts working fine again.

On Fri, May 7, 2021 at 5:08 AM Bruce Ashfield <bruce.ashfield@gmail.com>
wrote:

> This is on master-next now.
>
> From the follow ups, I assume that this is still needed. Once I get a
> bit of soak and runtime testing done on some other queued changes,
> this will be part of my next push.
>
> Bruce
>
> On Mon, May 3, 2021 at 9:40 AM Martin Jansa <Martin.Jansa@gmail.com>
> wrote:
> >
> > * just a work around for internal error in binutils-2.36 gold:
> >   http://errors.yoctoproject.org/Errors/Details/580099/
> >   CGO_ENABLED=1 x86_64-oe-linux-go build -trimpath  -tags "seccomp
> seccomp                       netgo osusergo" -ldflags "-w -extldflags
> -static -X main.gitCommit="fce58ab2d5c488bc573d02712db476a6daa9a60c-dirty"
> -X main.version=1.0.0-rc93+dev " -o runc .
> >
>  TOPDIR/tmp-glibc/work/core2-64-oe-linux/runc-opencontainers/1.0.0-rc93+gitAUTOINC+fce58ab2d5-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.0.1/ld:
> internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
> >   collect2: error: ld returned 1 exit status
> >
> > * it fails like this only together with gcc-11, with gcc-10.3 it
> >   builds fine even with gold
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  recipes-containers/runc/runc-opencontainers_git.bb | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/recipes-containers/runc/runc-opencontainers_git.bb
> b/recipes-containers/runc/runc-opencontainers_git.bb
> > index f3ff9a8..51ba7c9 100644
> > --- a/recipes-containers/runc/runc-opencontainers_git.bb
> > +++ b/recipes-containers/runc/runc-opencontainers_git.bb
> > @@ -8,3 +8,10 @@ SRC_URI = " \
> >  RUNC_VERSION = "1.0.0-rc93"
> >
> >  CVE_PRODUCT = "runc"
> > +
> > +# use BFD when ld-is-gold is used to work around:
> > +# http://errors.yoctoproject.org/Errors/Details/580099/
> > +# CGO_ENABLED=1 x86_64-oe-linux-go build -trimpath  -tags "seccomp
> seccomp                       netgo osusergo" -ldflags "-w -extldflags
> -static -X main.gitCommit="fce58ab2d5c488bc573d02712db476a6daa9a60c-dirty"
> -X main.version=1.0.0-rc93+dev " -o runc .
> > +#
> TOPDIR/tmp-glibc/work/core2-64-oe-linux/runc-opencontainers/1.0.0-rc93+gitAUTOINC+fce58ab2d5-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/11.0.1/ld:
> internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
> > +# collect2: error: ld returned 1 exit status
> > +LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold',
> ' -fuse-ld=bfd ', '', d)}"
> > --
> > 2.30.2
> >
> >
> > 
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>

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

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

end of thread, other threads:[~2021-05-07  8:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 13:40 [PATCH] runc-opencontainers: use bfd even with ld-is-gold Martin Jansa
     [not found] ` <f58ef464-89ce-755a-988b-5ebc6fc28fbe@gmail.com>
2021-05-03 15:39   ` Martin Jansa
     [not found]   ` <167B98ADE3C05EB1.24705@lists.yoctoproject.org>
2021-05-06 17:55     ` [meta-virtualization] " Martin Jansa
2021-05-07  3:08 ` Bruce Ashfield
2021-05-07  8:43   ` Martin Jansa

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.