Re: [Haskell-cafe] Need help with ghc static compile for cgi using mysql

2009-10-15 Thread John Dorsey
> lambdabot is currently hosted on the lowest end linode. The biggest hurdle I
[...]

+1.  I use linode for (most of) my Haskell work.

John

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need help with ghc static compile for cgi using mysql

2009-10-15 Thread Jason Dagit
On Thu, Oct 15, 2009 at 10:11 AM, John Van Enk  wrote:

> I've run Haskell stuff on VPS hosts like Linode or SliceHost. $20/month is
> a lot better than $60.


lambdabot is currently hosted on the lowest end linode. The biggest hurdle I
hit was that gnu ld is a memory pig when GHC is compiled with split obj.  I
had to build my own ghc (after disabling split obj, not hard but not
adequately documented either) and things seem to be fine now.  Before I
built GHC without split obj I wasn't even able to link Setup.hs to start
building anything.

I would go so far as to recommend GHC HQ do something about the split obj
issue.  I think ideally we need someone to improve gnu ld.

RAM is expensive on the linode so you need to make sure the code you want to
run is memory efficient (swap is prohibitively slow).  Having root and and
nice web control panel is a huge win.  I'm reasonably happy considering the
relative cost.

Jason
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need help with ghc static compile for cgi using mysql

2009-10-15 Thread John Van Enk
I've run Haskell stuff on VPS hosts like Linode or SliceHost. $20/month is a
lot better than $60.

On Thu, Oct 15, 2009 at 12:32 PM, Austin King  wrote:

> For now, I've given up on cheap hosting (via statically compiled CGI).
>
> I've created a GHC 6.10.4, cabal-install, Ubuntu 9.04 ec2 instance +
> MySQL and it works well.
>
> Running this plus EBS and Elastic IP will run a little over $60 a month.
> Ouch.
>
> The work going into Haskell Platform is amazing, but...
> Haskell needs a better commodity hosting story, to allow for casual,
> fun web hacking.
>
> For the record, I tried nearlyfreespeech.net and dreamhost. I wasn't
> able to install ghc and cabal due to:
> * FreeBSD GHC support (old version)
> * FreeBSD library support (no HDBC)
> * Linux - Missing 'dev' libraries like zlib and not having root access
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Need help with ghc static compile for cgi using mysql

2009-10-15 Thread Austin King
For now, I've given up on cheap hosting (via statically compiled CGI).

I've created a GHC 6.10.4, cabal-install, Ubuntu 9.04 ec2 instance +
MySQL and it works well.

Running this plus EBS and Elastic IP will run a little over $60 a month. Ouch.

The work going into Haskell Platform is amazing, but...
Haskell needs a better commodity hosting story, to allow for casual,
fun web hacking.

For the record, I tried nearlyfreespeech.net and dreamhost. I wasn't
able to install ghc and cabal due to:
* FreeBSD GHC support (old version)
* FreeBSD library support (no HDBC)
* Linux - Missing 'dev' libraries like zlib and not having root access
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Need help with ghc static compile for cgi using mysql

2009-10-12 Thread Austin King
I'm trying to host a cgi I've written. It uses Database.HDBC,
Database.HDBC.MySQL, Network.CGI,  and Text.XHtml.Transitional

Here is the command I'm using to compile
ghc --make -optl-static -optl-pthread -static -o test.cgi
-package cgi -package xhtml -package HDBC-mysql -package HDBC -optl
-lz  Main.hs
and I get "(.text+0x120): undefined reference to `compress'"
Searching around I found that mysql recommended passing "lz" to the
linker... so I added -optl -lz

Complete command and output:
ghc --make -optl-static -optl-pthread -static -o test.cgi
-package cgi -package xhtml -package HDBC-mysql -package HDBC -optl
-lz  Main.hs
[1 of 5] Compiling Config   ( Config.hs, Config.o )
[2 of 5] Compiling Model( Model.hs, Model.o )
[3 of 5] Compiling View ( View.hs, View.o )
[4 of 5] Compiling Controller   ( Controller.hs, Controller.o )
[5 of 5] Compiling Main ( Main.hs, Main.o )
Linking test.cgi ...
/opt/ghc-6.10.4/lib/ghc-6.10.4/network-2.2.1.2/libHSnetwork-2.2.1.2.a(HsNet.o):
In function `my_inet_ntoa':
HsNet.c:(.text+0x20): multiple definition of `my_inet_ntoa'
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(my_net.o):(.text+0x0):
first defined here
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(mf_pack.o):
In function `unpack_dirname':
(.text+0x75b): warning: Using 'getpwnam' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(libmysql.o):
In function `read_user_name':
(.text+0x6081): warning: Using 'getpwuid' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(mf_pack.o):
In function `unpack_dirname':
(.text+0x76a): warning: Using 'endpwent' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/opt/ghc-6.10.4/lib/ghc-6.10.4/network-2.2.1.2/libHSnetwork-2.2.1.2.a(HsNet.o):
In function `hsnet_getaddrinfo':
HsNet.c:(.text+0x15): warning: Using 'getaddrinfo' in statically
linked applications requires at runtime the shared libraries from the
glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(ssl.o):
In function `yaSSL::read_file(yaSSL::SSL_CTX*, char const*, int,
yaSSL::CertType)':
(.text+0x29f3): warning: memset used with constant zero length
parameter; this could be due to transposed parameters
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(my_gethostbyname.o):
In function `my_gethostbyname_r':
(.text+0x3c): warning: Using 'gethostbyname_r' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/opt/ghc-6.10.4/lib/ghc-6.10.4/network-2.2.1.2/libHSnetwork-2.2.1.2.a(BSD__213.o):
In function `s9bc_info':
(.text+0x55): warning: Using 'getprotobyname' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(libmysql.o):
In function `mysql_server_init':
(.text+0x6b22): warning: Using 'getservbyname' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(my_compress.o):
In function `my_uncompress':
(.text+0x6b): undefined reference to `uncompress'
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmysqlclient.a(my_compress.o):
In function `my_compress_alloc':
(.text+0x120): undefined reference to `compress'
collect2: ld returned 1 exit status

I'm using ghc 6.10.4 on Ubuntu 9.04 i386
I have libmysqlclient15-dev installed

Thanks,
Austin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe