peteg's blog - AYAD - Project - 2008 01 17 StaticLinkingBlues

HOPE in a host(ile) environment.

/AYAD/Project | Link

I finally managed to get HOPE to statically link. Björn does this against MySQL, so the infrastructure was there, but Debian's PostgreSQL binary packages are built with Kerberos support, and apparently libkrb5-dev no longer supports static linking. I rebuilt them with all that switched off (thanks Debian, that was pretty easy), and now the linker seems happy. The hazards of binary packaging...

So, why bother with this at all? Well, the company that will host DRD's new website apparently doesn't have GMP installed. This threw me a bit; I expected it to be missing all sorts of stuff, but GMP? I have been using GHC for too long it seems. Sure, I could try to arrange for the shared library to be present, or statically link just GMP in, but it seemed better to insulate HOPE from any other changes in the hostile environment with too much overkill, rather than not enough.

Next up: what happens when /etc/hosts is MIA? How do I talk to the database server? I begin to understand why everyone sticks to PHP and MySQL, and why Ruby on Rails's convention-based approach is such a big deal.