andrewchambers / hpkgs

A package repository for hermes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make symlink that points from ldd to ld-musl-$ARCH.so

sogaiu opened this issue · comments

Making a separate issue, motivated by this comment: #80 (comment)

According to: https://wiki.musl-libc.org/faq.html

musl’s dynamic linker comes with ldd functionality built in. Just create a symlink from ld-musl-$ARCH.so to /bin/ldd. If the dynamic linker was started as “ldd”, it will detect that and print the appropriate DSO information.

As an outline, perhaps near here: https://github.com/andrewchambers/hpkgs/blob/master/core.hpkg#L290

(os/cd (string (dyn :pkg-out) "/x86_64-linux-musl/lib"))
(os/symlink "./ld-musl-x86_64.so.1" "ldd")

Also, some analogous change in bootstrap.sh, may be near here: https://github.com/andrewchambers/hpkgs/blob/master/bootstrap.sh#L80

On a side note, when I look right now, here I see:

/hpkg/<hash>-gcc/x86_64-linux-musl/lib/ld-musl-x86_64.so.1 -> /lib/libc.so

Is that ok?

This sounds like something we discussed before but I'm not recalling the details.