Skip to content

Conversation

@bedroge
Copy link
Contributor

@bedroge bedroge commented Mar 22, 2023

With RPATH support enabled, the RPATH sanity check of the GoPackage easyblock always fails. See easybuilders/easybuild-easyconfigs#17516.

This implements @casparvl's suggestion (easybuilders/easybuild-easyconfigs#17516 (comment)) and doesn't run the readelf command on these binaries. In the rare case that a binary does actually depend on some external library, an error should be printed that explains that the current RPATH wrappers don't work for Go, and a link to the issue is printed as well.

@bedroge bedroge changed the title custom RPATH sanity check for Go packages that doesn't actually check for the binary's RPATH section custom RPATH sanity check for Go packages that doesn't actually check for an RPATH section in the binary Mar 22, 2023
@bedroge
Copy link
Contributor Author

bedroge commented Mar 23, 2023

Test report by @bedroge

Overview of tested easyconfigs (in order)

  • SUCCESS SeqKit-2.3.1.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
bob-Latitude-5300 - Linux Ubuntu 22.04, x86_64, Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz, Python 3.10.6
See https://gist.github.com/bedroge/e27f46092773aa381ce599368b1238d9 for a full test report.

@bedroge
Copy link
Contributor Author

bedroge commented Mar 23, 2023

Test report by @bedroge

Overview of tested easyconfigs (in order)

  • SUCCESS gh-2.20.2.eb
  • SUCCESS rclone-1.57.0.eb
  • SUCCESS Miller-6.4.0.eb
  • SUCCESS KMCP-0.9.1.eb

Build succeeded for 4 out of 4 (4 easyconfigs in total)
bob-Latitude-5300 - Linux Ubuntu 22.04, x86_64, Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz, Python 3.10.6
See https://gist.github.com/bedroge/e754cd093b051f6a72ca47347f6839c2 for a full test report.

Edit: don't know what went wrong with that first link, but it's gh-2.20.2.eb.

@boegel boegel added the bug fix label Mar 28, 2023
@boegel boegel added this to the next release (4.7.2?) milestone Mar 28, 2023
@boegel boegel changed the title custom RPATH sanity check for Go packages that doesn't actually check for an RPATH section in the binary use custom RPATH sanity check for Go packages that doesn't actually check for an RPATH section in the binary Apr 12, 2023
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

@bedroge Rather than copy-pasting the body of EasyBlock.sanity_check_rpath and stripping out the stuff related to readelf_rpath_regex, can't we make the readelf part of EasyBlock.sanity_check_rpath optional (but enabled by default), so we can just do this here?

super(EB_Go, self).sanity_check_rpath(check_readelf_rpath=False)

@bedroge
Copy link
Contributor Author

bedroge commented Apr 12, 2023

@bedroge Rather than copy-pasting the body of EasyBlock.sanity_check_rpath and stripping out the stuff related to readelf_rpath_regex, can't we make the readelf part of EasyBlock.sanity_check_rpath optional (but enabled by default), so we can just do this here?

super(EB_Go, self).sanity_check_rpath(check_readelf_rpath=False)

Yes, that's a good idea, makes it much more reusable.

Related to that: the issue also popped up for easybuilders/easybuild-easyconfigs#17516, but this makes me wonder if there's a way to easily apply the same thing for easyconfigs like that one without having to implement a custom easyblock? Would it, for instance, make sense to have a list of application names for which the step gets skipped anyway, or add some easyconfig parameter that can be used to skip the step?

@boegel
Copy link
Member

boegel commented Apr 12, 2023

@bedroge Rather than copy-pasting the body of EasyBlock.sanity_check_rpath and stripping out the stuff related to readelf_rpath_regex, can't we make the readelf part of EasyBlock.sanity_check_rpath optional (but enabled by default), so we can just do this here?

super(EB_Go, self).sanity_check_rpath(check_readelf_rpath=False)

Yes, that's a good idea, makes it much more reusable.

Related to that: the issue also popped up for easybuilders/easybuild-easyconfigs#17516, but this makes me wonder if there's a way to easily apply the same thing for easyconfigs like that one without having to implement a custom easyblock? Would it, for instance, make sense to have a list of application names for which the step gets skipped anyway, or add some easyconfig parameter that can be used to skip the step?

We could indeed also add an easyconfig parameter so the readelf part of sanity_check_rpath can be disabled from an easyconfig file, something like sanity_check_rpath_readelf = False ?

@bedroge
Copy link
Contributor Author

bedroge commented Apr 21, 2023

Implemented the first idea in https://github.com/easybuilders/easybuild-framework/pull/4249/files, the latter can be done in an additional PR.

@bedroge
Copy link
Contributor Author

bedroge commented Apr 21, 2023

Test report by @bedroge

Overview of tested easyconfigs (in order)

  • SUCCESS SeqKit-2.3.1.eb
  • SUCCESS gh-2.20.2.eb
  • SUCCESS rclone-1.57.0.eb
  • SUCCESS Miller-6.4.0.eb
  • SUCCESS KMCP-0.9.1.eb

Build succeeded for 5 out of 5 (5 easyconfigs in total)
bob-Latitude-5300 - Linux Ubuntu 22.04, x86_64, Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz, Python 3.10.6
See https://gist.github.com/bedroge/6201f8f87ee3ecf9bca116956027799e for a full test report.

Note: used a development version of eb that has the changes proposed in easybuilders/easybuild-framework#4249.

@boegel
Copy link
Member

boegel commented May 23, 2023

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS gofasta-0.0.5.eb
  • SUCCESS KMCP-0.9.1.eb
  • SUCCESS SeqKit-2.3.1.eb

Build succeeded for 3 out of 3 (3 easyconfigs in total)
node4009.donphan.os - Linux RHEL 8.6, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz (cascadelake), 1 x NVIDIA NVIDIA A2, 530.30.02, Python 3.6.8
See https://gist.github.com/boegel/ffcadff88ee7c7cd02e89eb370777d4f for a full test report.

edit: using --rpath

@boegel
Copy link
Member

boegel commented May 23, 2023

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS gofasta-0.0.5.eb
  • SUCCESS KMCP-0.9.1.eb
  • SUCCESS SeqKit-2.3.1.eb

Build succeeded for 3 out of 3 (3 easyconfigs in total)
node4009.donphan.os - Linux RHEL 8.6, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz (cascadelake), 1 x NVIDIA NVIDIA A2, 530.30.02, Python 3.6.8
See https://gist.github.com/boegel/1342b3ab886293fd1d9041b44d9035ed for a full test report.

edit: without --rpath

Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel boegel merged commit ff602e7 into easybuilders:develop May 23, 2023
@bedroge bedroge deleted the fix_go_rpath_sanity_check branch May 24, 2023 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants