On 3/24/25 13:36, Makoto Fujiwara wrote:
Hi, - Udated (NetBSD/amd64) 9.3 host to 9.4 - Newly setup chroot and bootstrap - run pbulk with devel/cabel-fmt only Gave me the problematic result as before. On the same machine, outside of chroot, at devel/cabal-fmt, I did make package. and then readelf gives following line thinkc-01@makoto 12:50:39/250324(..devel/cabal-fmt)% \ readelf -d /tmp/devel/cabal-fmt/work/cabal-fmt-0.1.12/dist/build/cabal-fmt/cabal-fmt |grep -i rpath | tr ':' '\012' 0x000000000000000f (RPATH) Library rpath [/usr/pkg/lib /usr/pkg/lib/x86_64-netbsd-ghc-9.10.1 /usr/pkg/lib/ghc-9.10.1/lib/x86_64-netbsd-ghc-9.10.1 /tmp/devel/cabal-fmt/work/cabal-fmt-0.1.12/dist/build/version-interval]
Thank you for giving me the data. The last one is wrong. It's very wrong. Executables or shared libraries must not contain RPATHs relative to WRKDIR, and our GHC (lang/ghc910) is patched[1] so that it won't produce those bad RPATHs. I still have no idea why it doesn't work on your machines.
As a comparison the same executable on my machine has only the first three of the RPATHs:
% readelf -d work/cabal-fmt-0.1.12/dist/build/cabal-fmt/cabal-fmt | grep -i rpath | tr ':' '\012' 0x000000000000000f (RPATH) Library rpath [/usr/pkg/lib /usr/pkg/lib/aarch64-netbsd-ghc-9.10.1 /usr/pkg/lib/ghc-9.10.1/lib/aarch64-netbsd-ghc-9.10.1][1]: lang/ghc910/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC_Build_Link.hs, hunk #2