All of lore.kernel.org
 help / color / mirror / Atom feed
* Clang LLVM do_package strip error
@ 2023-10-23 16:29 Martin Townsend
  2023-10-23 16:43 ` [yocto] " Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Townsend @ 2023-10-23 16:29 UTC (permalink / raw)
  To: yocto

Hi,

I've updated the project I'm working on to kirkstone and using GCC it
is working.  We want to move to Clang but I've seen a couple of
recipes fail in do_package with a similar error.  Here is the output
for runc-opencontainers, the package tini has something similar


ERROR: runc-opencontainers-1.1.4+gitAUTOINC+974efd2dfc-r0 do_package:
Fatal errors occurred in subprocesses:
Command '['aarch64-poky-linux-llvm-objcopy', '--only-keep-debug',
'/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/package/usr/bin/runc',
'/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/package/usr/bin/.debug/runc']'
returned non-zero exit status 1.
Subprocess output:aarch64-poky-linux-llvm-objcopy: error: Link field
value 47 in section .rela.plt is not a symbol table

ERROR: Logfile of failure stored in:
/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/temp/log.do_package.2936320
ERROR: Task (/ws/extra/octopus/octave-kirkstone/build-cad-devel/../sources/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb:do_package)
failed with exit code '1'
Pseudo log:
inode mismatch:
'/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/image/usr/bin/docker-runc'
ino 84410787 in db, 84431171 in request.
Setup complete, sending SIGUSR1 to pid 2936321.

I'm sure these used to compile with Clang in dunfell so could this be
a toolchain problem?

I'm using the kirkstone branch of meta-clang and have the following in
my distro conf
PREFERRED_PROVIDER_llvm = "clang"
PREFERRED_PROVIDER_llvm-native = "clang-native"
PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
PROVIDES:pn-clang = "llvm"
PROVIDES:pn-clang-native = "llvm-native"
PROVIDES:pn-nativesdk-clang = "nativesdk-llvm"

and this in local.conf

TOOLCHAIN ?= "clang"
RUNTIME ?= "llvm"

I notice there is a kirkstone-clang12 branch in meta-clang, should I
be using this?
If not, any help in debugging this would be appreciated.

Cheers,
Martin.


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

* Re: [yocto] Clang LLVM do_package strip error
  2023-10-23 16:29 Clang LLVM do_package strip error Martin Townsend
@ 2023-10-23 16:43 ` Khem Raj
  2023-10-24 13:33   ` Martin Townsend
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2023-10-23 16:43 UTC (permalink / raw)
  To: Martin Townsend; +Cc: yocto

On Mon, Oct 23, 2023 at 9:29 AM Martin Townsend <mtownsend1973@gmail.com> wrote:
>
> Hi,
>
> I've updated the project I'm working on to kirkstone and using GCC it
> is working.  We want to move to Clang but I've seen a couple of
> recipes fail in do_package with a similar error.  Here is the output
> for runc-opencontainers, the package tini has something similar
>
>
> ERROR: runc-opencontainers-1.1.4+gitAUTOINC+974efd2dfc-r0 do_package:
> Fatal errors occurred in subprocesses:
> Command '['aarch64-poky-linux-llvm-objcopy', '--only-keep-debug',
> '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/package/usr/bin/runc',
> '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/package/usr/bin/.debug/runc']'
> returned non-zero exit status 1.
> Subprocess output:aarch64-poky-linux-llvm-objcopy: error: Link field
> value 47 in section .rela.plt is not a symbol table
>

Its using clang and also binutils from llvm here and there has been
many fixes we had done to llvm
tools and things are better with clang 17, but since you are on
kirkstone, you might be using older clang
and llvm. So you can try if master branch solves the problem and maybe
next LTS you are set other
option which might be immediately useful would be to fall back to
using objcopy from binutils which you
can do via something like below in site.conf

 OBJCOPY:pn-runc-opencontainers:toolchain-clang = "${HOST_PREFIX}objcopy"


> ERROR: Logfile of failure stored in:
> /ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/temp/log.do_package.2936320
> ERROR: Task (/ws/extra/octopus/octave-kirkstone/build-cad-devel/../sources/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb:do_package)
> failed with exit code '1'
> Pseudo log:
> inode mismatch:
> '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/image/usr/bin/docker-runc'
> ino 84410787 in db, 84431171 in request.
> Setup complete, sending SIGUSR1 to pid 2936321.
>
> I'm sure these used to compile with Clang in dunfell so could this be
> a toolchain problem?
>
> I'm using the kirkstone branch of meta-clang and have the following in
> my distro conf
> PREFERRED_PROVIDER_llvm = "clang"
> PREFERRED_PROVIDER_llvm-native = "clang-native"
> PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
> PROVIDES:pn-clang = "llvm"
> PROVIDES:pn-clang-native = "llvm-native"
> PROVIDES:pn-nativesdk-clang = "nativesdk-llvm"
>
> and this in local.conf
>
> TOOLCHAIN ?= "clang"
> RUNTIME ?= "llvm"
>
> I notice there is a kirkstone-clang12 branch in meta-clang, should I
> be using this?
> If not, any help in debugging this would be appreciated.
>
> Cheers,
> Martin.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#61459): https://lists.yoctoproject.org/g/yocto/message/61459
> Mute This Topic: https://lists.yoctoproject.org/mt/102139152/1997914
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [yocto] Clang LLVM do_package strip error
  2023-10-23 16:43 ` [yocto] " Khem Raj
@ 2023-10-24 13:33   ` Martin Townsend
  2023-10-24 16:51     ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Townsend @ 2023-10-24 13:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

On Mon, Oct 23, 2023 at 5:43 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Mon, Oct 23, 2023 at 9:29 AM Martin Townsend <mtownsend1973@gmail.com> wrote:
> >
> > Hi,
> >
> > I've updated the project I'm working on to kirkstone and using GCC it
> > is working.  We want to move to Clang but I've seen a couple of
> > recipes fail in do_package with a similar error.  Here is the output
> > for runc-opencontainers, the package tini has something similar
> >
> >
> > ERROR: runc-opencontainers-1.1.4+gitAUTOINC+974efd2dfc-r0 do_package:
> > Fatal errors occurred in subprocesses:
> > Command '['aarch64-poky-linux-llvm-objcopy', '--only-keep-debug',
> > '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/package/usr/bin/runc',
> > '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/package/usr/bin/.debug/runc']'
> > returned non-zero exit status 1.
> > Subprocess output:aarch64-poky-linux-llvm-objcopy: error: Link field
> > value 47 in section .rela.plt is not a symbol table
> >
>
> Its using clang and also binutils from llvm here and there has been
> many fixes we had done to llvm
> tools and things are better with clang 17, but since you are on
> kirkstone, you might be using older clang
> and llvm. So you can try if master branch solves the problem and maybe
> next LTS you are set other
> option which might be immediately useful would be to fall back to
> using objcopy from binutils which you
> can do via something like below in site.conf
>
>  OBJCOPY:pn-runc-opencontainers:toolchain-clang = "${HOST_PREFIX}objcopy"
>

Moving to master and modifying a few recipes has fixed these issues
but now docker and containerd-opencontainers are not compiling, for
containerd, grepping for error I can see

vendor/k8s.io/apimachinery/pkg/util/sets/byte.go:34:16: syntax error:
unexpected [, expecting (
vendor/k8s.io/apimachinery/pkg/util/sets/int.go:34:15: syntax error:
unexpected [, expecting (
vendor/k8s.io/apimachinery/pkg/util/sets/int32.go:34:17: syntax error:
unexpected [, expecting (
vendor/k8s.io/apimachinery/pkg/util/sets/int64.go:34:17: syntax error:
unexpected [, expecting (
vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:24:10: syntax
error: unexpected |, expecting semicolon or newline or }
vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:31:9: syntax
error: unexpected |, expecting semicolon or newline or }
vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:38:2: syntax
error: unexpected ~, expecting method or interface name
vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:45:2: syntax
error: unexpected ~, expecting method or interface name
vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:52:2: syntax
error: unexpected ~, expecting method or interface name
vendor/k8s.io/apimachinery/pkg/util/sets/set.go:24:12: syntax error:
unexpected comparable, expecting ]
vendor/k8s.io/apimachinery/pkg/util/sets/set.go:24:12: too many errors

and

make: *** [Makefile:264: bin/containerd-shim] Error 2
make: *** [Makefile:268: bin/containerd-shim-runc-v1] Error 2
make: *** [Makefile:272: bin/containerd-shim-runc-v2] Error 2
make: *** [Makefile:255: bin/ctr] Error 2
make: *** [Makefile:255: bin/containerd-stress] Error 2
make: *** [Makefile:255: bin/containerd] Error 2


It looks like it's compiling go, do I need to do anything special for
clang to compile go? I tried updating the recipe to the latest from
master and still the same error.

The lines from the makefile are

define BUILD_BINARY
@echo "$(WHALE) $@"
$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@
${GO_LDFLAGS} ${GO_TAGS}  ./$<
endef

# Build a binary from a cmd.
bin/%: cmd/% FORCE
    $(call BUILD_BINARY)


> > ERROR: Logfile of failure stored in:
> > /ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/temp/log.do_package.2936320
> > ERROR: Task (/ws/extra/octopus/octave-kirkstone/build-cad-devel/../sources/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb:do_package)
> > failed with exit code '1'
> > Pseudo log:
> > inode mismatch:
> > '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/image/usr/bin/docker-runc'
> > ino 84410787 in db, 84431171 in request.
> > Setup complete, sending SIGUSR1 to pid 2936321.
> >
> > I'm sure these used to compile with Clang in dunfell so could this be
> > a toolchain problem?
> >
> > I'm using the kirkstone branch of meta-clang and have the following in
> > my distro conf
> > PREFERRED_PROVIDER_llvm = "clang"
> > PREFERRED_PROVIDER_llvm-native = "clang-native"
> > PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
> > PROVIDES:pn-clang = "llvm"
> > PROVIDES:pn-clang-native = "llvm-native"
> > PROVIDES:pn-nativesdk-clang = "nativesdk-llvm"
> >
> > and this in local.conf
> >
> > TOOLCHAIN ?= "clang"
> > RUNTIME ?= "llvm"
> >
> > I notice there is a kirkstone-clang12 branch in meta-clang, should I
> > be using this?
> > If not, any help in debugging this would be appreciated.
> >
> > Cheers,
> > Martin.
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > You automatically follow any topics you start or reply to.
> > View/Reply Online (#61459): https://lists.yoctoproject.org/g/yocto/message/61459
> > Mute This Topic: https://lists.yoctoproject.org/mt/102139152/1997914
> > Group Owner: yocto+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >


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

* Re: [yocto] Clang LLVM do_package strip error
  2023-10-24 13:33   ` Martin Townsend
@ 2023-10-24 16:51     ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2023-10-24 16:51 UTC (permalink / raw)
  To: Martin Townsend; +Cc: yocto

On Tue, Oct 24, 2023 at 6:33 AM Martin Townsend <mtownsend1973@gmail.com> wrote:
>
> On Mon, Oct 23, 2023 at 5:43 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Mon, Oct 23, 2023 at 9:29 AM Martin Townsend <mtownsend1973@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I've updated the project I'm working on to kirkstone and using GCC it
> > > is working.  We want to move to Clang but I've seen a couple of
> > > recipes fail in do_package with a similar error.  Here is the output
> > > for runc-opencontainers, the package tini has something similar
> > >
> > >
> > > ERROR: runc-opencontainers-1.1.4+gitAUTOINC+974efd2dfc-r0 do_package:
> > > Fatal errors occurred in subprocesses:
> > > Command '['aarch64-poky-linux-llvm-objcopy', '--only-keep-debug',
> > > '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/package/usr/bin/runc',
> > > '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/package/usr/bin/.debug/runc']'
> > > returned non-zero exit status 1.
> > > Subprocess output:aarch64-poky-linux-llvm-objcopy: error: Link field
> > > value 47 in section .rela.plt is not a symbol table
> > >
> >
> > Its using clang and also binutils from llvm here and there has been
> > many fixes we had done to llvm
> > tools and things are better with clang 17, but since you are on
> > kirkstone, you might be using older clang
> > and llvm. So you can try if master branch solves the problem and maybe
> > next LTS you are set other
> > option which might be immediately useful would be to fall back to
> > using objcopy from binutils which you
> > can do via something like below in site.conf
> >
> >  OBJCOPY:pn-runc-opencontainers:toolchain-clang = "${HOST_PREFIX}objcopy"
> >
>
> Moving to master and modifying a few recipes has fixed these issues
> but now docker and containerd-opencontainers are not compiling, for
> containerd, grepping for error I can see

did you switch all layers in your project to respective master branches ?
if not perhaps that might be the first thing to look at.

>
> vendor/k8s.io/apimachinery/pkg/util/sets/byte.go:34:16: syntax error:
> unexpected [, expecting (
> vendor/k8s.io/apimachinery/pkg/util/sets/int.go:34:15: syntax error:
> unexpected [, expecting (
> vendor/k8s.io/apimachinery/pkg/util/sets/int32.go:34:17: syntax error:
> unexpected [, expecting (
> vendor/k8s.io/apimachinery/pkg/util/sets/int64.go:34:17: syntax error:
> unexpected [, expecting (
> vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:24:10: syntax
> error: unexpected |, expecting semicolon or newline or }
> vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:31:9: syntax
> error: unexpected |, expecting semicolon or newline or }
> vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:38:2: syntax
> error: unexpected ~, expecting method or interface name
> vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:45:2: syntax
> error: unexpected ~, expecting method or interface name
> vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go:52:2: syntax
> error: unexpected ~, expecting method or interface name
> vendor/k8s.io/apimachinery/pkg/util/sets/set.go:24:12: syntax error:
> unexpected comparable, expecting ]
> vendor/k8s.io/apimachinery/pkg/util/sets/set.go:24:12: too many errors
>
> and
>
> make: *** [Makefile:264: bin/containerd-shim] Error 2
> make: *** [Makefile:268: bin/containerd-shim-runc-v1] Error 2
> make: *** [Makefile:272: bin/containerd-shim-runc-v2] Error 2
> make: *** [Makefile:255: bin/ctr] Error 2
> make: *** [Makefile:255: bin/containerd-stress] Error 2
> make: *** [Makefile:255: bin/containerd] Error 2
>
>
> It looks like it's compiling go, do I need to do anything special for
> clang to compile go? I tried updating the recipe to the latest from
> master and still the same error.
>
> The lines from the makefile are
>
> define BUILD_BINARY
> @echo "$(WHALE) $@"
> $(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@
> ${GO_LDFLAGS} ${GO_TAGS}  ./$<
> endef
>
> # Build a binary from a cmd.
> bin/%: cmd/% FORCE
>     $(call BUILD_BINARY)
>
>
> > > ERROR: Logfile of failure stored in:
> > > /ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/temp/log.do_package.2936320
> > > ERROR: Task (/ws/extra/octopus/octave-kirkstone/build-cad-devel/../sources/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb:do_package)
> > > failed with exit code '1'
> > > Pseudo log:
> > > inode mismatch:
> > > '/ws/extra/octopus/octave-kirkstone/build-cad-devel/tmp/work/cortexa53-crypto-poky-linux/runc-opencontainers/1.1.4+gitAUTOINC+974efd2dfc-r0/image/usr/bin/docker-runc'
> > > ino 84410787 in db, 84431171 in request.
> > > Setup complete, sending SIGUSR1 to pid 2936321.
> > >
> > > I'm sure these used to compile with Clang in dunfell so could this be
> > > a toolchain problem?
> > >
> > > I'm using the kirkstone branch of meta-clang and have the following in
> > > my distro conf
> > > PREFERRED_PROVIDER_llvm = "clang"
> > > PREFERRED_PROVIDER_llvm-native = "clang-native"
> > > PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
> > > PROVIDES:pn-clang = "llvm"
> > > PROVIDES:pn-clang-native = "llvm-native"
> > > PROVIDES:pn-nativesdk-clang = "nativesdk-llvm"
> > >
> > > and this in local.conf
> > >
> > > TOOLCHAIN ?= "clang"
> > > RUNTIME ?= "llvm"
> > >
> > > I notice there is a kirkstone-clang12 branch in meta-clang, should I
> > > be using this?
> > > If not, any help in debugging this would be appreciated.
> > >
> > > Cheers,
> > > Martin.
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > You automatically follow any topics you start or reply to.
> > > View/Reply Online (#61459): https://lists.yoctoproject.org/g/yocto/message/61459
> > > Mute This Topic: https://lists.yoctoproject.org/mt/102139152/1997914
> > > Group Owner: yocto+owner@lists.yoctoproject.org
> > > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >


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

end of thread, other threads:[~2023-10-24 16:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 16:29 Clang LLVM do_package strip error Martin Townsend
2023-10-23 16:43 ` [yocto] " Khem Raj
2023-10-24 13:33   ` Martin Townsend
2023-10-24 16:51     ` Khem Raj

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.