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

prelink missing libelf.so.1 #152

Closed
gagern opened this issue Aug 21, 2016 · 6 comments
Closed

prelink missing libelf.so.1 #152

gagern opened this issue Aug 21, 2016 · 6 comments

Comments

@gagern
Copy link

gagern commented Aug 21, 2016

As reported in Gentoo bug 585106, dracut 044 has problems on Gentoo when prelinking:

dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done***
dracut: *** Pre-linking files ***
/usr/sbin/prelink: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
dracut: *** Pre-linking files done ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***

The corresponding dracut code reads thus:

        dinfo "*** Pre-linking files ***"
        inst_multiple -o prelink /etc/prelink.conf /etc/prelink.conf.d/*.conf
        chroot "$initdir" "$PRELINK_BIN" -a
        rm -f -- "$initdir/$PRELINK_BIN"
        rm -fr -- "$initdir"/etc/prelink.*
        dinfo "*** Pre-linking files done ***"

So apparently it lists the files prelink will probably need, does the prelink step, then uninstalls said files again. But it misses the libelf reported by ldd:

# ldd /usr/sbin/prelink 
    linux-vdso.so.1 (…)
    libelf.so.1 => /usr/lib64/libelf.so.1 (…)
    libc.so.6 => /lib64/libc.so.6 (…)
    libz.so.1 => /lib64/libz.so.1 (…)
    /lib64/ld-linux-x86-64.so.2 (…)

I think dracut-install --ldd (or some shell function invoking this, e.g. DRACUT_RESOLVE_DEPS=1 inst_multiple) should be able to install the prelink binary with all accompanying files. But cleaning that up again might be tricky.

@tpgxyz
Copy link
Contributor

tpgxyz commented Apr 25, 2017

Interesting why prelink support is still available in dracut, as it has been proven that prelink does more bad than good. (https://pagure.io/fesco/issue/1183)

Btw, here is the patch that fixes that prelink
https://github.com/OpenMandrivaAssociation/dracut/blob/master/dracut-034-fix-prelink.patch

@haraldh
Copy link
Collaborator

haraldh commented Apr 26, 2017

@tpgxyz care to create a pull request with that patch?

@tpgxyz
Copy link
Contributor

tpgxyz commented Apr 29, 2017

@haraldh done, please merge. Thanks

@Massimo-B
Copy link

Any news here?

@haraldh
Copy link
Collaborator

haraldh commented Oct 26, 2017

Hmm, thinking more about this. If ldd prelink reports libelf, the bug would be in dracut-install not installing the corresponding libelf.so.

Is this still an issue with dracut-046 ???
If yes, could you please point me to the stderr output of dracut started with --debug

@haraldh
Copy link
Collaborator

haraldh commented Oct 26, 2017

Those who can read have an advantage.

I think dracut-install --ldd (or some shell function invoking this, e.g. DRACUT_RESOLVE_DEPS=1 inst_multiple) should be able to install the prelink binary with all accompanying files. But cleaning that up again might be tricky.

@haraldh haraldh closed this as completed Oct 26, 2017
@haraldh haraldh reopened this Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants