rust-glib-sys fail to pass autopkgtests
Bug #2061202 reported by
Zixing Liu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
rust-glib-sys (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
rust-glib-sys fail to pass autopkgtests due to mismatch structure declarations between GIR data and C headers.
Related branches
~liushuyu-011/ubuntu/+source/rust-glib-sys:ubuntu/devel
Merged
into
ubuntu/+source/rust-glib-sys:ubuntu/devel
at
revision b153bb28022d568ceb5bee169e395b0ed74a5a87
- Steve Langasek (community): Approve
-
Diff: 104 lines (+78/-0)4 files modifieddebian/changelog (+9/-0)
debian/patches/add-missing-headers-definitions.patch (+32/-0)
debian/patches/gir-type-size.patch (+35/-0)
debian/patches/series (+2/-0)
To post a comment you must log in.
I had a look at this and I discovered multiple issues.
The first is that the package fails to build because gir-rust-code generator needs a time64 fix that ubuntu doesn't currently have. Said fix is available in Debian experimental, you should just be able to sync it.
The second is tests failing due to a missing header include, I fixed that with the following patch.
Index: rust-glib- sys-0.19. 0/tests/ manual. h ======= ======= ======= ======= ======= ======= ======= ======= ==== sys-0.19. 0.orig/ tests/manual. h sys-0.19. 0/tests/ manual. h
=======
--- rust-glib-
+++ rust-glib-
@@ -2,6 +2,7 @@
.
#include <glib.h>
#include <glib-object.h>
+#include <glib-unix.h>
.
// included in Gir on all platforms even though it is only present on windows
#ifndef G_WIN32_MSG_HANDLE
The third is a cross-validation failure.
---- cross_validate_ layout_ with_c stdout ----
Layout mismatch for GStaticMutex
Rust: Layout { size: 8, alignment: 8 }
C: Layout { size: 48, alignment: 8 }
Layout mismatch for GStaticRWLock
Rust: Layout { size: 40, alignment: 8 }
C: Layout { size: 80, alignment: 8 }
Layout mismatch for GStaticRecMutex
Rust: Layout { size: 16, alignment: 8 }
C: Layout { size: 64, alignment: 8 }
It seems that these types have a discrepancy between their defintion in C and in gir. Furthermore it seems that gir-rust- code-generator only generates bindings for these types with the glib2.0 from noble/experimental, not with the glib2.0 from sid.
I'm not sure where to go from here, the test code in question is generated by gir-rust- code-generator, which is run during the build, so editing it manually would be awkward. I tried to exclude the symbols in question from rust code generation but that caused the rust code generation to fail.