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

abi-compliance-checker: init at 2.3 #47408

Merged
merged 3 commits into from Oct 15, 2018
Merged

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Sep 26, 2018

Motivation for this change

This adds abi-compliance-checker and its two dependencies, for dumping the API/ABI of C/C++ libraries. It is the tool used to produce the reports on this webpage:
https://abi-laboratory.pro/

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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@bhipple
Copy link
Contributor Author

bhipple commented Sep 26, 2018

@GrahamcOfBorg build abi-compliance-checker

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: abi-compliance-checker

Partial log (click to expand)

-- Installing /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3/share/abi-compliance-checker
WARNING: your PATH variable doesn't include '/nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3/bin'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3/bin
patching script interpreter paths in /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3
/nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3/bin/abi-compliance-checker: interpreter directive changed from "/usr/bin/perl" to "/nix/store/kdbzhdzm43r58smfx29x3233dagihxp5-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3...
/nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: abi-compliance-checker

Partial log (click to expand)

-- Installing /nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3/share/abi-compliance-checker
WARNING: your PATH variable doesn't include '/nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3/bin'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3/bin
patching script interpreter paths in /nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3
/nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3/bin/abi-compliance-checker: interpreter directive changed from "/usr/bin/perl" to "/nix/store/w48isnsy2535w5iry1xzw9rbsd5sxfsn-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3...
/nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: abi-compliance-checker, abi-dumper, vtable-dumper

Partial log (click to expand)

/nix/store/gg2bygk1inkqzjgkmv0wqvfbsmcz2lqm-abi-compliance-checker-2.3
/nix/store/96lhrsbyqg1hjd7jd3lk7kqg7gb8803m-abi-dumper-1.1
/nix/store/6p61i53v7cfrj2zc49vn73vmc03f0rh3-vtable-dumper-1.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: abi-compliance-checker, abi-dumper, vtable-dumper

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3/bin
patching script interpreter paths in /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3
/nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3/bin/abi-compliance-checker: interpreter directive changed from "/usr/bin/perl" to "/nix/store/kdbzhdzm43r58smfx29x3233dagihxp5-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3...
/nix/store/bp8g6pzv3kafbvv3h6ma04dmc29dgmsd-abi-compliance-checker-2.3
/nix/store/ibsbv4v0apjwhdcb8a0xsx9q5z4kgy14-abi-dumper-1.1
/nix/store/l2axf7amp6c87ry4gvg426cpb4244sbw-vtable-dumper-1.2

installPhase = ''
make prefix=$out install
'';

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add makeFlags = [ "prefix=$(out)" ]; and delete the phases? (all is the default target of vtable-dumper.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in all 3 packages (along with the meta improvement). Looks a lot nicer now and I learned a new trick with the makeFlags; thanks @orivej!

abi-dumper still needs a preBuild = "mkdir -p $out";, since the Makefile shells out to perl to do its install and will fail if the install dir does not exist, but for the other ones I could delete everything and make it much cleaner.

make prefix=$out install
'';

meta = with stdenv; {
Copy link
Contributor

Choose a reason for hiding this comment

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

We generally write meta = with stdenv.lib;.

@@ -7924,6 +7924,8 @@ with pkgs;

abi-dumper = callPackage ../development/tools/misc/abi-dumper { };

abi-compliance-checker = callPackage ../development/tools/misc/abi-compliance-checker { };
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you put this before abi-dumper to keep them sorted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah thanks for the catch; not sure how I missed that (I'm usually very OCD about sorting).

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: abi-compliance-checker, abi-dumper, vtable-dumper

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/4shihrk2q3qa4man4gv06g8nl258p154-abi-compliance-checker-2.3
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/4shihrk2q3qa4man4gv06g8nl258p154-abi-compliance-checker-2.3/bin
patching script interpreter paths in /nix/store/4shihrk2q3qa4man4gv06g8nl258p154-abi-compliance-checker-2.3
/nix/store/4shihrk2q3qa4man4gv06g8nl258p154-abi-compliance-checker-2.3/bin/abi-compliance-checker: interpreter directive changed from "/usr/bin/perl" to "/nix/store/w48isnsy2535w5iry1xzw9rbsd5sxfsn-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/4shihrk2q3qa4man4gv06g8nl258p154-abi-compliance-checker-2.3...
/nix/store/4shihrk2q3qa4man4gv06g8nl258p154-abi-compliance-checker-2.3
/nix/store/swykif9l5yb937z293a2kcxizpi9wvyz-abi-dumper-1.1
/nix/store/zffansmsm4ki28xa9x11pjpxyhk7y5v3-vtable-dumper-1.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: abi-compliance-checker, abi-dumper, vtable-dumper

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/h9v9hnr54ni3kd9qz3b8hbqj3ris7i1p-abi-compliance-checker-2.3
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/h9v9hnr54ni3kd9qz3b8hbqj3ris7i1p-abi-compliance-checker-2.3/bin
patching script interpreter paths in /nix/store/h9v9hnr54ni3kd9qz3b8hbqj3ris7i1p-abi-compliance-checker-2.3
/nix/store/h9v9hnr54ni3kd9qz3b8hbqj3ris7i1p-abi-compliance-checker-2.3/bin/abi-compliance-checker: interpreter directive changed from "/usr/bin/perl" to "/nix/store/kdbzhdzm43r58smfx29x3233dagihxp5-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/h9v9hnr54ni3kd9qz3b8hbqj3ris7i1p-abi-compliance-checker-2.3...
/nix/store/h9v9hnr54ni3kd9qz3b8hbqj3ris7i1p-abi-compliance-checker-2.3
/nix/store/w1v91cmhadlp9zq3gp1g9z5jmgqj64p2-abi-dumper-1.1
/nix/store/9m2r1c4qh4p75gbrzgiyarnp8cpq1wlf-vtable-dumper-1.2

@bhipple
Copy link
Contributor Author

bhipple commented Oct 2, 2018

Ping? Happy to iterate further, but AFAIK this is good to go now.

@jb55
Copy link
Contributor

jb55 commented Oct 7, 2018

could you fixup the code review changes into their respective commits?

ie:

git reset HEAD^
git add -p
git commit --fixup=<respective-commit>
git add -p
git commit --fixup=<respective-commit>
git rebase --autosquash master

@bhipple
Copy link
Contributor Author

bhipple commented Oct 7, 2018

Can-do; I cleaned up the commit history and rebased onto the latest origin/master.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: abi-compliance-checker, abi-dumper, vtable-dumper

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/lclwmxwwk498r4mwj2287rkmlwkg706c-abi-compliance-checker-2.3
strip is /nix/store/428gs2z4b8f9byvghzlpbjwjb3a7jwxx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/lclwmxwwk498r4mwj2287rkmlwkg706c-abi-compliance-checker-2.3/bin
patching script interpreter paths in /nix/store/lclwmxwwk498r4mwj2287rkmlwkg706c-abi-compliance-checker-2.3
/nix/store/lclwmxwwk498r4mwj2287rkmlwkg706c-abi-compliance-checker-2.3/bin/abi-compliance-checker: interpreter directive changed from "/usr/bin/perl" to "/nix/store/qadiwdmbvnrkfynqh4qc1204mc0cjd2a-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/lclwmxwwk498r4mwj2287rkmlwkg706c-abi-compliance-checker-2.3...
/nix/store/lclwmxwwk498r4mwj2287rkmlwkg706c-abi-compliance-checker-2.3
/nix/store/03bhlnf8w8wd9f8f2dn2q6mfq5a407hc-abi-dumper-1.1
/nix/store/98hjbmnx78lwgdx30ryr8r5sqibnprp3-vtable-dumper-1.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: abi-compliance-checker, abi-dumper, vtable-dumper

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/py0p11z7p62k343hs58x9dw4gl0zn97i-abi-compliance-checker-2.3
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/py0p11z7p62k343hs58x9dw4gl0zn97i-abi-compliance-checker-2.3/bin
patching script interpreter paths in /nix/store/py0p11z7p62k343hs58x9dw4gl0zn97i-abi-compliance-checker-2.3
/nix/store/py0p11z7p62k343hs58x9dw4gl0zn97i-abi-compliance-checker-2.3/bin/abi-compliance-checker: interpreter directive changed from "/usr/bin/perl" to "/nix/store/hjn5kq7yq18z31ajq7lfd6imjwz21lh6-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/py0p11z7p62k343hs58x9dw4gl0zn97i-abi-compliance-checker-2.3...
/nix/store/py0p11z7p62k343hs58x9dw4gl0zn97i-abi-compliance-checker-2.3
/nix/store/d6mxl698j6kxva1cl15405ka5qq45h0v-abi-dumper-1.1
/nix/store/fbii9jdx3rw8y08hanl3njnwqr46z0rc-vtable-dumper-1.2

@bhipple
Copy link
Contributor Author

bhipple commented Oct 10, 2018

Ping @orivej mind taking a look? Should be ready to merge I think.

@bhipple
Copy link
Contributor Author

bhipple commented Oct 15, 2018

CC @matthewbauer would you mind reviewing please?

@matthewbauer matthewbauer merged commit 4c1b22b into NixOS:master Oct 15, 2018
@bhipple
Copy link
Contributor Author

bhipple commented Oct 15, 2018

Thanks!

@bhipple bhipple deleted the add/abi-tools branch February 27, 2019 23:04
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