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

include own lib dir in RPATH before system lib dirs in binutils easyblock #2044

Merged
merged 2 commits into from
May 11, 2020

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Apr 27, 2020

Avoids taking a system lib over an installed lib
Fixes easybuilders/easybuild-easyconfigs#10056

@zao

@zao
Copy link
Contributor

zao commented Apr 27, 2020

$ eb binutils-2.34.eb
...
== COMPLETED: Installation ended successfully (took 1 min 46 sec)

@zao
Copy link
Contributor

zao commented Apr 27, 2020

This is on Ubuntu 20.04, I have yet to test anything on the Arch Linux described in easybuilders/easybuild-easyconfigs#10056

@Flamefire
Copy link
Contributor Author

Ah yes the issue is in the EC repo. Updated the commit and description, no other change

@zao
Copy link
Contributor

zao commented Apr 27, 2020

Arch Linux seems a bit link-happy still but it finds the right libctf at least:

== 2020-04-27 12:54:45,808 run.py:540 DEBUG cmd "ldd /hp/eb/software/binutils/2.34/bin/objdump" exited with exit code 0 and output:
        linux-vdso.so.1 (0x00007ffc31093000)
        libopcodes-2.34.so => /hp/eb/software/binutils/2.34/bin/../lib/libopcodes-2.34.so (0x00007fbb984c1000)
        libctf.so.0 => /hp/eb/software/binutils/2.34/bin/../lib/libctf.so.0 (0x00007fbb98493000)
        libbfd-2.34.so => /hp/eb/software/binutils/2.34/bin/../lib/libbfd-2.34.so (0x00007fbb98350000)
        libdebuginfod.so.1 => /usr/lib/libdebuginfod.so.1 (0x00007fbb98349000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fbb98344000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fbb9817e000)
        libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00007fbb980ee000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fbb98684000)
        libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x00007fbb980c5000)
        libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007fbb980a4000)
        libssh2.so.1 => /usr/lib/libssh2.so.1 (0x00007fbb98064000)
        libpsl.so.5 => /usr/lib/libpsl.so.5 (0x00007fbb98051000)
        libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007fbb97fc0000)
        libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007fbb97ce7000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007fbb97c92000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007fbb97bad000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007fbb97b7c000)
        libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007fbb97b76000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fbb97b5c000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fbb97b38000)
        libunistring.so.2 => /usr/lib/libunistring.so.2 (0x00007fbb979b6000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007fbb979a7000)
        libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0x00007fbb979a0000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007fbb97987000)

Simpler programs like addr2line are doing the right thing now.

== 2020-04-27 12:54:45,571 run.py:540 DEBUG cmd "ldd /hp/eb/software/binutils/2.34/bin/addr2line" exited with exit code 0 and output:
        linux-vdso.so.1 (0x00007ffdf1ded000)
        libbfd-2.34.so => /hp/eb/software/binutils/2.34/bin/../lib/libbfd-2.34.so (0x00007fd1f594c000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fd1f5947000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fd1f5781000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fd1f5a9b000)

@zao
Copy link
Contributor

zao commented Apr 27, 2020

Seems like I need to cpnfigure binutils/2.34 with --without-debuginfod to avoid it finding a "helpful" library that pulls in curl and eventually z on my system.

Should that go into the easyblock (in this PR or another), or into the 2.34 and onward easyconfigs?

@Flamefire
Copy link
Contributor Author

I'd go for EasyBlock with an option to include it. Do you know in which versions this was introduced?

@zao
Copy link
Contributor

zao commented Apr 27, 2020

@Flamefire
Copy link
Contributor Author

Ok, done: 78ebdae

Disabled by default.

akesandgren
akesandgren previously approved these changes Apr 28, 2020
Copy link
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@zao zao left a comment

Choose a reason for hiding this comment

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

LGTM

@akesandgren
Copy link
Contributor

Going in, thanks @Flamefire!

@akesandgren akesandgren merged commit 052da71 into easybuilders:develop May 11, 2020
@Flamefire Flamefire deleted the binutils_rpath branch May 11, 2020 10:24
@boegel boegel changed the title [binutils] Include own lib dir in rpath before system lib dirs include own lib dir in rpath before system lib dirs in binutils easyblock May 13, 2020
@boegel boegel changed the title include own lib dir in rpath before system lib dirs in binutils easyblock include own lib dir in RPATH before system lib dirs in binutils easyblock May 13, 2020
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.

binutils: RPATH in binaries includes system paths
3 participants