diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-01-25 22:36:22 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-01-31 08:15:16 -0800 |
commit | 2c90fd26abae5367683dff3945634b781de53714 (patch) | |
tree | c7f8a9af23e4eda01fc647489e0233c7357dca2c /meta-python/recipes-devtools/python | |
parent | 7c5dbbc9ef632cfe2fb913bf166c9a36812d96de (diff) | |
download | meta-openembedded-2c90fd26abae5367683dff3945634b781de53714.tar.gz |
python3-pyruvate: Fix build with mips
mips/glibc systems have interesting problem where dev_t is not defined
properly for O32 ABI [1], therefore address it for libsystemd crate, it
works fine for musl
Fixes
error[E0308]: mismatched types
--> /usr/src/debug/python3-pyruvate/1.1.2-r0/cargo_home/bitbake/libsystemd-0.4.1/src/logging.rs:296:25
|
296 | device: stat.st_dev,
| ^^^^^^^^^^^ expected `u64`, found `u32`
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=17786
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Diffstat (limited to 'meta-python/recipes-devtools/python')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-pyruvate/0001-check-for-mips-targets-for-stat.st_dev-definitions.patch | 45 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pyruvate/0001-check-for-mips-targets-for-stat.st_dev-definitions.patch b/meta-python/recipes-devtools/python/python3-pyruvate/0001-check-for-mips-targets-for-stat.st_dev-definitions.patch new file mode 100644 index 000000000..f41e6cf11 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pyruvate/0001-check-for-mips-targets-for-stat.st_dev-definitions.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 56984b19469ff5b69b8b8e180dc75cf825bb1123 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 25 Jan 2022 22:28:11 -0800 | ||
4 | Subject: [PATCH] check for mips targets for stat.st_dev definitions | ||
5 | |||
6 | st_dev has wrong type in glibc when using mips/O32 ABI | ||
7 | its type should be dev_t but it is set to unsigned long int | ||
8 | this is specific issue on mips/o32 ABI in glibc for details | ||
9 | |||
10 | See | ||
11 | https://sourceware.org/bugzilla/show_bug.cgi?id=17786 | ||
12 | |||
13 | currently the build fails on mips archirecture with type mismatches | ||
14 | |||
15 | Fixes | ||
16 | error[E0308]: mismatched types | ||
17 | * --> /usr/src/debug/python3-pyruvate/1.1.2-r0/cargo_home/bitbake/libsystemd-0.4.1/src/logging.rs:296:25 | ||
18 | | | ||
19 | 296 | device: stat.st_dev, | ||
20 | | ^^^^^^^^^^^ expected `u64`, found `u32` | ||
21 | |||
22 | Upstream-Status: Submitted [https://github.com/lucab/libsystemd-rs/pull/103] | ||
23 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
24 | --- | ||
25 | src/logging.rs | 3 +++ | ||
26 | 1 file changed, 3 insertions(+) | ||
27 | |||
28 | diff --git a/src/logging.rs b/src/logging.rs | ||
29 | index a68c36a..6e374ae 100644 | ||
30 | --- a/src/logging.rs | ||
31 | +++ b/src/logging.rs | ||
32 | @@ -292,7 +292,10 @@ impl JournalStream { | ||
33 | pub fn from_fd<F: AsRawFd>(fd: F) -> std::io::Result<Self> { | ||
34 | nix::sys::stat::fstat(fd.as_raw_fd()) | ||
35 | .map(|stat| JournalStream { | ||
36 | + #[cfg(not(target_arch = "mips"))] | ||
37 | device: stat.st_dev, | ||
38 | + #[cfg(target_arch = "mips")] | ||
39 | + device: stat.st_dev as u64, | ||
40 | inode: stat.st_ino, | ||
41 | }) | ||
42 | .map_err(std::io::Error::from) | ||
43 | -- | ||
44 | 2.35.0 | ||
45 | |||
diff --git a/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb b/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb index dad18b78c..14142fdb6 100644 --- a/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb +++ b/meta-python/recipes-devtools/python/python3-pyruvate_1.1.2.bb | |||
@@ -22,6 +22,8 @@ RUSTFLAGS:append:mipsel = " --cfg crossbeam_no_atomic_64" | |||
22 | RUSTFLAGS:append:powerpc = " --cfg crossbeam_no_atomic_64" | 22 | RUSTFLAGS:append:powerpc = " --cfg crossbeam_no_atomic_64" |
23 | RUSTFLAGS:append:riscv32 = " --cfg crossbeam_no_atomic_64" | 23 | RUSTFLAGS:append:riscv32 = " --cfg crossbeam_no_atomic_64" |
24 | 24 | ||
25 | SRC_URI:append:mips = " file://0001-check-for-mips-targets-for-stat.st_dev-definitions.patch;patchdir=../cargo_home/bitbake/libsystemd-0.4.1/" | ||
26 | |||
25 | SRC_URI += " \ | 27 | SRC_URI += " \ |
26 | crate://crates.io/aho-corasick/0.7.18 \ | 28 | crate://crates.io/aho-corasick/0.7.18 \ |
27 | crate://crates.io/atty/0.2.14 \ | 29 | crate://crates.io/atty/0.2.14 \ |