Skip to content

libsemanage: fix build w/gcc7#36936

Merged
vcunat merged 1 commit intoNixOS:masterfrom
xeji:p/libsemanage
Mar 14, 2018
Merged

libsemanage: fix build w/gcc7#36936
vcunat merged 1 commit intoNixOS:masterfrom
xeji:p/libsemanage

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 GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 13, 2018
@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.


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

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants