-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
various cross and gobject-introspection fixes #177538
Conversation
# We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/ | ||
$dev/bin/gdk-pixbuf-query-loaders --update-cache | ||
${stdenv.hostPlatform.emulator buildPackages} $dev/bin/gdk-pixbuf-query-loaders --update-cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
@@ -39,15 +39,13 @@ stdenv.mkDerivation rec { | |||
fixDarwinDylibNames | |||
]; | |||
|
|||
buildInputs = [ gobject-introspection ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add this to buildInputs
? It should not be a runtime dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libgirepository can be used at runtime, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but not by ATK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it shouldn't be in buildInputs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason it then does require it at runtime, or the meson file is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 they
to 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 = true
set 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.sh
to update generated release notes