News for hackers. Stuff that matters.
Re:The Holy Grail of Linux Binary Compatibility: Musl and Dl... by jcalvinowens on Monday January 26, 2026 @11:20AM (#46767578)

  mkdir chroot
  cd chroot
  for lib in $(ldd ${executable} | grep -oE '/\S+'); do
    tgt="$(dirname ${lib})"
    mkdir -p .${tgt}
    cp ${lib} .${tgt}
  done
  mkdir -p .$(dirname ${executable})
  cp ${executable} .${executable}
  tar cf ../chroot-run-anywhere.tgz .
Re:The Holy Grail of Linux Binary Compatibility: Musl and Dl... by saidinesh5 on Monday January 26, 2026 @04:31PM (#46771849)
You're supposed to do this recursively for all the libs no?

Eg. Your App might just depend on libqt5gui.so but that libqt5gui.so might depend on some libxml etc...

Not to mention all the files from /usr/share etc... That your application might indirectly depend on.

Re:The Holy Grail of Linux Binary Compatibility: Musl and Dl... by jcalvinowens on Monday January 26, 2026 @06:14PM (#46773072)
> You're supposed to do this recursively

ldd works recursively.

> Not to mention all the files from /usr/share

Well yeah, there obviously cannot be a generic way to enumerate all the files a program might open...