Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 673
Cetin Sert Avatar asked Jan 11 '13 01:01

Cetin Sert


1 Answers

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.

like image 162
qehgt Avatar answered Sep 30 '22 03:09

qehgt