Skip to content

various cross and gobject-introspection fixes#177538

Merged
Artturin merged 11 commits intoNixOS:stagingfrom
Artturin:fixcross3
Jul 12, 2022
Merged

various cross and gobject-introspection fixes#177538
Artturin merged 11 commits intoNixOS:stagingfrom
Artturin:fixcross3

Conversation

@Artturin
Copy link
Copy Markdown
Member

remove unnecessary preInstall

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jun 13, 2022
@Artturin Artturin added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jun 13, 2022
Copy link
Copy Markdown
Member Author

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

@ofborg ofborg bot requested a review from 7c6f434c June 13, 2022 18:36
@ofborg ofborg bot added 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. and removed 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. labels Jun 13, 2022
@Mindavi
Copy link
Copy Markdown
Contributor

Mindavi commented Jun 13, 2022

Can we now start setting strictDeps on these too or do you want to defer that?

Copy link
Copy Markdown
Contributor

@Mindavi Mindavi left a 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.

@Artturin
Copy link
Copy Markdown
Member Author

Can we now start setting strictDeps on these too or do you want to defer that?

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
git diff --name-only HEAD HEAD~6 | rev | cut -d '/' -f 2 | rev > attrlist

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member

@jtojnar jtojnar Jun 13, 2022

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.

Copy link
Copy Markdown
Contributor

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 :)

Copy link
Copy Markdown
Member Author

@Artturin Artturin Jun 13, 2022

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)

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member

@jtojnar jtojnar Jun 13, 2022

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.

Copy link
Copy Markdown
Member Author

@Artturin Artturin Jun 14, 2022

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

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

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!)

@ofborg ofborg bot requested review from jtojnar and lovek323 June 13, 2022 20:06
@ofborg ofborg bot added 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. and removed 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. labels Jun 13, 2022
@Artturin Artturin requested a review from FRidh as a code owner June 13, 2022 21:16
@Artturin
Copy link
Copy Markdown
Member Author

Modemmanager (a dep of networkmanager) should be fixed before merge

I'll do it tomorrow as I was on vacation for 3 days

@Artturin
Copy link
Copy Markdown
Member Author

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
@Artturin
Copy link
Copy Markdown
Member Author

reverted the propagation

original commits can be found in https://github.com/Artturin/nixpkgs/tree/fixcross3-backup

@Artturin
Copy link
Copy Markdown
Member Author

this flake built

{
  description = "cross-compile the sd-image-aarch64 on x86_64-linux to aarch64-multiplatform";
  inputs = {
    #nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixpkgs.url = "/home/artturin/nixgits/my-nixpkgs/.worktree/1";
  };

  outputs = { self, nixpkgs }: {

    nixosConfigurations.cross-vm = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ({ pkgs, lib, modulesPath, ... }: {
          nixpkgs = {
            crossSystem = lib.systems.examples.aarch64-multiplatform;
          };

          imports = [ (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") ];

          users.mutableUsers = false;
          users.users.root = {
            password = "root";
          };
          users.users.user = {
            password = "user";
            isNormalUser = true;
            extraGroups = [ "wheel" ];
          };
          system.stateVersion = "22.05";
        })
      ];
    };

    packages.x86_64-linux.default = self.nixosConfigurations.cross-vm.config.system.build.sdImage;
    packages.x86_64-linux.vm = self.nixosConfigurations.cross-vm.config.system.build.vm;
    apps.x86_64-linux.vm = {
      type = "app";
      program = "${self.defaultPackage.x86_64-linux}/bin/run-nixos-vm-cross";
    };
  };
}

@Artturin Artturin merged commit 4427b7d into NixOS:staging Jul 12, 2022
@Artturin Artturin deleted the fixcross3 branch July 12, 2022 13:14
@trofi
Copy link
Copy Markdown
Contributor

trofi commented Jul 13, 2022

Bisect claims that gtk2 broke after a83d2f7 gobject-introspection: cross improvements:

$ nix build -f. gtk2 -L
...
gtk+> /nix/store/8654x8g2margswljbh3ij0igrc1pjsgk-bash-5.1-p16/bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall   -o gtk-query-immodules-2.0 queryimmodules.o libgtk-x11-2.0.la ../gdk/libgdk-x11-2.0.la -L/nix/store/535wq6figrik76fmspaiapfjcy6xrf4m-glib-2.72.3/lib -L/nix/store/779k62xg35wfzv2q4dwckwsynvbpiy0b-cairo-1.16.0/lib -L/nix/store/a2wiqncws9mxip7fhpgkajlvf1b84mr9-fontconfig-2.14.0-lib/lib -L/nix/store/8dw752h4pylsyayvhh3aw0l997z7rsgy-freetype-2.12.1/lib -L/nix/store/c6r69sd1mllpwbzx3ph2nw8q0qrh2pw0-libX11-1.7.2/lib -L/nix/store/spfdx0w0lxr3l3i0bmzblpwq2mnkr9b0-pango-1.50.8/lib -L/nix/store/wr0dap7b491ffyih71082kfbyg5bvq03-harfbuzz-3.3.2/lib -L/nix/store/p5wa5gw2bdnbi7vhbplv27isjs0qwd6r-gdk-pixbuf-2.42.8/lib -L/nix/store/gx4njfl6agha6027xc5j4l72li5yhwjd-atk-2.38.0/lib -L/nix/store/d8khm2x0z5h6sfw7j748zdhwkyd37195-libXcomposite-0.4.5/lib -L/nix/store/jvyxyv38krzzlf32bbys53abgjcqdrbq-libXfixes-6.0.0/lib -lpangocairo-1.0 -lX11 -lXfixes -lXcomposite -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype -lm -L/nix/store/535wq6figrik76fmspaiapfjcy6xrf4m-glib-2.72.3/lib -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
gtk+> libtool: link: gcc -g -O2 -Wall -o .libs/gtk-query-immodules-2.0 queryimmodules.o -Wl,--export-dynamic -pthread  ./.libs/libgtk-x11-2.0.so -L/nix/store/535wq6figrik76fmspaiapfjcy6xrf4m-glib-2.72.3/lib -L/nix/store/779k62xg35wfzv2q4dwckwsynvbpiy0b-cairo-1.16.0/lib -L/nix/store/a2wiqncws9mxip7fhpgkajlvf1b84mr9-fontconfig-2.14.0-lib/lib -L/nix/store/8dw752h4pylsyayvhh3aw0l997z7rsgy-freetype-2.12.1/lib -L/nix/store/crjxnwvgs72xzcs0m6k2fnmim789iwcr-libXext-1.3.4/lib -L/nix/store/h16zw3jsph1zf6nflrm2891hvvj7z4qq-libXrender-0.9.10/lib -L/nix/store/c6r69sd1mllpwbzx3ph2nw8q0qrh2pw0-libX11-1.7.2/lib -L/nix/store/spfdx0w0lxr3l3i0bmzblpwq2mnkr9b0-pango-1.50.8/lib -L/nix/store/wr0dap7b491ffyih71082kfbyg5bvq03-harfbuzz-3.3.2/lib -L/nix/store/p5wa5gw2bdnbi7vhbplv27isjs0qwd6r-gdk-pixbuf-2.42.8/lib -L/nix/store/lisd2wjbn49cywfzn5nw5hhdf05fw9a4-libXrandr-1.5.2/lib -L/nix/store/d8khm2x0z5h6sfw7j748zdhwkyd37195-libXcomposite-0.4.5/lib -L/nix/store/jvyxyv38krzzlf32bbys53abgjcqdrbq-libXfixes-6.0.0/lib -L/nix/store/d5bhm5i8yxwmsl1yhkx21qa38yrba8aa-libXi-1.8/lib -L/nix/store/az6znxinzgf32166q5ffzap7aqc6qv68-libXcursor-1.2.0/lib -L/nix/store/jfax7gnc9dlv8v28bb30j1v4bq7pmiy7-libXinerama-1.1.4/lib -L/nix/store/afagaghllr39jhf5lm2cd9n7xjisxrdc-zlib-1.2.12/lib -L/nix/store/41hqainfl7zr1f9vwxjby1khzgvmxg25-bzip2-1.0.8/lib -L/nix/store/z0b6wn3bb60b2fwhxqwbj6xb8q8im46c-libpng-apng-1.6.37/lib -L/nix/store/gx4njfl6agha6027xc5j4l72li5yhwjd-atk-2.38.0/lib /build/gtk+-2.24.33/gdk/.libs/libgdk-x11-2.0.so ../gdk/.libs/libgdk-x11-2.0.so /nix/store/h16zw3jsph1zf6nflrm2891hvvj7z4qq-libXrender-0.9.10/lib/libXrender.so /nix/store/jfax7gnc9dlv8v28bb30j1v4bq7pmiy7-libXinerama-1.1.4/lib/libXinerama.so /nix/store/d5bhm5i8yxwmsl1yhkx21qa38yrba8aa-libXi-1.8/lib/libXi.so /nix/store/lisd2wjbn49cywfzn5nw5hhdf05fw9a4-libXrandr-1.5.2/lib/libXrandr.so /nix/store/az6znxinzgf32166q5ffzap7aqc6qv68-libXcursor-1.2.0/lib/libXcursor.so /nix/store/crjxnwvgs72xzcs0m6k2fnmim789iwcr-libXext-1.3.4/lib/libXext.so -lpangocairo-1.0 /nix/store/c6r69sd1mllpwbzx3ph2nw8q0qrh2pw0-libX11-1.7.2/lib/libX11.so /nix/store/jvyxyv38krzzlf32bbys53abgjcqdrbq-libXfixes-6.0.0/lib/libXfixes.so /nix/store/d8khm2x0z5h6sfw7j748zdhwkyd37195-libXcomposite-0.4.5/lib/libXcomposite.so -latk-1.0 /nix/store/779k62xg35wfzv2q4dwckwsynvbpiy0b-cairo-1.16.0/lib/libcairo.so -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lharfbuzz /nix/store/a2wiqncws9mxip7fhpgkajlvf1b84mr9-fontconfig-2.14.0-lib/lib/libfontconfig.so /nix/store/8dw752h4pylsyayvhh3aw0l997z7rsgy-freetype-2.12.1/lib/libfreetype.so /nix/store/41hqainfl7zr1f9vwxjby1khzgvmxg25-bzip2-1.0.8/lib/libbz2.so /nix/store/z0b6wn3bb60b2fwhxqwbj6xb8q8im46c-libpng-apng-1.6.37/lib/libpng16.so -lz -lpthread -lm -lgmodule-2.0 -lglib-2.0 -pthread -Wl,-rpath -Wl,/nix/store/6z1cpyikmab56b4816pi8jls0d68w3ds-gtk+-2.24.33/lib -Wl,-rpath -Wl,/nix/store/h16zw3jsph1zf6nflrm2891hvvj7z4qq-libXrender-0.9.10/lib -Wl,-rpath -Wl,/nix/store/jfax7gnc9dlv8v28bb30j1v4bq7pmiy7-libXinerama-1.1.4/lib -Wl,-rpath -Wl,/nix/store/d5bhm5i8yxwmsl1yhkx21qa38yrba8aa-libXi-1.8/lib -Wl,-rpath -Wl,/nix/store/lisd2wjbn49cywfzn5nw5hhdf05fw9a4-libXrandr-1.5.2/lib -Wl,-rpath -Wl,/nix/store/az6znxinzgf32166q5ffzap7aqc6qv68-libXcursor-1.2.0/lib -Wl,-rpath -Wl,/nix/store/crjxnwvgs72xzcs0m6k2fnmim789iwcr-libXext-1.3.4/lib -Wl,-rpath -Wl,/nix/store/c6r69sd1mllpwbzx3ph2nw8q0qrh2pw0-libX11-1.7.2/lib -Wl,-rpath -Wl,/nix/store/jvyxyv38krzzlf32bbys53abgjcqdrbq-libXfixes-6.0.0/lib -Wl,-rpath -Wl,/nix/store/d8khm2x0z5h6sfw7j748zdhwkyd37195-libXcomposite-0.4.5/lib -Wl,-rpath -Wl,/nix/store/779k62xg35wfzv2q4dwckwsynvbpiy0b-cairo-1.16.0/lib -Wl,-rpath -Wl,/nix/store/a2wiqncws9mxip7fhpgkajlvf1b84mr9-fontconfig-2.14.0-lib/lib -Wl,-rpath -Wl,/nix/store/8dw752h4pylsyayvhh3aw0l997z7rsgy-freetype-2.12.1/lib -Wl,-rpath -Wl,/nix/store/41hqainfl7zr1f9vwxjby1khzgvmxg25-bzip2-1.0.8/lib -Wl,-rpath -Wl,/nix/store/z0b6wn3bb60b2fwhxqwbj6xb8q8im46c-libpng-apng-1.6.37/lib
gtk+> make[4]: *** No rule to make target 'g-ir-scanner', needed by 'Gtk-2.0.gir'.  Stop.
gtk+> make[4]: Leaving directory '/build/gtk+-2.24.33/gtk'
gtk+> make[3]: *** [Makefile:5541: all-recursive] Error 1

@Artturin
Copy link
Copy Markdown
Member Author

gtk+> make[4]: *** No rule to make target 'g-ir-scanner', needed by 'Gtk-2.0.gir'. Stop.

@Artturin
Copy link
Copy Markdown
Member Author

fixed in #181413

@trofi
Copy link
Copy Markdown
Contributor

trofi commented Jul 24, 2022

Bisect claims 10362d7 librdf_raptor2: 2.0.15 -> unstable-2022-06-06 boroke a bunch of packages in staging-next. All have the same symptom: underlinked liblrdf.so library is not usable by it's final depends:

Broken packages are non, tony, rascal, hydrogen, guitarix. Example failure:

$ nix build -f. non -L
...
non-unstable> /nix/store/ydvvnn6mi99kyp9an1gnrcga1dr5v5x0-binutils-2.38/bin/ld: /nix/store/1kkgkg3irmk78pk6c96154fns1k5133g-lrdf-0.6.1/lib/liblrdf.so: undefined reference to `xsltNewSecurityPrefs'
non-unstable> /nix/store/ydvvnn6mi99kyp9an1gnrcga1dr5v5x0-binutils-2.38/bin/ld: /nix/store/1kkgkg3irmk78pk6c96154fns1k5133g-lrdf-0.6.1/lib/liblrdf.so: undefined reference to `xmlXPathNewContext'

I think lrdf library is linked incorrectly and is missing some xml library.

The simplest way to trigger the bug earlier is to add an LDFLAGS = "-Wl,--no-undefined" hack locally:

$ nix build --impure --expr 'with import ./.{}; lrdf.overrideAttrs (oa: { LDFLAGS = "-Wl,--no-undefined"; })' -L
...
lrdf> libtool: link: gcc -shared  -fPIC -DPIC  .libs/lrdf.o .libs/lrdf_multi.o .libs/md5.o   -L/nix/store/28xxhxqb97j48yj4ivvl0c6kih9l2r52-raptor2-unstable-2022-06-06/lib -lraptor2  -g -g -O2 -g -O2 -Wl,--no-undefined   -Wl,-soname -Wl,liblrdf.so.2 -o .libs/liblrdf.so.2.0.0
lrdf> /nix/store/ydvvnn6mi99kyp9an1gnrcga1dr5v5x0-binutils-2.38/bin/ld: /nix/store/28xxhxqb97j48yj4ivvl0c6kih9l2r52-raptor2-unstable-2022-06-06/lib/libraptor2.a(raptor_sax2.c.o): in function `raptor_sax2_parse_chunk':
lrdf> (.text+0x511): undefined reference to `xmlParseChunk'
lrdf> /nix/store/ydvvnn6mi99kyp9an1gnrcga1dr5v5x0-binutils-2.38/bin/ld: (.text+0x55d): undefined reference to `xmlCreatePushParserCtxt'
lrdf> /nix/store/ydvvnn6mi99kyp9an1gnrcga1dr5v5x0-binutils-2.38/bin/ld: (.text+0x589): undefined reference to `xmlCtxtUseOptions'

@trofi
Copy link
Copy Markdown
Contributor

trofi commented Jul 24, 2022

Bisect claims 10362d7 librdf_raptor2: 2.0.15 -> unstable-2022-06-06 boroke a bunch of packages in staging-next. All have the same symptom: underlinked liblrdf.so library is not usable by it's final depends:

I think lrdf library is linked incorrectly and is missing some xml library.

Possible fix (or workaround) is to enable shared libs by default. Proposed as: #182727

YorikSar added a commit to YorikSar/nixpkgs that referenced this pull request Jul 24, 2022
gobject-introspection doesn't handle checkInputs since
NixOS#177538, so tests
couldn't find UMockdev namespace. Added umockdev to buildInputs.
YorikSar added a commit to YorikSar/nixpkgs that referenced this pull request Jul 24, 2022
gobject-introspection doesn't handle checkInputs since
NixOS#177538.
Added umockdev to buildInputs.
This was referenced Jul 25, 2022
@jtojnar jtojnar mentioned this pull request Sep 7, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: python Python is a high-level, general-purpose programming language. 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants