Build error for llvm-2.9 on RHEL5

Hi,

I am getting the following build error while building llvm on RHEL5. Please help me fix this:

gmake[2]: Leaving directory /rhel5pdi/home/asin/llvm_install/tools/llvm-config' /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 18: use: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 19: use: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 20: use: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 21: use: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 24: my: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 25: my: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 26: my: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 27: my: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 28: my: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 29: my: command not found /rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 30: syntax error near unexpected token (’
/rhel5pdi/home/asin/llvm_install/Release/bin/llvm-config: line 30: my $ARCH = lc(q{x86});' gmake[2]: Entering directory /rhel5pdi/home/asin/llvm_install/tools/opt’
/rhel5pdi/home/asin/llvm-2.9/Makefile.rules:959: *** llvm-config --libs failed. Stop.
gmake[2]: Leaving directory /rhel5pdi/home/asin/llvm_install/tools/opt' gmake[1]: *** [opt/.makeall] Error 2 gmake[1]: Leaving directory /rhel5pdi/home/asin/llvm_install/tools’
gmake: *** [all] Error 1

llvm-config is a Perl script, and it looks like somehow it's getting
run in something that isn't perl. What does the first line of
Release/bin/llvm-config look like?

-Eli

Thank you for replying. These are the first few lines from llvm-config:

use 5.006;
use strict;
use warnings;
use Cwd ‘abs_path’;

#---- begin autoconf values ----
my $PACKAGE_NAME = q{llvm};

No, the very first line (which on my computer, looks like "#!/usr/bin/perl").

-Eli

Oh ok. Here it is:

#!/apollo/env/envImprovement/bin/perl

Oh ok. Here it is:
#!/apollo/env/envImprovement/bin/perl

Okay, now what's the output of "/apollo/env/envImprovement/bin/perl --version"?

-Eli

This is perl, v5.8.8 built for Linux-2.6c2.5-i686-64int

Thanks,
Arjun

This is perl, v5.8.8 built for Linux-2.6c2.5-i686-64int
Thanks,
Arjun

Hmm... that looks okay... really not sure what's going on; given that
you have a working Perl, it should be getting used. The only thing I
can think of is that sometimes strange things happen when your build
is on an NFS mount (or other unusual filesystem).

-Eli