various cross and gobject-introspection fixes#177538
various cross and gobject-introspection fixes#177538Artturin merged 11 commits intoNixOS:stagingfrom
Conversation
There was a problem hiding this comment.
this will be bash on build == host and a emulator otherwise
gobject-introspection already brings in the emulator to the closure
|
Can we now start setting strictDeps on these too or do you want to defer that? |
Mindavi
left a comment
There was a problem hiding this comment.
Diff looks good to me. We should take care to not remove the flags in packages where it's not enabled by default, if there are any that don't enable it by default.
lets do it in a separate pr i use a command like this to generate the list of attrs and then i input that in to diffing |
There was a problem hiding this comment.
Why add this to buildInputs? It should not be a runtime dependency.
There was a problem hiding this comment.
libgirepository can be used at runtime, right?
There was a problem hiding this comment.
Then it shouldn't be in buildInputs :)
There was a problem hiding this comment.
Run-time dependency gobject-introspection-1.0 found: NO (tried pkgconfig) when strictDeps is enabled`
Having gobject-introspection in buildInputs adds it to PKG_CONFIG_PATH which we need to get host libs instead of build libs
(buildInputs isn't runtime deps only)
There was a problem hiding this comment.
For some reason it then does require it at runtime, or the meson file is wrong.
There was a problem hiding this comment.
Perhaps it needs native=True here: https://github.com/mesonbuild/meson/blob/16ed82a62f535475b0eff6acc2d7c34c5265c16f/mesonbuild/modules/gnome.py#L772, I do not see any reason why it should need host g-i.
There was a problem hiding this comment.
EDIT: got it working without the meson patch
i applied
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix
index f62bb22314d..b46f918b9c3 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/development/tools/build-managers/meson/default.nix
@@ -71,6 +71,11 @@ python3.pkgs.buildPythonApplication rec {
./fix-gtkdoc-when-using-multiple-apple-frameworks.patch
];
+ postPatch = ''
+ substituteInPlace mesonbuild/modules/gnome.py \
+ --replace "(state, 'gobject-introspection-1.0')" "(state, 'gobject-introspection-1.0', native = True)"
+ '';
+
setupHook = ./setup-hook.sh;
# Meson included tests since 0.45, however they fail in Nixpkgs because theyto meson because of some projects using the wrong gi when build == host != target and gobject-introspection was in buildInputs
that fixed them
gobject-introspection still has to be in buildInputs
otherwise
json-glib-aarch64-unknown-linux-gnu> FAILED: json-glib/Json-1.0.gir
json-glib-aarch64-unknown-linux-gnu> /nix/store/1idf29h8a199ri6qzplmqg72gnhilc1h-gobject-introspection-wrapped-1.72.0-dev/bin/g-ir-scanner --no-libtool --namespace=Json --nsversion=1.0 --warn-all --output json-glib/Json-1.0.gir --c-include=json-glib/json-glib.h --quiet --warn-all -DJSON_COMPILATION -I/build/json-glib-1.6.6/json-glib -I/build/json-glib-1.6.6/build/json-glib -I/build/json-glib-1.6.6/. -I/build/json-glib-1.6.6/build/. --filelist=/build/json-glib-1.6.6/build/json-glib/libjson-glib-1.0.so.0.600.6.p/Json_1.0_gir_filelist --include=GObject-2.0 --include=Gio-2.0 --symbol-prefix=json --identifier-prefix=Json --pkg-export=json-glib-1.0 --cflags-begin -I/build/json-glib-1.6.6/. -I/build/json-glib-1.6.6/build/. -I/nix/store/5gnb26000kk7jvmb47rdlnq3chgygbbl-glib-aarch64-unknown-linux-gnu-2.72.3-dev/include -I/nix/store/5gnb26000kk7jvmb47rdlnq3chgygbbl-glib-aarch64-unknown-linux-gnu-2.72.3-dev/include/glib-2.0 -I/nix/store/0wx8v8cbx4a6bbm104326w4w1xwhr4fk-glib-aarch64-unknown-linux-gnu-2.72.3/lib/glib-2.0/include -I/nix/store/n7v6adpih67vawkkcahvrafagxa0ymyd-glib-2.72.3-dev/include -I/nix/store/n7v6adpih67vawkkcahvrafagxa0ymyd-glib-2.72.3-dev/include/glib-2.0 -I/nix/store/hwl3jk6i8gjlv7q7rg3ycyhqvlyjp65k-glib-2.72.3/lib/glib-2.0/include -I/nix/store/1idf29h8a199ri6qzplmqg72gnhilc1h-gobject-introspection-wrapped-1.72.0-dev/include/gobject-introspection-1.0 --cflags-end --add-include-path=/nix/store/1idf29h8a199ri6qzplmqg72gnhilc1h-gobject-introspection-wrapped-1.72.0-dev/share/gir-1.0 -L/build/json-glib-1.6.6/build/json-glib --library json-glib-1.0 -L/nix/store/0wx8v8cbx4a6bbm104326w4w1xwhr4fk-glib-aarch64-unknown-linux-gnu-2.72.3/lib --extra-library=gio-2.0 --extra-library=gobject-2.0 --extra-library=glib-2.0 -L/nix/store/hwl3jk6i8gjlv7q7rg3ycyhqvlyjp65k-glib-2.72.3/lib -L/nix/store/rrvhkb531nq1ivfikbx8xfp9i7f6hw6g-gobject-introspection-wrapped-1.72.0/lib --extra-library=girepository-1.0 --sources-top-dirs /build/json-glib-1.6.6/subprojects/ --sources-top-dirs /build/json-glib-1.6.6/build/subprojects/ --warn-error
json-glib-aarch64-unknown-linux-gnu> /nix/store/x9sh05g0rnnw9nndxxvr4pai3lnwsaby-aarch64-unknown-linux-gnu-binutils-2.38/bin/aarch64-unknown-linux-gnu-ld: skipping incompatible /nix/store/rrvhkb531nq1ivfikbx8xfp9i7f6hw6g-gobject-introspection-wrapped-1.72.0/lib/libgirepository-1.0.so when searching for -lgirepository-1.0
json-glib-aarch64-unknown-linux-gnu> /nix/store/x9sh05g0rnnw9nndxxvr4pai3lnwsaby-aarch64-unknown-linux-gnu-binutils-2.38/bin/aarch64-unknown-linux-gnu-ld: cannot find -lgirepository-1.0: No such file or directory
json-glib-aarch64-unknown-linux-gnu> /nix/store/x9sh05g0rnnw9nndxxvr4pai3lnwsaby-aarch64-unknown-linux-gnu-binutils-2.38/bin/aarch64-unknown-linux-gnu-ld: skipping incompatible /nix/store/rrvhkb531nq1ivfikbx8xfp9i7f6hw6g-gobject-introspection-wrapped-1.72.0/lib/libgirepository-1.0.so when searching for -lgirepository-1.0
json-glib-aarch64-unknown-linux-gnu> collect2: error: ld returned 1 exit status
json-glib-aarch64-unknown-linux-gnu> linking of temporary binary failed: Command '['aarch64-unknown-linux-gnu-gcc', '-o', '/build/json-glib-1.6.6/build/tmp-introspectvcg8jasa/Json-1.0', '/build/json-glib-1.6.6/build/tmp-introspectvcg8jasa/Json-1.0.o', '-L.', '-Wl,-rpath,.', '-Wl,--no-as-needed', '-L/build/json-glib-1.6.6/build/json-glib', '-Wl,-rpath,/build/json-glib-1.6.6/build/json-glib', '-L/nix/store/0wx8v8cbx4a6bbm104326w4w1xwhr4fk-glib-aarch64-unknown-linux-gnu-2.72.3/lib', '-Wl,-rpath,/nix/store/0wx8v8cbx4a6bbm104326w4w1xwhr4fk-glib-aarch64-unknown-linux-gnu-2.72.3/lib', '-L/nix/store/hwl3jk6i8gjlv7q7rg3ycyhqvlyjp65k-glib-2.72.3/lib', '-Wl,-rpath,/nix/store/hwl3jk6i8gjlv7q7rg3ycyhqvlyjp65k-glib-2.72.3/lib', '-L/nix/store/rrvhkb531nq1ivfikbx8xfp9i7f6hw6g-gobject-introspection-wrapped-1.72.0/lib', '-Wl,-rpath,/nix/store/rrvhkb531nq1ivfikbx8xfp9i7f6hw6g-gobject-introspection-wrapped-1.72.0/lib', '-ljson-glib-1.0', '-lgio-2.0', '-lgobject-2.0', '-lglib-2.0', '-lgirepository-1.0', '-L/nix/store/0wx8v8cbx4a6bbm104326w4w1xwhr4fk-glib-aarch64-unknown-linux-gnu-2.72.3/lib', '-lgio-2.0', '-lgobject-2.0', '-Wl,--export-dynamic', '-lgmodule-2.0', '-pthread', '-lglib-2.0']' returned non-zero exit status 1.
when gi is in buildInputs
⋮ 245│/nix/store/s9m5ww62bsyx0jzylndxicvkmdn7x5bj-aarch64-unknown-linux-gnu-binutils-2.38/bin/aarch64-unknown-linux-gnu-ld: skipping incompatibl
e /nix/store/c79djpxhga419drlbf6v850pvpjfqsgl-gobject-introspection-wrapped-1.72.0/lib/libgirepository-1.0.so when searching for -lgirepository-1.0
pkg-config also has to be in depsBuildBuild
There was a problem hiding this comment.
But libgirepostiory, as I understand it, is for runtime loading of typelibs. I still do not see any reason for libraries just providing typelibs to need it – it should only be necessary for stuff like pygobject.
There was a problem hiding this comment.
Investigating some more, it appears to be Meson’s fault again:
As far as I can tell the --extra-library=girepository-1.0 comes from this line and that only appears to be needed for using gobject-introspection as meson subproject. Though I do not see why even subproject would need introducing that dependency to gir itself (maybe it is just to track rebuilds? but then it should not contaminate the g-ir-scanner flags!)
|
Modemmanager (a dep of networkmanager) should be fixed before merge I'll do it tomorrow as I was on vacation for 3 days |
|
Also strictDeps gobject-introspection native will be broken due to not propagating itself to buildInputs while in nativeBuildInputs when not specified in buildInputs |
…in wrapper broke modemmanager and some of its deps libqmi-aarch64-unknown-linux-gnu> GISCAN Qmi-1.0.gir libqmi-aarch64-unknown-linux-gnu> /build/libqmi-1.30.8/src/libqmi-glib/tmp-introspect2d8e4td2/.libs/Qmi-1.0: error while loading shared libraries: libqmi-glib.so.5: cannot open shared object file: No such file or directory libqmi-aarch64-unknown-linux-gnu> Command '['/nix/store/wr4mjr9gadvwz6c88fgz4ldzn21sxkpz-qemu-7.0.0/bin/qemu-aarch64', '/build/libqmi-1.30.8/src/libqmi-glib/tmp-introspect2d8e4td2/.libs/Qmi-1.0', '--introspect-dump=/build/libqmi-1.30.8/src/libqmi-glib/tmp-introspect2d8e4td2/functions.txt,/build/libqmi-1.30.8/src/libqmi-glib/tmp-introspect2d8e4td2/dump.xml']' returned non-zero exit status 127. libqmi-aarch64-unknown-linux-gnu> make[4]: *** [/nix/store/jwpcacx8sd4vj0ckk5wxrzn2iwcpp35s-gobject-introspection-aarch64-unknown-linux-gnu-1.72.0-dev/share/gobject-introspection-1.0/Makefile.introspection:156: Qmi-1.0.gir] Error 1
|
reverted the propagation original commits can be found in https://github.com/Artturin/nixpkgs/tree/fixcross3-backup |
|
this flake built |
|
Bisect claims that |
|
|
|
fixed in #181413 |
|
Bisect claims 10362d7 Broken packages are I think The simplest way to trigger the bug earlier is to add an |
Possible fix (or workaround) is to enable shared libs by default. Proposed as: #182727 |
gobject-introspection doesn't handle checkInputs since NixOS#177538, so tests couldn't find UMockdev namespace. Added umockdev to buildInputs.
gobject-introspection doesn't handle checkInputs since NixOS#177538. Added umockdev to buildInputs.
remove unnecessary preInstall
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes