GHC可以将二进制文件链接到uclibc之类的libc实现(默认情况下在OpenWrt中使用)吗? [英] Can GHC link binaries against a libc implementation such as uclibc (used in OpenWrt by default)?

查看:134
本文介绍了GHC可以将二进制文件链接到uclibc之类的libc实现(默认情况下在OpenWrt中使用)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Debian/MIPS + QEMU构建 PortFusion的MIPS端口 (TCP隧道解决方案).生成的二进制文件与GNU libc链接.因此,它们不能被复制并用于随同 uclibc 而不是 eglibc (似乎与GNU libc二进制兼容)的香草OpenWrt.


  • 是否可以将Debian/MIPS上的Haskell/GHC二进制文件与 uclibc 而不是 eglibc 链接?

  • 使用 uclibc 的OpenWrt是否真的是 原因,为什么从Debian复制过来的PortFusion二进制文件无法在-ash: binary not found下运行,或者此消息可能是由于某种原因完全其他吗?


请参阅 https://github.com/corsis/PortFusion/wiki/MIPS-Builds 有关使用haskell-platform,Linux内核和CPU仿真的详细信息.


当我尝试构建使用 eglibc 的自定义OpenWrt映像时,OpenWrt的GIT存储库的当前头在make处失败.

解决方案

有没有一种方法可以将Debian/MIPS上的Haskell/GHC二进制文件链接到 uclibc而不是eglibc?

不.您需要使用基于uclibc的GCC交叉编译器从源代码重建Haskell/GHC.

OpenWrt是否使用uclibc真的是原因

是的.另外,您可以尝试在MIPS pplatform上使用ldd来检查缺少哪些库.我敢肯定它将是一些与libc相关的库.

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.

解决方案

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.

这篇关于GHC可以将二进制文件链接到uclibc之类的libc实现(默认情况下在OpenWrt中使用)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆