Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for Release 1.5 LTS Scarthgap #166

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

jolting
Copy link

@jolting jolting commented Jul 9, 2024

IoT Edge Recipes for 1.5 LTS for Scrathgap.

@jolting
Copy link
Author

jolting commented Jul 9, 2024

@microsoft-github-policy-service agree

@ggjjj
Copy link
Contributor

ggjjj commented Jul 16, 2024

/azp run test

Copy link

No pipelines are associated with this pull request.

@ggjjj
Copy link
Contributor

ggjjj commented Jul 16, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jolting jolting requested review from sindelar-fr and ggjjj July 20, 2024 07:11
@@ -519,6 +517,10 @@ SUMMARY = "aziot-keys is the default implementation of cryptographic operations
HOMEPAGE = "https://azure.github.io/iot-identity-service/"
LICENSE = "MIT"

do_patch() {
sed -i '/panic = "abort"/d' ${WORKDIR}/git/Cargo.toml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is having abort strategy better than unwind

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's best to have it unspecified, so that RUST_PANIC_STRATEGY applies here. The libstd-rs runtime needs to have support built-in for the strategy or you will get compile time errors.

This deletes it from the Cargo.toml file.

@ggjjj
Copy link
Contributor

ggjjj commented Jul 22, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ggjjj
Copy link
Contributor

ggjjj commented Jul 22, 2024

@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
Copy link
Contributor

ggjjj commented Jul 22, 2024

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

@ggjjj ggjjj changed the title iotedge 1.5 for scarthgap IotEdge 1.5 LTS for Scarthgap Jul 22, 2024
@ggjjj
Copy link
Contributor

ggjjj commented Jul 22, 2024

@maskimthedog Would you be interested in trying this recipe?

@maskimthedog
Copy link

@maskimthedog Would you be interested in trying this recipe?

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

@jolting
Copy link
Author

jolting commented Jul 22, 2024

@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
Copy link
Author

jolting commented Jul 23, 2024

I added an rpath to aziotd. Works now.

@maskimthedog
Copy link

@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'

@ggjjj
Copy link
Contributor

ggjjj commented Jul 24, 2024

@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?

@maskimthedog
Copy link

@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
Copy link

@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
Copy link

maskimthedog commented Jul 24, 2024

@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
Copy link

maskimthedog commented Jul 24, 2024

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$

@ggjjj
Copy link
Contributor

ggjjj commented Jul 26, 2024

@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?

@maskimthedog
Copy link

maskimthedog commented Jul 28, 2024

@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?

@jolting
Copy link
Author

jolting commented Jul 29, 2024

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
Copy link
Author

jolting commented Jul 29, 2024

@jolting
Copy link
Author

jolting commented Jul 30, 2024

rebased.

@jolting
Copy link
Author

jolting commented Jul 30, 2024

I don't think iotedge uses librsvg. Where is that dependency coming from?

@jolting
Copy link
Author

jolting commented Jul 30, 2024

@maskimthedog I think librsvg in kirkstone is too old for the new rust compiler. However this dependency is part of gnome, not iotedge. If you can turn off gnome or backport the librsvg recipe in your build then it will be fine. Either way I don't see this as a blocker given the known workaround is to use an older meta-rust.

@maskimthedog
Copy link

@maskimthedog I think librsvg in kirkstone is too old for the new rust compiler. However this dependency is part of gnome, not iotedge. If you can turn off gnome or backport the librsvg recipe in your build then it will be fine. Either way I don't see this as a blocker given the known workaround is to use an older meta-rust.

Ah, thanks for looking at this.

@maskimthedog
Copy link

@maskimthedog I think librsvg in kirkstone is too old for the new rust compiler. However this dependency is part of gnome, not iotedge. If you can turn off gnome or backport the librsvg recipe in your build then it will be fine. Either way I don't see this as a blocker given the known workaround is to use an older meta-rust.

Ah, thanks for looking at this.

I will look at updating librsvg for our Kirkstone build and see what happens.

@jolting
Copy link
Author

jolting commented Jul 31, 2024

@maskimthedog The head of meta-rust gets further on 1.78. 1.73, 1.75 breaks during the rust compiler build. 1.78 breaks in iotedge.

@maskimthedog
Copy link

maskimthedog commented Jul 31, 2024

@maskimthedog The head of meta-rust gets further on 1.78. 1.73, 1.75 breaks during the rust compiler build. 1.78 breaks in iotedge.

@jolting yep, that is what I noticed as well. I ended up checking out at the hash I previously mentioned and set Rust version to 1.73.

@maskimthedog
Copy link

@maskimthedog The head of meta-rust gets further on 1.78. 1.73, 1.75 breaks during the rust compiler build. 1.78 breaks in iotedge.

@jolting yep, that is what I noticed as well. I ended up checking out at the hash I previously mentioned and set Rust version to 1.73.

@jolting upgrading librsvg on Kirkstone is a bit of a rabbit hole and not recommended IMHO.

@maskimthedog
Copy link

@maskimthedog The head of meta-rust gets further on 1.78. 1.73, 1.75 breaks during the rust compiler build. 1.78 breaks in iotedge.

@jolting yep, that is what I noticed as well. I ended up checking out at the hash I previously mentioned and set Rust version to 1.73.

@jolting upgrading librsvg on Kirkstone is a bit of a rabbit hole and not recommended IMHO.

@jolting what next? Just add something to README about meta-rust at 1.73 and hash I mentioned previously for Kirkstone or do we investigate further and get running off of head of meta-rust with librsvg update plus whatever else is needed?

@jolting
Copy link
Author

jolting commented Jul 31, 2024

@maskimthedog prior to rust-1.78 I get the build error. It's a similar to the issue reported here:
meta-rust/meta-rust#444
static_assert_size!(LitKind, 24);
I haven't reported a bug on that to meta-rust. However, I believe it to be a meta-rust issue.

Fortunately 1.78 works in meta-rust, but it exposes a problem with iotedge.
When I switch to 1.78 I get the following error:

| error: field `0` is never read
|   --> iotedge/src/config/import/old_config/provisioning.rs:21:14
|    |
| 21 |     External(External),
|    |     -------- ^^^^^^^^
|    |     |
|    |     field in this variant
|    |
| note: the lint level is defined here
|   --> iotedge/src/lib.rs:3:27
|    |
| 3  | #![deny(rust_2018_idioms, warnings)]
|    |                           ^^^^^^^^
|    = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`
| help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|    |
| 21 |     External(()),
|    |              ~~
| 
| warning: `iotedge` (lib) generated 3 warnings (3 duplicates)
| error: could not compile `iotedge` (lib) due to 1 previous error; 3 warnings emitted

This should be fixable on the iotedge side. @ggjjj Thoughts?

@maskimthedog
Copy link

maskimthedog commented Jul 31, 2024

@jolting this is Kirkstone without upgrading librsvg?

@maskimthedog
Copy link

Forget it. It's part of Gnome. Upgrading it (somewhat challenging) or omitting Gnome fixes.

@maskimthedog
Copy link

Forget it. It's part of Gnome. Upgrading it (somewhat challenging) or omitting Gnome fixes.

Was just told we need Gnome…so librsvg issue is somewhat unique to us.

@jolting
Copy link
Author

jolting commented Jul 31, 2024

@maskimthedog
Yep. run

scripts/fetch.sh kirkstone
scripts/build.sh kirkstone

Dead code warnings were broken in 1.78.
rust-lang/rust#120770

The workaround is to avoid treating warnings as errors.

Patch
edgelet/iotedge/src/lib.rs#L3

-#![deny(rust_2018_idioms, warnings)]
+#![deny(rust_2018_idioms)]

Then everything builds with rust 1.78 on kirkstone. I'll see about adding that patch to the recipe later.

@jolting
Copy link
Author

jolting commented Jul 31, 2024

@maskimthedog see here:
meta-rust/meta-rust#450

@maskimthedog
Copy link

Interesting

@jolting
Copy link
Author

jolting commented Aug 1, 2024

@ggjjj This should work for kirkstone and scarthgap now.

@maskimthedog
Copy link

@ggjjj This should work for kirkstone and scarthgap now.

Builds fine for me for Kirkstone if librsvg from Gnome is dropped with meta-rust tip and RUSTVERSION set to 1.78%. We need Gnome, so we build from meta-rust f6a80656953678f17de7d41343107112d99492d9 with RUSTVERSION set to 1.73% and that too builds fine. Nice job @jolting. Really appreciate your hard work and diligence on bringing this all together.

@ggjjj
Copy link
Contributor

ggjjj commented Aug 2, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ggjjj
Copy link
Contributor

ggjjj commented Aug 14, 2024

Here are some feedback to get this PR merged. @jolting

  1. Can you please move the export commands in the .bb files to .inc files
  2. Please remove kirkstone templates and the handling of the templates in scripts as we keep them separately in kirkstone branch as a part of our branching strategy.
  3. We are planning to release 1.5.7 so might need an update to bitbake files for the new version (probably early next week - 8/19)

@Dvergatal
Copy link

Dvergatal commented Aug 22, 2024

Hi @ggjjj, the build has passed on our CI with tests so from my point of view it can be merged.

P.S. The only thing is that on kirkstone I needed to copy rust and cargo packages from meta-rust meta layer, because rust in openembedded-core is to old and causes failures like in #144 but on scarthgap everything is fine 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants