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

Build error: cargo with git #1062

Open
splitice opened this issue Aug 25, 2023 · 1 comment
Open

Build error: cargo with git #1062

splitice opened this issue Aug 25, 2023 · 1 comment

Comments

@splitice
Copy link

We build our own HostOS built off the same dependency versions as this repository.

After moving our layers forward to match, and moved to kirkstone to build we have not been able to get past this error

ERROR: os-config-1.2.11-r0 do_compile: ExecutionError('/work/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/os-config/1.2.11-r0/temp/run.do_compile.2053856', 101, None, None)
ERROR: Logfile of failure stored in: /work/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/os-config/1.2.11-r0/temp/log.do_compile.2053856
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: cargo = /work/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/os-config/1.2.11-r0/recipe-sysroot-native/usr/bin/cargo
| NOTE: rustc =
| NOTE: cargo build -v --target arm-poky-linux-gnueabi --release --manifest-path=/work/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/os-config/1.2.11-r0/git//Cargo.toml
|     Updating git repository `[https://github.com/balena-os/fatrw`](https://github.com/balena-os/fatrw%60)
| error: failed to get `fatrw` as a dependency of package `os-config v1.2.11 (/work/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/os-config/1.2.11-r0/git)`
| 
| Caused by:
|   failed to load source for dependency `fatrw`
| 
| Caused by:
|   Unable to update https://github.com/balena-os/fatrw?rev=04629a208b9035d642e51db54886f3d39d7ee029#04629a20
| 
| Caused by:
|   failed to stat '/root/.gitconfig'; class=Config (7)
| WARNING: exit code 101 from a shell command.
| /work/build/../layers/meta-balena/meta-balena-common/classes/cargo-dyn.bbclass:23: DeprecationWarning: invalid escape sequence \$
|   relpaths.add('\$ORIGIN')
| /work/build/../layers/meta-balena/meta-balena-common/classes/cargo-dyn.bbclass:25: DeprecationWarning: invalid escape sequence \$
|   relpaths.add(os.path.join('\$ORIGIN', os.path.relpath(p, base)))
NOTE: recipe os-config-1.2.11-r0: task do_compile: Failed

I don't suppose we have fallen into a specific trap that the smart minds in the balena team have seen before?

@splitice splitice changed the title Build error: Build error: cargo with git Aug 28, 2023
@splitice
Copy link
Author

A new week and a solution to the problem at hand.

Add a home path within the yocto build dir.

cargo_do_compile () {
	oe_cargo_fix_env
        export HOME="${WORKDIR}/"
	oe_cargo_build
}

What I'm not sure about is why this builds for anyone else.

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

No branches or pull requests

1 participant