cl or scheme not working on server

Discussion of Scheme and Racket

cl or scheme not working on server

Postby Jonsul » Tue May 18, 2010 3:15 am

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
Jonsul
 
Posts: 18
Joined: Mon Apr 19, 2010 7:56 am

Re: cl or scheme not working on server

Postby Ramarren » Tue May 18, 2010 5:12 am

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.
Ramarren
 
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland

Re: cl or scheme not working on server

Postby Jonsul » Tue May 18, 2010 7:44 pm

Could I just copy these to the cgi-bin where the file is located? I'm still figuring out a lot of stuff :)
Jonsul
 
Posts: 18
Joined: Mon Apr 19, 2010 7:56 am

Re: cl or scheme not working on server

Postby gugamilare » Tue May 18, 2010 8:08 pm

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.
gugamilare
 
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil


Return to Scheme

Who is online

Users browsing this forum: No registered users and 0 guests

cron