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

remove system-compiled binutils dirs from $LDFLAGS in binutils easyblock #2712

Merged
merged 1 commit into from Apr 27, 2022

Conversation

bartoldeman
Copy link
Contributor

@bartoldeman bartoldeman commented Apr 23, 2022

Various binutils binaries were linked with both libiberty from
binutils compiled with the system toolchain and libiberty from
binutils compiled with a compiler toolchain.

The gold linker allows this but ld.bfd does not, and it's not
a good thing to do in any case. Removing -L$EBROOTBINUTILS/lib*
from LDFLAGS fixes this issue.

edit (by @boegel): just to make this PR easy to find in case people hit the problem this is causing, here's the error message you get without this change (harvested from a test report in easybuilders/easybuild-easyconfigs#15311 (comment)):

/project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/bin/ld: ../libiberty/libiberty.a(concat.o): in function `concat_length':
concat.c:(.text+0x0): multiple definition of `concat_length'; /project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/lib64/libiberty.a(concat.o):/tmp/boegelbot/binutils/2.38/system-system/binutils-2.38/libiberty/./concat.c:91: first defined here
/project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/bin/ld: ../libiberty/libiberty.a(concat.o): in function `concat_copy':
concat.c:(.text+0xb0): multiple definition of `concat_copy'; /project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/lib64/libiberty.a(concat.o):/tmp/boegelbot/binutils/2.38/system-system/binutils-2.38/libiberty/./concat.c:106: first defined here
/project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/bin/ld: ../libiberty/libiberty.a(concat.o): in function `concat_copy2':
concat.c:(.text+0x190): multiple definition of `concat_copy2'; /project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/lib64/libiberty.a(concat.o):/tmp/boegelbot/binutils/2.38/system-system/binutils-2.38/libiberty/./concat.c:130: first defined here
/project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/bin/ld: ../libiberty/libiberty.a(concat.o): in function `concat':
concat.c:(.text+0x260): multiple definition of `concat'; /project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/lib64/libiberty.a(concat.o):/tmp/boegelbot/binutils/2.38/system-system/binutils-2.38/libiberty/./concat.c:141: first defined here
/project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/bin/ld: ../libiberty/libiberty.a(concat.o): in function `reconcat':
concat.c:(.text+0x3e0): multiple definition of `reconcat'; /project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/lib64/libiberty.a(concat.o):/tmp/boegelbot/binutils/2.38/system-system/binutils-2.38/libiberty/./concat.c:178: first defined here
/project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/bin/ld: ../libiberty/libiberty.a(xexit.o): in function `xexit':
xexit.c:(.text+0x0): multiple definition of `xexit'; /project/def-maintainers/boegelbot/Rocky8/zen2/software/binutils/2.38/lib64/libiberty.a(xexit.o):/tmp/boegelbot/binutils/2.38/system-system/binutils-2.38/libiberty/./xexit.c:48: first defined here
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1049: readelf] Error 1

Various binutils binaries were linked with both libiberty from
binutils compiled with the system toolchain and libiberty from
binutils compiled with a compiler toolchain.

The gold linker allows this but ld.bfd does not, and it's not
a good thing to do in any case. Removing -L$EBROOTBINUTILS/lib*
from LDFLAGS fixes this issue.
@bartoldeman bartoldeman added this to the next release (4.5.5?) milestone Apr 23, 2022
@bartoldeman bartoldeman changed the title Remove system-compiled binutils dirs from LDFLAGS Remove system-compiled binutils dirs from LDFLAGS in binutils easyblock Apr 23, 2022
@casparvl
Copy link
Contributor

Test report by @casparvl

Overview of tested easyconfigs (in order)

  • SUCCESS GCCcore-10.3.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
tcn1.local.snellius.surf.nl - Linux RHEL 8.4, x86_64, AMD EPYC 7H12 64-Core Processor, Python 3.6.8
See https://gist.github.com/dd3a074240f8cba80ab723a4339551ee for a full test report.

@boegel boegel changed the title Remove system-compiled binutils dirs from LDFLAGS in binutils easyblock remove system-compiled binutils dirs from $LDFLAGS in binutils easyblock Apr 27, 2022
@boegel
Copy link
Member

boegel commented Apr 27, 2022

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS binutils-2.30-GCCcore-7.3.0.eb
  • SUCCESS binutils-2.30.eb
  • SUCCESS binutils-2.31.1.eb
  • SUCCESS binutils-2.32-GCCcore-8.3.0.eb
  • SUCCESS binutils-2.32.eb
  • SUCCESS binutils-2.34-GCCcore-9.3.0.eb
  • SUCCESS binutils-2.34.eb
  • SUCCESS binutils-2.35-GCCcore-10.2.0.eb
  • SUCCESS binutils-2.35.eb
  • SUCCESS binutils-2.36.1-GCCcore-10.3.0.eb
  • SUCCESS binutils-2.36.1.eb
  • SUCCESS binutils-2.37-GCCcore-11.2.0.eb
  • SUCCESS binutils-2.37.eb

Build succeeded for 13 out of 13 (13 easyconfigs in total)
node3519.doduo.os - Linux RHEL 8.4, x86_64, AMD EPYC 7552 48-Core Processor (zen2), Python 3.6.8
See https://gist.github.com/f909b3389382e44e6aba43e0e459c886 for a full test report.

@boegel
Copy link
Member

boegel commented Apr 27, 2022

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS binutils-2.32-GCCcore-8.3.0.eb
  • SUCCESS binutils-2.32.eb
  • SUCCESS binutils-2.34-GCCcore-9.3.0.eb
  • SUCCESS binutils-2.34.eb
  • SUCCESS binutils-2.35-GCCcore-10.2.0.eb
  • SUCCESS binutils-2.35.eb
  • SUCCESS binutils-2.36.1-GCCcore-10.3.0.eb
  • SUCCESS binutils-2.36.1.eb
  • SUCCESS binutils-2.37-GCCcore-11.2.0.eb
  • SUCCESS binutils-2.37.eb

Build succeeded for 10 out of 10 (10 easyconfigs in total)
node2613.swalot.os - Linux CentOS Linux 7.9.2009, x86_64, Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz (haswell), Python 3.6.8
See https://gist.github.com/203360d16e24ac95b869d7b09452290e for a full test report.

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 05bf00e into easybuilders:develop Apr 27, 2022
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.

None yet

3 participants