Can GHC link binaries against a libc implementation such as uclibc (used in OpenWrt by default)?

ε祈祈猫儿з 提交于 2019-12-05 17:59:21

问题


I am using Debian/MIPS+QEMU to build MIPS ports of PortFusion (a TCP tunneling solution). The resulting binaries are linked against GNU libc. Thus, they cannot be just copied over and used on vanilla OpenWrt which ships with uclibc instead of eglibc (which seems binary-compatible with GNU libc).


  • Is there a way to link Haskell/GHC binaries on Debian/MIPS against uclibc instead of eglibc?

  • Can OpenWrt's using uclibc be really the reason why PortFusion binaries copied over from Debian fail to run with -ash: binary not found or can this message be due to something entirely else?


See https://github.com/corsis/PortFusion/wiki/MIPS-Builds for details on which haskell-platform, Linux kernel and CPU emulation are used.


The current head of OpenWrt's GIT repository is failing at make when I attempt building custom OpenWrt images that use eglibc instead.


回答1:


Is there a way to link Haskell/GHC binaries on Debian/MIPS against uclibc instead of eglibc?

No. You need to to rebuild Haskell/GHC from sources using uclibc-based GCC cross-compiler.

Can OpenWrt's using uclibc be really the reason

Yes. Also, you can try to use ldd on your MIPS pplatform to check what library is missing. I'm sure it will be some of libc-related libraries.



来源:https://stackoverflow.com/questions/14270253/can-ghc-link-binaries-against-a-libc-implementation-such-as-uclibc-used-in-open

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!