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

dsniff: unbreak the build #108591

Merged
merged 1 commit into from Jan 7, 2021
Merged

dsniff: unbreak the build #108591

merged 1 commit into from Jan 7, 2021

Conversation

iblech
Copy link
Contributor

@iblech iblech commented Jan 6, 2021

The default optimization level triggers a gcc bug, breaking the build.
This commit works around this bug by restricting the optimization level.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

@symphorien
Copy link
Member

Using -O1 disables fortify so I'd rather build with an older gcc. Does overriding stdenv with gcc9Stdenv work?

@iblech
Copy link
Contributor Author

iblech commented Jan 6, 2021

Thank you for the suggestion, @symphorien. That also works. As far as I can see, dsniff would then one of only two packages which use gcc9Stdenv (the other being libdnf). Please, you or someone else make the call, I'm not experienced enough to have a well-supported opinion on which approach to use. :-)

@symphorien
Copy link
Member

all of aarch64 compiles with gcc9 #108200 so it's hardly a problem. And using gcc9 allows us to keep more hardening (-D_FORTIFY_SOURCE).

We revert to using GCC 9 for compilation, in order to work around a GCC 10 bug
resulting in a segfault when compiling.

The alternative would be to restrict to optimization level -O1, but this
disables fortify.
@iblech
Copy link
Contributor Author

iblech commented Jan 6, 2021

Ah, okay, I didn't know that, thanks for the handholding! I just force-pushed a new commit which switches to gcc9.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108591 run on x86_64-linux 1

1 package built:
  • dsniff

@symphorien symphorien merged commit d52f984 into NixOS:master Jan 7, 2021
@symphorien
Copy link
Member

thanks!

@iblech
Copy link
Contributor Author

iblech commented Jan 7, 2021

Awesome, thank you for the review and the quick merge! :-) Very much appreciated.

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

3 participants