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

libsemanage: fix build w/gcc7 #36936

Merged
merged 1 commit into from Mar 14, 2018
Merged

libsemanage: fix build w/gcc7 #36936

merged 1 commit into from Mar 14, 2018

Conversation

xeji
Copy link
Contributor

@xeji xeji commented Mar 13, 2018

Motivation for this change

didn't build with gcc7.

/cc ZHF #36453

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.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: libsemanage

Partial log (click to expand)

install -m 755 semanage_migrate_store /nix/store/03vgd3asw8ysq27i63jsgh56mskl6sak-libsemanage-2.4/libexec/selinux/
make[1]: Leaving directory '/build/libsemanage-2.4/utils'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/03vgd3asw8ysq27i63jsgh56mskl6sak-libsemanage-2.4
shrinking /nix/store/03vgd3asw8ysq27i63jsgh56mskl6sak-libsemanage-2.4/lib/libsemanage.so.1
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/03vgd3asw8ysq27i63jsgh56mskl6sak-libsemanage-2.4/lib  /nix/store/03vgd3asw8ysq27i63jsgh56mskl6sak-libsemanage-2.4/libexec
patching script interpreter paths in /nix/store/03vgd3asw8ysq27i63jsgh56mskl6sak-libsemanage-2.4
checking for references to /build in /nix/store/03vgd3asw8ysq27i63jsgh56mskl6sak-libsemanage-2.4...
/nix/store/03vgd3asw8ysq27i63jsgh56mskl6sak-libsemanage-2.4

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: libsemanage

Partial log (click to expand)

install -m 755 semanage_migrate_store /nix/store/b9rank90v4sin7whhpcjgfff4yqqc1f5-libsemanage-2.4/libexec/selinux/
make[1]: Leaving directory '/build/libsemanage-2.4/utils'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/b9rank90v4sin7whhpcjgfff4yqqc1f5-libsemanage-2.4
shrinking /nix/store/b9rank90v4sin7whhpcjgfff4yqqc1f5-libsemanage-2.4/lib/libsemanage.so.1
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/b9rank90v4sin7whhpcjgfff4yqqc1f5-libsemanage-2.4/lib  /nix/store/b9rank90v4sin7whhpcjgfff4yqqc1f5-libsemanage-2.4/libexec
patching script interpreter paths in /nix/store/b9rank90v4sin7whhpcjgfff4yqqc1f5-libsemanage-2.4
checking for references to /build in /nix/store/b9rank90v4sin7whhpcjgfff4yqqc1f5-libsemanage-2.4...
/nix/store/b9rank90v4sin7whhpcjgfff4yqqc1f5-libsemanage-2.4

@andir
Copy link
Member

andir commented Mar 14, 2018

Thanks! 👍

Have you considered updating our selinux libraries instead? The upstream repository seems to be very active (https://github.com/SELinuxProject/selinux). Our libs/tools from them are still at version 2.4 the current upstream release seems to be 2.7. Upgrading those might also fix the GCC issues (amongst other bugs, new features, …).

Two commits I was able to find just now:

@xeji
Copy link
Contributor Author

xeji commented Mar 14, 2018

@andir: Thank you - I agree we should update to 2.7 and will look into it. But that will be a little more work since it involves multiple packages.
So this quick fix for 2.4 should still be merged first.

@@ -13,7 +13,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ bison flex ];
buildInputs = [ libsepol libselinux ustr bzip2 libaudit ];

NIX_CFLAGS_COMPILE = "-fstack-protector-all -std=gnu89";
NIX_CFLAGS_COMPILE = [
"-fstack-protector-all"
Copy link
Member

Choose a reason for hiding this comment

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

can’t we remove this? IIRC the stackprotector is now enabled by default since #12895 ?

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

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

Let's do this now, also for 18.03, and you can update etc. later.

vcunat added a commit that referenced this pull request Mar 14, 2018
@vcunat vcunat merged commit 591fd5e into NixOS:master Mar 14, 2018
vcunat added a commit that referenced this pull request Mar 14, 2018
@Ma27
Copy link
Member

Ma27 commented Mar 14, 2018

@vcunat ack, will submit a PR tonight:)

@xeji
Copy link
Contributor Author

xeji commented Mar 14, 2018 via email

@Ma27
Copy link
Member

Ma27 commented Mar 14, 2018

ahh great!

@xeji xeji deleted the p/libsemanage branch March 14, 2018 15:41
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

5 participants