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

gdbgui: init at 0.9.0.1 #31959

Merged
merged 1 commit into from Nov 23, 2017
Merged

gdbgui: init at 0.9.0.1 #31959

merged 1 commit into from Nov 23, 2017

Conversation

yrashk
Copy link
Contributor

@yrashk yrashk commented Nov 23, 2017

Feature rich browser-based frontend with data structure visualizations
(like DDD), and gdb terminal access. Compatible with C, C++, golang,
Rust, fortran. Written in Python and JavaScript

gdbgui is at the top of the GDB Front Ends
list on https://sourceware.org/gdb/wiki/GDB%20Front%20Ends

Motivation for this change

gdbgui is not present in nixpkgs

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@yrashk
Copy link
Contributor Author

yrashk commented Nov 23, 2017

This is my first "new package" PR so please let me know if I missed some requirement or convention. Thank you!

@bjornfor
Copy link
Contributor

Cool!

It doesn't build for me (test phase fails):

$ nix-build -A gdbgui
...
wrapping `/nix/store/didsnhp5ixi1a9gqg6a588zv0gpqa0jr-gdbgui-0.9.0.1/bin/.gdbgui-wrapped'...
running install tests
running test
error: protocol not found
builder for ‘/nix/store/0rh11mh4lk772xs67k7x0y8f2xfwgqs2-gdbgui-0.9.0.1.drv’ failed with exit code 1
error: build of ‘/nix/store/0rh11mh4lk772xs67k7x0y8f2xfwgqs2-gdbgui-0.9.0.1.drv’ failed

Can you try with "nix.useSandbox = true" and see if you get the same issue? Looks like the tests does something that is unavailable in Nix sandboxes.

@Mic92
Copy link
Member

Mic92 commented Nov 23, 2017

Looking at the error message I assume it tries to access /etc/protocols or /etc/services.
There is very ugly workaround for that: https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix#L2386
Maybe the test can be patched to disable that or if it is a single test it can be skipped.

@yrashk
Copy link
Contributor Author

yrashk commented Nov 23, 2017

@bjornfor I can confirm that when useSandbox is enabled, I get the same error. It goes away with the fix highlighted by @Mic92. I updated my PR to include this workaround. Let me know if it works and if you have any other thoughts on this PR!

preCheck = ''
export NIX_REDIRECTS=/etc/protocols=${pkgs.iana-etc}/etc/protocols \
LD_PRELOAD=${pkgs.libredirect}/lib/libredirect.so
'';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes tests for me as well. The only disadvantage I see that this method is not available on darwin (and maybe not required?). Can you make this optional on linux:

preCheck = lib.optionalString stdenv.isLinux ''
      export NIX_REDIRECTS=/etc/protocols=${pkgs.iana-etc}/etc/protocols \
             LD_PRELOAD=${pkgs.libredirect}/lib/libredirect.so
'';

then we can check with our pr bot, if it builds on darwin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, amended!

Feature rich browser-based frontend with data structure visualizations
(like DDD), and gdb terminal access. Compatible with C, C++, golang,
Rust, fortran. Written in Python and JavaScript

gdbgui is at the top of the GDB Front Ends
list on https://sourceware.org/gdb/wiki/GDB%20Front%20Ends
@Mic92
Copy link
Member

Mic92 commented Nov 23, 2017

@GrahamcOfBorg build gdbgui

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-darwin

patching script interpreter paths in /nix/store/f1q2kd9apxbwwhdc0fnmddldnhf2mfxh-gdbgui-0.9.0.1
wrapping `/nix/store/f1q2kd9apxbwwhdc0fnmddldnhf2mfxh-gdbgui-0.9.0.1/bin/.gdbgui-wrapped'...
running install tests
running test
..
----------------------------------------------------------------------
Ran 2 tests in 0.024s

OK
/nix/store/f1q2kd9apxbwwhdc0fnmddldnhf2mfxh-gdbgui-0.9.0.1

@Mic92
Copy link
Member

Mic92 commented Nov 23, 2017

Ok green light on darwin. Thanks

@Mic92 Mic92 merged commit a30fa6d into NixOS:master Nov 23, 2017
Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-linux

checking for references to /tmp/nix-build-gdbgui-0.9.0.1.drv-0 in /nix/store/c6bidhm170discbv72j77rrshyj4kh5g-gdbgui-0.9.0.1...
wrapping `/nix/store/c6bidhm170discbv72j77rrshyj4kh5g-gdbgui-0.9.0.1/bin/.gdbgui-wrapped'...
running install tests
running test
..
----------------------------------------------------------------------
Ran 2 tests in 0.153s

OK
/nix/store/c6bidhm170discbv72j77rrshyj4kh5g-gdbgui-0.9.0.1

@yrashk yrashk deleted the gdbgui branch November 23, 2017 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants