andrewchambers / hpkgs

A package repository for hermes
45 stars 3 forks source link

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

Open sogaiu opened 4 years ago

sogaiu commented 4 years ago

Making a separate issue, motivated by this comment: https://github.com/andrewchambers/hpkgs/issues/80#issuecomment-636304509

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.

sogaiu commented 4 years ago

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.