Navigation Menu

Skip to content
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

perlPackages.GlibObjectIntrospection: needs cairo to build test libs #68115

Merged
merged 2 commits into from Dec 29, 2020

Conversation

livnev
Copy link
Contributor

@livnev livnev commented Sep 4, 2019

Motivation for this change

Without cairo, the build output has:

Trying to build test libraries... Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
 at Makefile.PL line 187.
not OK
Error: *** can not find package cairo
*** check that it is properly installed and available in PKG_CONFIG_PATH
 at Makefile.PL line 187.
Continuing without test library support...

and tests are skipped. Adding cairo to buildInputs makes the tests run, and fail! At least we know that this package is broken, with some issue related to library paths...

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@livnev livnev force-pushed the glib-object-introspection branch 2 times, most recently from 9a6be8c to b450554 Compare February 24, 2020 08:17
@livnev
Copy link
Contributor Author

livnev commented Feb 24, 2020

Is including nextcloud: 18.0.0 -> 18.0.1 to this PR intentional?

Nope, not at all. That somehow appeared after I rebased on latest master. I rebased on latest master again and now it's gone, so I think we're good. Sorry about that.

@aanderse
Copy link
Member

@GrahamcOfBorg build perldevelPackages.GlibObjectIntrospection perlPackages.GlibObjectIntrospection

@aanderse
Copy link
Member

@livnev looks like some issues still:

Result: FAIL
Failed 18/18 test programs. 0/0 subtests failed.

@livnev
Copy link
Contributor Author

livnev commented Feb 29, 2020

@aanderse I am aware that the tests fail, my PR is adding a dependency which is necessary for the tests to run. I am suspecting that the package is broken but this was previously undetected since the tests were being skipped, due to the lack of cairo. Unfortunately I don't know how to fix it.

@doronbehar
Copy link
Contributor

I have a suspicion that the tests fail due to the sandbox or something in yours / hydra's environment. @livnev could you try and play with this with nix-build --options sandbox false -A perlPackages.GlibObjectIntrospection? If that fails as well, I'd contact upstream in the meantime and set doCheck = false;, along with the checkInputs added.

If the tests fail only with the sandbox, perhaps @aanderse we can disable the tests only if sandbox is enabled? Something like:

doCheck = !stdenv.isDarwin;

@livnev
Copy link
Contributor Author

livnev commented Feb 29, 2020

@doronbehar disabling sandboxing didn't fix it. For the record, all of the test failures look like this:

t/00-basic-types.t ............ WARNING **: Failed to load shared library '/nix/store/iaqncam6zxha0d1jgz5bnfhg3kbv5izj-perl5.30.1-Glib-Object-Introspection-0.048/lib/libregress.so' referenced by the typelib: /nix/store/iaqncam6zxha0d1jgz5bnfhg3kbv5izj-perl5.30.1-Glib-Object-Introspection-0.048/lib/libregress.so: cannot open shared object file: No such file or directory at /tmp/nix-build-perl5.30.1-Glib-Object-Introspection-0.048.drv-0/Glib-Object-Introspection-0.048/blib/lib/Glib/Object/Introspection.pm line 110.
Could not find GType for package Regress::TestObj at ./t/inc/setup.pl line 33.
Compilation failed in require at t/00-basic-types.t line 3.
BEGIN failed--compilation aborted at t/00-basic-types.t line 3.

I've now added doCheck = false; to this package.

@doronbehar
Copy link
Contributor

According to nix-locate (great tool for debugging these kind of issues BTW, see https://github.com/bennofs/nix-index ):

$ nix-locate libregress.so
gnome3.gjs.out                                  121,984 x /nix/store/4855j0vvm39rkcqdxdk8rnklj1gs00w2-gjs-1.56.2/lib/gjs/libregress.so

@livnev
Copy link
Contributor Author

livnev commented Feb 29, 2020

According to nix-locate (great tool for debugging these kind of issues BTW, see https://github.com/bennofs/nix-index ):

$ nix-locate libregress.so
gnome3.gjs.out                                  121,984 x /nix/store/4855j0vvm39rkcqdxdk8rnklj1gs00w2-gjs-1.56.2/lib/gjs/libregress.so

Thanks for the hint. However, adding pkgs.gnome3.gjs to propagatedBuildInputs doesn't seem to fix the tests. Did you have something else in mind?

@doronbehar
Copy link
Contributor

I'd try to debug this inside a nix-shell while inspecting $GI_TYPELIB_PATH with this new dependency and perhaps try to run a perl command that will import this library somehow.

@doronbehar
Copy link
Contributor

@livnev
Copy link
Contributor Author

livnev commented Feb 29, 2020

@doronbehar unfortunately since I'm not a perl person I think I would struggle to fix this. I stumbled upon this when trying to get another package to build which depends on this one. This means I may have to abandon the PR, or it can be merged so that at least the breakage is visible.

@livnev
Copy link
Contributor Author

livnev commented Mar 1, 2020

In the current state of

+    checkInputs = [ pkgs.cairo ];
+    doCheck = false;

the PR has no sense.

Build is not broken on master, the check is just skipped due to missing cairo.

I was mainly trying to add visibility to the fact that the package is broken. Would you advise removing doCheck = false; in that case?

@doronbehar
Copy link
Contributor

I think this PR makes sense. @livnev I'd have also add a comment to the derivation with a link to this PR and a quote of the error:

t/00-basic-types.t ............ WARNING **: Failed to load shared library '/nix/store/iaqncam6zxha0d1jgz5bnfhg3kbv5izj-perl5.30.1-Glib-Object-Introspection-0.048/lib/libregress.so' referenced by the typelib: /nix/store/iaqncam6zxha0d1jgz5bnfhg3kbv5izj-perl5.30.1-Glib-Object-Introspection-0.048/lib/libregress.so: cannot open shared object file: No such file or directory at /tmp/nix-build-perl5.30.1-Glib-Object-Introspection-0.048.drv-0/Glib-Object-Introspection-0.048/blib/lib/Glib/Object/Introspection.pm line 110.
Could not find GType for package Regress::TestObj at ./t/inc/setup.pl line 33.
Compilation failed in require at t/00-basic-types.t line 3.
BEGIN failed--compilation aborted at t/00-basic-types.t line 3.

While writing down as well that adding gnome.gjs doesn't fix this issue. Perhaps use a # TODO comment which will be grepable as well.

@livnev
Copy link
Contributor Author

livnev commented Mar 7, 2020

@doronbehar sorry for the delay, done.

@doronbehar
Copy link
Contributor

Wait, now that I see #68116 , I can see you wrote there:

I tried making a package that depends on GlibObjectIntrospection, and got the following error at runtime:
...

Meaning that the failure of the tests correctly indicates the package is broken. I'd remove doCheck = false; and add to meta:

    broken = true;

And put that nice comment you added before doCheck, there.

@livnev
Copy link
Contributor Author

livnev commented Mar 7, 2020

Wait, now that I see #68116 , I can see you wrote there:

I tried making a package that depends on GlibObjectIntrospection, and got the following error at runtime:
...

Meaning that the failure of the tests correctly indicates the package is broken. I'd remove doCheck = false; and add to meta:

    broken = true;

And put that nice comment you added before doCheck, there.

Agreed, I was trying to say that the tests failing was a good thing because the package actually appears to be broken. I've now reverted the doCheck = false, marked it as broken, and moved the comment. Thanks for your guidance on this.

@livnev livnev force-pushed the glib-object-introspection branch from 99a3e00 to 0256aa0 Compare March 7, 2020 17:44
@stale
Copy link

stale bot commented Sep 4, 2020

Hello, I'm a bot and I thank you in the name of the community for your contributions.

Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do:

If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list.

If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past.

If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments.

Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 4, 2020
@SuperSandro2000 SuperSandro2000 merged commit 04b1978 into NixOS:master Dec 29, 2020
dramforever added a commit to dramforever/config that referenced this pull request Jan 10, 2021
pacien added a commit to pacien/nixpkgs that referenced this pull request Feb 19, 2021
The patched GIR path was referring to the not-yet built package.

Note that the package was working fine and that only the tests were failing due to some GIR path issues.
It shouldn't have been marked as broken in the first place.

GitHub: follows NixOS#68115
GitHub: closes NixOS#68116
@pacien pacien mentioned this pull request Feb 19, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants