Forum Moderators: coopster & phranque

Message Too Old, No Replies

Aborted due to compilation errors - what does it mean

         

Acternaweb

4:25 pm on Jul 11, 2001 (gmt 0)

10+ Year Member



I received this error message: "aborted due to compilation errors"

But what does it mean? How do I find out where the error resides?

physics

8:26 pm on Jul 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What language were you using? If it was perl, this message means that there is something wrong in your code and it is not possible to run it due to this error. Often this is a missing ; at the end of a line, but there are thousands of possiblities. The best way to find out what is wrong is to add -w to the top of your script and use the 'strict' library... here is what your code will look like:

#!/usr/bin/perl -w

use strict;

#the rest of your code

(where /usr/bin/perl is the location of perl on your computer)
Now you will get all kinds of helpful error messages when you try to run the script. With the help of these messages, 30 cups of coffee, and possibly some valium you should be able to find the bug ;)

Oh, and the use strict thing causes perl to be tougher on you in terms of what it lets you get away with. This tends to keep you from doing things by mistake that really shouldn't be allowed.

sugarkane

9:19 pm on Jul 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Another thing to try is to run 'perl -c script.cgi' from a telnet session - this will do a syntax check and hopefully give you a hint of what's wrong.

Acternaweb

2:42 pm on Jul 12, 2001 (gmt 0)

10+ Year Member



When I use

#!/usr/local/bin/perl -w
use strict;

I get a 500 error. Any ideas?

Air

5:27 pm on Jul 12, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you have access to error log from the web server there will be some useful information sbout the error compared to what it spits out to the browser.

If you don't have access to the error log, then add this to your code, which causes fatal errors to be output to the browser.

#!/usr/local/bin/perl -w
use CGI::Carp qw(fatalsToBrowser);
use strict;