On Mon, Oct 23, 2023 at 5:43 PM Khem Raj <raj.k...@gmail.com> wrote:
>
> On Mon, Oct 23, 2023 at 9:29 AM Martin Townsend <mtownsend1...@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.
View/Reply Online (#61468): https://lists.yoctoproject.org/g/yocto/message/61468
Mute This Topic: https://lists.yoctoproject.org/mt/102139152/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to