OverC / meta-overc

OverC + cubes distribution layer
MIT License
13 stars 28 forks source link

NVIDIA Xavier NX / Armv8 build failing error: unrecognized command-line option '-m64' #283

Closed outbackdingo closed 4 years ago

outbackdingo commented 4 years ago

trying to get an overc build from meta-tegra, using the following, but looking at the error below aarch64-overc-linux-gcc: error: unrecognized command-line option '-m64' the build is failing ... ideas ? any other params i should be setting ?

cat conf/local.conf MACHINE = "jetson-xavier-nx-devkit" LICENSE_FLAGS_WHITELIST = "commercial" IMAGE_CLASSES += "image_types_tegra" IMAGE_FSTYPES = "tegraflash"

CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to

track the version of this file when it was generated. This can safely be ignored if

this doesn't mean anything to you.

CONF_VERSION = "1"

#

OverC updates

#

set the machine

MACHINE = "genericx86-64"

KMACHINE_genericx86-64 = "common-pc-64"

disto: replace the poky distro with:

DISTRO = "overc"

build and kernel options

IMAGE_FSTYPES_append = " tar.bz2" NOISO = "0" IMAGE_FSTYPES_remove = "wic.bmap" OVERC_ESSENTIAL_MODE = "read-write"

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"

PREFERRED_PROVIDER_virtual/kernel = "linux-tegra"

if you are building and booting on an non-efi machine (i.e. like qemu)

MACHINE_FEATURES_remove = "efi"

ERROR: Logfile of failure stored in: /home/dingo/overc/xavier/tmp/work/jetson_xavier_nx_devkit-overc-linux/cube-install/1.0-r0/temp/log.do_rootfs.15422 ERROR: Task (/home/dingo/overc/meta-overc/meta-cube/recipes-core/images/cube-install_1.0.bb:do_rootfs) failed with exit code '1' ERROR: kubernetes-v1.18.3-beta+gitfe3ac3e38838a09dfd4b48d568083144211a95f8-r0 do_compile: Execution of '/home/dingo/overc/xavier/tmp/work/armv8a-overc-linux/kubernetes/v1.18.3-beta+gitfe3ac3e38838a09dfd4b48d568083144211a95f8-r0/temp/run.do_compile.15394' failed with exit code 2:

runtime/cgo

aarch64-overc-linux-gcc: error: unrecognized command-line option '-m64' +++ [0710 14:33:12] Building go targets for linux/amd64: ./vendor/k8s.io/code-generator/cmd/deepcopy-gen

runtime/cgo

aarch64-overc-linux-gcc: error: unrecognized command-line option '-m64' !!! [0710 14:33:13] Call tree: !!! [0710 14:33:13] 1: /home/dingo/overc/xavier/tmp/work/armv8a-overc-linux/kubernetes/v1.18.3-beta+gitfe3ac3e38838a09dfd4b48d568083144211a95f8-r0/kubernetes-v1.18.3-beta+gitfe3ac3e38838a09dfd4b48d568083144211a95f8/src/import/hack/lib/golang.sh:712 kube::golang::build_some_binaries(...) !!! [0710 14:33:13] 2: /home/dingo/overc/xavier/tmp/work/armv8a-overc-linux/kubernetes/v1.18.3-beta+gitfe3ac3e38838a09dfd4b48d568083144211a95f8-r0/kubernetes-v1.18.3-beta+gitfe3ac3e38838a09dfd4b48d568083144211a95f8/src/import/hack/lib/golang.sh:856 kube::golang::build_binaries_for_platform(...) !!! [0710 14:33:13] 3: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) !!! [0710 14:33:13] Call tree: !!! [0710 14:33:13] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) !!! [0710 14:33:13] Call tree: !!! [0710 14:33:13] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...) make[1]: [Makefile.generated_files:200: _output/bin/deepcopy-gen] Error 1 make: [Makefile:544: generated_files] Error 2 WARNING: exit code 2 from a shell command.

ERROR: Logfile of failure stored in: /home/dingo/overc/xavier/tmp/work/armv8a-overc-linux/kubernetes/v1.18.3-beta+gitfe3ac3e38838a09dfd4b48d568083144211a95f8-r0/temp/log.do_compile.15394

zeddii commented 4 years ago

The issue is in meta-virtualization itself, and interactions with some recent go-native changes in oe-core. The go toolchains are now strictly split and can't build both native and cross code, so we end up with some lurking errors being exposed.

As it so happens, I fixed this for meta-virtualization earlier this week and have just pushed the change to master. It may not fix your entire problem, but I have built k8s for ARM64 with meta-virt and up to date master.