meta-iotedge icon indicating copy to clipboard operation
meta-iotedge copied to clipboard

Prepare for Release 1.5 LTS Scarthgap

Open jolting opened this issue 1 year ago • 59 comments

IoT Edge Recipes for 1.5 LTS for Scrathgap.

jolting avatar Jul 09 '24 04:07 jolting

@microsoft-github-policy-service agree

jolting avatar Jul 09 '24 04:07 jolting

/azp run test

ggjjj avatar Jul 16 '24 16:07 ggjjj

No pipelines are associated with this pull request.

azure-pipelines[bot] avatar Jul 16 '24 16:07 azure-pipelines[bot]

/azp run

ggjjj avatar Jul 16 '24 16:07 ggjjj

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 16 '24 16:07 azure-pipelines[bot]

/azp run

ggjjj avatar Jul 22 '24 16:07 ggjjj

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 22 '24 16:07 azure-pipelines[bot]

@jolting Thank you so much for your contribution. We highly appreciate this effort. We are considering this PR to be a release candidate. Have you tried this recipe and it works? We need more volunteers to try this recipe and test the scenarios as well

ggjjj avatar Jul 22 '24 16:07 ggjjj

@Dvergatal @sindelar-fr can we get you both as volunteers for trying the recipes out?

ggjjj avatar Jul 22 '24 16:07 ggjjj

@maskimthedog Would you be interested in trying this recipe?

ggjjj avatar Jul 22 '24 16:07 ggjjj

@maskimthedog Would you be interested in trying this recipe?

Sure. I’ll kick a build off here in a bit.

maskimthedog avatar Jul 22 '24 16:07 maskimthedog

@ggjjj The aziot-keys lib file doesn't get installed in the lib directory, so it can't be found at runtime. Adding a symbolic link to point to the Rust lib directory where it's installed fixes the problem for me. I'm not sure if the symbolic link is the best way to go. Besides that everything seems to work for me.

jolting avatar Jul 22 '24 20:07 jolting

I added an rpath to aziotd. Works now.

jolting avatar Jul 23 '24 11:07 jolting

@maskimthedog Would you be interested in trying this recipe?

Sure. I’ll kick a build off here in a bit.

ERROR: aziotctl-1.5.0.AUTOINC+0f93f7a544-r0 do_patch: Applying patch '0001-Change-panic-strategy-to-unwind.patch' on target directory '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/git' CmdError('quilt --quiltrc /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch 0001-Change-panic-strategy-to-unwind.patch patching file Cargo.toml Hunk #1 FAILED at 54. 1 out of 1 hunk FAILED -- rejects in file Cargo.toml Patch 0001-Change-panic-strategy-to-unwind.patch does not apply (enforce with -f)

stderr: ') ERROR: Logfile of failure stored in: /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/temp/log.do_patch.549831 ERROR: Task (/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-iotedge/recipes-core/aziotctl/aziotctl_1.5.0.bb:do_patch) failed with exit code '1'

maskimthedog avatar Jul 24 '24 00:07 maskimthedog

@maskimthedog Would you be interested in trying this recipe?

Sure. I’ll kick a build off here in a bit.

ERROR: aziotctl-1.5.0.AUTOINC+0f93f7a544-r0 do_patch: Applying patch '0001-Change-panic-strategy-to-unwind.patch' on target directory '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/git' CmdError('quilt --quiltrc /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch 0001-Change-panic-strategy-to-unwind.patch patching file Cargo.toml Hunk #1 FAILED at 54. 1 out of 1 hunk FAILED -- rejects in file Cargo.toml Patch 0001-Change-panic-strategy-to-unwind.patch does not apply (enforce with -f)

stderr: ') ERROR: Logfile of failure stored in: /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/temp/log.do_patch.549831 ERROR: Task (/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-iotedge/recipes-core/aziotctl/aziotctl_1.5.0.bb:do_patch) failed with exit code '1'

the patch files have been removed.. Why does it apply it?

ggjjj avatar Jul 24 '24 00:07 ggjjj

@maskimthedog Would you be interested in trying this recipe?

Sure. I’ll kick a build off here in a bit.

ERROR: aziotctl-1.5.0.AUTOINC+0f93f7a544-r0 do_patch: Applying patch '0001-Change-panic-strategy-to-unwind.patch' on target directory '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/git' CmdError('quilt --quiltrc /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch 0001-Change-panic-strategy-to-unwind.patch patching file Cargo.toml Hunk #1 FAILED at 54. 1 out of 1 hunk FAILED -- rejects in file Cargo.toml Patch 0001-Change-panic-strategy-to-unwind.patch does not apply (enforce with -f) stderr: ') ERROR: Logfile of failure stored in: /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/temp/log.do_patch.549831 ERROR: Task (/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-iotedge/recipes-core/aziotctl/aziotctl_1.5.0.bb:do_patch) failed with exit code '1'

the patch files have been removed.. Why does it apply it?

Interesting…I’ll poke around a bit

maskimthedog avatar Jul 24 '24 00:07 maskimthedog

@maskimthedog Would you be interested in trying this recipe?

Sure. I’ll kick a build off here in a bit.

ERROR: aziotctl-1.5.0.AUTOINC+0f93f7a544-r0 do_patch: Applying patch '0001-Change-panic-strategy-to-unwind.patch' on target directory '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/git' CmdError('quilt --quiltrc /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch 0001-Change-panic-strategy-to-unwind.patch patching file Cargo.toml Hunk #1 FAILED at 54. 1 out of 1 hunk FAILED -- rejects in file Cargo.toml Patch 0001-Change-panic-strategy-to-unwind.patch does not apply (enforce with -f)

stderr: ') ERROR: Logfile of failure stored in: /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0.AUTOINC+0f93f7a544-r0/temp/log.do_patch.549831 ERROR: Task (/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-iotedge/recipes-core/aziotctl/aziotctl_1.5.0.bb:do_patch) failed with exit code '1'

the patch files have been removed.. Why does it apply it?

Interesting…I’ll poke around a bit

@ggjjj I am working with the Kirkstone branch. None of our projects have moved beyond it yet.

maskimthedog avatar Jul 24 '24 01:07 maskimthedog

@ggjjj` did not see that this recipe was on a fork. I pulled it, modified layer.conf to add kirkstone but unfortunately had an issue...

rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$` cat /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky
-linux/aziotctl/1.5.0-r0/temp/log.do_install.2804029
DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are ['/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/rust/libstd-rs_1.73.0.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/rust/rust-cross_1.73.0.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-virtualization/recipes-containers/docker/docker-ce_git.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-connectivity/openssl/openssl_3.0.12.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-core/glibc/glibc_2.35.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/gcc/gcc-cross_11.4.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/gcc/gcc-runtime_11.4.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/cargo/cargo_1.73.0.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/python/python3_3.10.13.bb:do_populate_sysroot']
NOTE: Installed into sysroot: []
NOTE: Skipping as already exists in sysroot: ['libstd-rs', 'rust-cross-corei7-64-glibc', 'docker-ce', 'openssl', 'glibc', 'gcc-cross-x86_64', 'gcc-runtime', 'quilt-native', 'cargo-native', 'patch-native', 'pseudo-native', 'python3-native', 'attr-native', 'libtool-native', 'linux-libc-headers', 'libgcc', 'update-rc.d', 'notary', 'libseccomp', 'libtool', 'sqlite3', 'grpc-go', 'base-files', 'go-mux', 'go-fsnotify', 'go-connections', 'go-capability', 'go-systemd', 'compose-file', 'shadow', 'go-patricia', 'shadow-sysroot', 'go-cli', 'initscripts', 'shadow-native', 'go-logrus', 'go-pty', 'lvm2', 'go-distribution', 'go-runtime', 'go-context', 'base-passwd', 'go-dbus', 'btrfs-tools', 'rust-native', 'xz-native', 'ca-certificates-native', 'openssl-native', 'curl-native', 'zlib-native', 'libssh2-native', 'opkg-utils', 'gnu-config-native', 'gmp-native', 'texinfo-dummy-native', 'binutils-cross-x86_64', 'zstd-native', 'mpfr-native', 'libmpc-native', 'flex-native', 'gdbm-native', 'libffi-native', 'bzip2-native', 'util-linux-libuuid-native', 'sqlite3-native', 'readline-native', 'ncurses-native', 'libtirpc-native', 'libnsl2-native', 'rust-llvm-native', 'gettext-minimal-native', 'libxcrypt', 'attr', 'libaio', 'util-linux', 'systemd', 'e2fsprogs', 'lzo', 'python3', 'zlib', 'perl-native', 'm4-native', 'cmake-native', 'ncurses', 'util-linux-libuuid', 'bash-completion', 'libcap-ng', 'libxkbcommon', 'acl', 'kmod', 'libcap', 'zstd', 'autoconf-archive', 'libffi', 'gdbm', 'xz', 'libtirpc', 'libnsl2', 'bzip2', 'readline', 'make-native', 'libxcb', 'xkeyboard-config', 'libxml2', 'wayland-protocols', 'wayland', 'libpthread-stubs', 'xorgproto', 'xcb-proto', 'libxau', 'libxdmcp', 'util-macros', 'expat']
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_install
install: cannot stat '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0-r0/build/target/x86_64-unknown-linux-gnu/release/aziotctl': No such file or directory
WARNING: exit code 1 from a shell command.
rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$

maskimthedog avatar Jul 24 '24 15:07 maskimthedog

Looks like it failed during install because of a path issue...seemed to build...

rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$ ls -l /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0-r0/build/target/x86_64-unknown-linux-gnu/release/aziotctl
ls: cannot access '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0-r0/build/target/x86_64-unknown-linux-gnu/release/aziotctl': No such file or directory
rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$ ls -l /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0-r0/build/target/x86_64-poky-linux/release/
total 125476
-rwxr-xr-x  2 rkrakora rkrakora 128410632 Jul 24 15:15 aziotctl
-rw-r--r--  1 rkrakora rkrakora     14880 Jul 24 15:15 aziotctl.d
drwxr-xr-x 37 rkrakora rkrakora      4096 Jul 24 15:14 build
drwxr-xr-x  2 rkrakora rkrakora     40960 Jul 24 15:15 deps
drwxr-xr-x  2 rkrakora rkrakora      4096 Jul 24 15:14 examples
drwxr-xr-x  2 rkrakora rkrakora      4096 Jul 24 15:14 incremental
rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$

maskimthedog avatar Jul 24 '24 15:07 maskimthedog

@ggjjj` did not see that this recipe was on a fork. I pulled it, modified layer.conf to add kirkstone but unfortunately had an issue...

rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$` cat /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky
-linux/aziotctl/1.5.0-r0/temp/log.do_install.2804029
DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are ['/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/rust/libstd-rs_1.73.0.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/rust/rust-cross_1.73.0.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-virtualization/recipes-containers/docker/docker-ce_git.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-connectivity/openssl/openssl_3.0.12.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-core/glibc/glibc_2.35.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/gcc/gcc-cross_11.4.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/gcc/gcc-runtime_11.4.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/cargo/cargo_1.73.0.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/python/python3_3.10.13.bb:do_populate_sysroot']
NOTE: Installed into sysroot: []
NOTE: Skipping as already exists in sysroot: ['libstd-rs', 'rust-cross-corei7-64-glibc', 'docker-ce', 'openssl', 'glibc', 'gcc-cross-x86_64', 'gcc-runtime', 'quilt-native', 'cargo-native', 'patch-native', 'pseudo-native', 'python3-native', 'attr-native', 'libtool-native', 'linux-libc-headers', 'libgcc', 'update-rc.d', 'notary', 'libseccomp', 'libtool', 'sqlite3', 'grpc-go', 'base-files', 'go-mux', 'go-fsnotify', 'go-connections', 'go-capability', 'go-systemd', 'compose-file', 'shadow', 'go-patricia', 'shadow-sysroot', 'go-cli', 'initscripts', 'shadow-native', 'go-logrus', 'go-pty', 'lvm2', 'go-distribution', 'go-runtime', 'go-context', 'base-passwd', 'go-dbus', 'btrfs-tools', 'rust-native', 'xz-native', 'ca-certificates-native', 'openssl-native', 'curl-native', 'zlib-native', 'libssh2-native', 'opkg-utils', 'gnu-config-native', 'gmp-native', 'texinfo-dummy-native', 'binutils-cross-x86_64', 'zstd-native', 'mpfr-native', 'libmpc-native', 'flex-native', 'gdbm-native', 'libffi-native', 'bzip2-native', 'util-linux-libuuid-native', 'sqlite3-native', 'readline-native', 'ncurses-native', 'libtirpc-native', 'libnsl2-native', 'rust-llvm-native', 'gettext-minimal-native', 'libxcrypt', 'attr', 'libaio', 'util-linux', 'systemd', 'e2fsprogs', 'lzo', 'python3', 'zlib', 'perl-native', 'm4-native', 'cmake-native', 'ncurses', 'util-linux-libuuid', 'bash-completion', 'libcap-ng', 'libxkbcommon', 'acl', 'kmod', 'libcap', 'zstd', 'autoconf-archive', 'libffi', 'gdbm', 'xz', 'libtirpc', 'libnsl2', 'bzip2', 'readline', 'make-native', 'libxcb', 'xkeyboard-config', 'libxml2', 'wayland-protocols', 'wayland', 'libpthread-stubs', 'xorgproto', 'xcb-proto', 'libxau', 'libxdmcp', 'util-macros', 'expat']
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_install
install: cannot stat '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0-r0/build/target/x86_64-unknown-linux-gnu/release/aziotctl': No such file or directory
WARNING: exit code 1 from a shell command.
rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$

This recipe is for Scrathgap only. How did you manage it for kirkstone?

ggjjj avatar Jul 26 '24 16:07 ggjjj

@ggjjj` did not see that this recipe was on a fork. I pulled it, modified layer.conf to add kirkstone but unfortunately had an issue...

rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$` cat /home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky
-linux/aziotctl/1.5.0-r0/temp/log.do_install.2804029
DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are ['/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/rust/libstd-rs_1.73.0.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/rust/rust-cross_1.73.0.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-virtualization/recipes-containers/docker/docker-ce_git.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-connectivity/openssl/openssl_3.0.12.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-core/glibc/glibc_2.35.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/gcc/gcc-cross_11.4.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/gcc/gcc-runtime_11.4.bb:do_populate_sysroot', '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/../meta-rust/recipes-devtools/cargo/cargo_1.73.0.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/meta/recipes-devtools/python/python3_3.10.13.bb:do_populate_sysroot']
NOTE: Installed into sysroot: []
NOTE: Skipping as already exists in sysroot: ['libstd-rs', 'rust-cross-corei7-64-glibc', 'docker-ce', 'openssl', 'glibc', 'gcc-cross-x86_64', 'gcc-runtime', 'quilt-native', 'cargo-native', 'patch-native', 'pseudo-native', 'python3-native', 'attr-native', 'libtool-native', 'linux-libc-headers', 'libgcc', 'update-rc.d', 'notary', 'libseccomp', 'libtool', 'sqlite3', 'grpc-go', 'base-files', 'go-mux', 'go-fsnotify', 'go-connections', 'go-capability', 'go-systemd', 'compose-file', 'shadow', 'go-patricia', 'shadow-sysroot', 'go-cli', 'initscripts', 'shadow-native', 'go-logrus', 'go-pty', 'lvm2', 'go-distribution', 'go-runtime', 'go-context', 'base-passwd', 'go-dbus', 'btrfs-tools', 'rust-native', 'xz-native', 'ca-certificates-native', 'openssl-native', 'curl-native', 'zlib-native', 'libssh2-native', 'opkg-utils', 'gnu-config-native', 'gmp-native', 'texinfo-dummy-native', 'binutils-cross-x86_64', 'zstd-native', 'mpfr-native', 'libmpc-native', 'flex-native', 'gdbm-native', 'libffi-native', 'bzip2-native', 'util-linux-libuuid-native', 'sqlite3-native', 'readline-native', 'ncurses-native', 'libtirpc-native', 'libnsl2-native', 'rust-llvm-native', 'gettext-minimal-native', 'libxcrypt', 'attr', 'libaio', 'util-linux', 'systemd', 'e2fsprogs', 'lzo', 'python3', 'zlib', 'perl-native', 'm4-native', 'cmake-native', 'ncurses', 'util-linux-libuuid', 'bash-completion', 'libcap-ng', 'libxkbcommon', 'acl', 'kmod', 'libcap', 'zstd', 'autoconf-archive', 'libffi', 'gdbm', 'xz', 'libtirpc', 'libnsl2', 'bzip2', 'readline', 'make-native', 'libxcb', 'xkeyboard-config', 'libxml2', 'wayland-protocols', 'wayland', 'libpthread-stubs', 'xorgproto', 'xcb-proto', 'libxau', 'libxdmcp', 'util-macros', 'expat']
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_install
install: cannot stat '/home/rkrakora/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build/tmp/work/corei7-64-poky-linux/aziotctl/1.5.0-r0/build/target/x86_64-unknown-linux-gnu/release/aziotctl': No such file or directory
WARNING: exit code 1 from a shell command.
rkrakora@DvYoctoVm2204:~/_Src/Prod/KraftHeinz.Remix.Yocto/poky/build$

This recipe is for Scrathgap only. How did you manage it for kirkstone?

@ggjjj @jolting I cloned the scarthgap-1.5.5 branch from https://github.com/jolting/meta-iotedge.git and replaced RUST_TARGET_SYS with TARGET_SYS in three .inc files and changing the layer.conf to add compatibility with Kirkstone. I cloned meta-rust and checked out hash f6a80656953678f17de7d41343107112d99492d9 setting RUSTVERSION to 1.73.0. I tried cloning meta-rust from the tip of main and it always yielded several compilation errors regardless to what version RUSTVERSION was set. The build succeeds for Kirkstone but I have yet to check how it runs on my target. I am not sure how different RUST_TARGET_SYS is from TARGET_SYS. I guess it is an oe rust variable?

maskimthedog avatar Jul 28 '24 20:07 maskimthedog

This variable has been in meta-rust for about a decade, so it's not new. I suspect that oe made some changes to avoid issues in canadian builds where target, host and build are all different.

jolting avatar Jul 29 '24 08:07 jolting

This may be the patch that changed it. https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/

jolting avatar Jul 29 '24 09:07 jolting

This may be the patch that changed it. https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/

Thanks. On Kirkstone, it's usage in meta-iotedge breaks the build. Had to revert to TARGET_SYS. Not sure if TARGET_SYS breaks Scarthgap. Trying to avoid separate recipes for each. Clearly though, meta-rust does not support Scarthgap. Sorry, I know very little about meta-rust.

maskimthedog avatar Jul 29 '24 11:07 maskimthedog

@maskimthedog

There are issues with poky container for kirkstone as it ships with 1.59 Rust. This prevents it update the recipes for Kirkstone for both 1.4 and 1.5 LTS for IoT edge. So the current recipe in this PR works for scrathgap as we do not have such dependencies with meta-rust

ggjjj avatar Jul 29 '24 17:07 ggjjj

@maskimthedog

There are issues with poky container for kirkstone as it ships with 1.59 Rust. This prevents it update the recipes for Kirkstone for both 1.4 and 1.5 LTS for IoT edge. So the current recipe in this PR works for scrathgap as we do not have such dependencies with meta-rust

Yes, I know. I used meta-rust at hash f6a80656953678f17de7d41343107112d99492d9 with 1.73% as preferred version of Rust as I mentioned above with the mod described above replacing RUST_TARGET_SYS with TARGET_SYS in the meta-iotedge .inc files. @jolting mentions a repo for each Kirkstone and Scarthgap will have maintained since Kirkstone uses meta-rust and Scarthgap does not.

maskimthedog avatar Jul 29 '24 17:07 maskimthedog

We need IoT Edge 1.5.x for Kirkstone and @jolting needs for Scarthgap.

maskimthedog avatar Jul 29 '24 17:07 maskimthedog

@maskimthedog Do you mind trying to replace the first part of do_install with do_install::append?

The cargo_do_install pretty much does the install for us, so I think we can just leverage the existing install function.

- do_install () {
-     # Binaries
-     install -d ${D}${bindir}
-     install -m 755 ${WORKDIR}/build/target/${RUST_TARGET_SYS}/release/aziot-edged ${D}${bindir}/aziot-edged
+ do_install:append() {
- do_install () {
-     # Binaries
-     install -d ${D}${bindir}
-     install -m 755 ${WORKDIR}/build/target/${RUST_TARGET_SYS}/release/aziotd ${D}${bindir}/aziotd
+ do_install:append() {

Just delete this

do_install () {
    # Binaries
    install -d  "${D}${bindir}"
    install -m 755 "${WORKDIR}/build/target/${RUST_TARGET_SYS}/release/iotedge" ${D}${bindir}/iotedge
}

https://github.com/meta-rust/meta-rust/blob/a5136be2ba408af1cc8afcde1c8e3d787dadd934/classes/cargo.bbclass#L98 https://github.com/yoctoproject/poky/blob/7c1de3118fef96fa899ae5365f80ea8ccb1a5876/meta/classes-recipe/cargo.bbclass#L81

CARGO_TARGET_SUBDIR is computed differently for the two rust layers.

jolting avatar Jul 29 '24 17:07 jolting

@maskimthedog Do you mind trying to replace the first part of do_install with do_install::append?

The cargo_do_install pretty much does the install for us, so I think we can just leverage the existing install function.

- do_install () {
-     # Binaries
-     install -d ${D}${bindir}
-     install -m 755 ${WORKDIR}/build/target/${RUST_TARGET_SYS}/release/aziot-edged ${D}${bindir}/aziot-edged
+ do_install:append() {
- do_install () {
-     # Binaries
-     install -d ${D}${bindir}
-     install -m 755 ${WORKDIR}/build/target/${RUST_TARGET_SYS}/release/aziotd ${D}${bindir}/aziotd
+ do_install:append() {

Just delete this

do_install () {
    # Binaries
    install -d  "${D}${bindir}"
    install -m 755 "${WORKDIR}/build/target/${RUST_TARGET_SYS}/release/iotedge" ${D}${bindir}/iotedge
}

https://github.com/meta-rust/meta-rust/blob/a5136be2ba408af1cc8afcde1c8e3d787dadd934/classes/cargo.bbclass#L98 https://github.com/yoctoproject/poky/blob/7c1de3118fef96fa899ae5365f80ea8ccb1a5876/meta/classes-recipe/cargo.bbclass#L81

CARGO_TARGET_SUBDIR is computed differently for the two rust layers.

Yes, I will give it a go.

maskimthedog avatar Jul 29 '24 18:07 maskimthedog

@maskimthedog I pushed these changes. Let me know if that works for you.

jolting avatar Jul 29 '24 20:07 jolting