Page 1 of 1

cl or scheme not working on server

Posted: Tue May 18, 2010 3:15 am
by Jonsul
Too tired to explain much, my eyes are pulsing! Just seeing if I can get some answers
Okay so I have a hosting account that has cgi. I've successfully tested compiled cgi by writing a really simple c program, and it works. Then I went to see if I could make my favorite language work. First I tied to make something with SBCL which gave me a 28mb executable, it didn't work. I figured it may be the size so I installed clisp and uploaded the 5.2mb executable that it gave me, it didn't work. I figured maybe it's just lisp so I researched some and installed chicken scheme(which explains why I'm in this forum) and made a simple cgi program that just outputted the html and 'hello'. I figured that since I got the c cgi to work maybe if I used chicken and compiled to c it would work. Nope 500 error!(though I must say I like the 18kb executable ;D)

Now what would cause two programs that output the same thing and compiled to c to not work the same? The only difference being one is translated to c.

Other info:
I've tested all the programs on my own server on my computer, even the sbcl one works!
I'm running ubuntu, they're running centOS
I used "csc -o scheme.cgi scheme.scm" to compile, is this not the right command?
I haven't tried ECL yet, I got stuck compiling it. I may finish it tomorrow :/

I mean if all else fails I can do it in python, because I got that working. I just enjoy programing in lisp much more and would rather be able to get it working.

Thanks

Re: cl or scheme not working on server

Posted: Tue May 18, 2010 5:12 am
by ramarren
Jonsul wrote:Now what would cause two programs that output the same thing and compiled to c to not work the same? The only difference being one is translated to c.
SBCL doesn't work on many hosted servers not directly due to executable size, but due to the way it handles memory. For one thing, it tries to reserve half gigabyte virtual space by default on startup. Being virtual, it doesn't actually consume that memory, but some operating system configurations complain.

Are CLisp image even self sufficient? Maybe they are, but they do link dynamically to some libraries. Are you sure that they are all present on the server?

And Chicken Scheme probably and ECL definitely have their own runtime libraries, without which they will not work. It is probably possible to copy those to the server, but that depends what level of access to it you have.

Re: cl or scheme not working on server

Posted: Tue May 18, 2010 7:44 pm
by Jonsul
Could I just copy these to the cgi-bin where the file is located? I'm still figuring out a lot of stuff :)

Re: cl or scheme not working on server

Posted: Tue May 18, 2010 8:08 pm
by gugamilare
I don't know, you should be able to use environment variables to set the library location (like LD_LIBRARY_PATH), or maybe they are found if they are in the same directory of the executable. Maybe you should try do the testing in a fresh system installed in a virtual machine? I would recommend Virtual Box.