Tuesday, February 20, 2007

SBCL Was a Problem, but the Run Script?

So I got an email from Tyrel Russell, our CS 444 TA. He says he can't run our program, gets some "fatal error in SBCL pid 12345" "can't find core file". I had no idea what that meant, so I said I'd come to his office to figure out what's wrong.

Well, we spent maybe 20 minutes trying to figure out what was wrong. Eventually, we tried setting the environment variables needed explicitly in his shell and then running the program without using the run script. Worked! Turns out his /usr/bin/sh shell wasn't sh, it was bash, and it required that the env vars be exported before they work.

What does this mean? Quickly hacked programs and scripts need to be tested on the environment they run in, or they need to be better written and understood (i.e. not quickly hacked). For assignment two Tyrel said we can just write in our documentation that he needs to set the environment variables before he is able to run our compiler. That's so much easier.

2 comments:

Dimitri Gnidash said...

I wonder how he could ever find SBCL if his envs weren't setup?...

I guess it could have been an export issue..

I can't imagine a single reason why someone's sh would be bash instead of original sh? It is the same as renaming your win32.dll file and then wondering why Windows apps don't work.

The assumption that sh is ....ummm... 'sh' is a totally reasonable one.

Ian said...

It might not have been bash, but it certainly wasn't behaving the same way as the sh we are using. Actually, it could have been sh and had some other environment settings that screwed it up. I don't really know since we didn't look into it any further once we got it working.

But, he did say that of all the submissions that had trouble working, the others all required actual code changes. So good for us in actually having something that works once the environment is set up properly.