Problem Compiling Test-suite

Hello, I am new in using llvm so I would like to get some help on how to compile test-suite.

Assumptions:
llvm is in /llvm directory
llvm-gcc is in /llvm-4.2-2.4-x86-linux-RHEL4/bin

I have tried compiling test-suite and I get the following error:
$make
make[1]: Entering directory ‘/llvm/projects/test-suite/SingleSource’
make[2]: Entering directory ‘/llvm/projects/test-suite/SingleSource/UnitTests’
make[3]: Entering directory ‘/llvm/projects/test-suite/SingleSource/UnitTests/Vector’
make[4]: Entering directory ‘/llvm/projects/test-suite/SingleSource/UnitTests/Vector/SSE’
make[4]: *** No rule to make target ‘Output/sse.expandfft.linked.rbc’, needed by ‘Output/sse.expandfft.linked.bc’. Stop.

This means that the make call cannot find the llvm-gcc file. If I type llvm-gcc in the terminal I get:
llvm-gcc: no input name

Now I have tried running make after running the following configurations.

in the test-suite folder:

  1. ./configure
  2. ./configure --with-llvmgccdir=/llvm-4.2-2.4-x86-linux-RHEL4/bin
  3. ./configure --with-llvmgccdir=/llvm-4.2-2.4-x86-linux-RHEL4/bin --with-llvmsrc=/llvm
  4. ./configure --with-llvmgccdir=/llvm-4.2-2.4-x86-linux-RHEL4/bin --with-llvmobj=/llvm

All of which give me the same error…

when I went to /llvm and did a:

./configure

with nothing else (earlier I was trying to setup the --with-llvmgccdir= llvm-4.2-2.4-x86-linux-RHEL4/bin from here and then did a make in the test-suite I get the following error:

$make
make[1]: Entering directory ‘/llvm/projects/test-suite/SingleSource’
make[2]: Entering directory ‘/llvm/projects/test-suite/SingleSource/UnitTests’
make[3]: Entering directory ‘/llvm/projects/test-suite/SingleSource/UnitTests/Vector’
make[4]: Entering directory ‘/llvm/projects/test-suite/SingleSource/UnitTests/Vector/SSE’
Compiling sse.expandfft.c to Output/sse.expandfft.bc
cc1: warning: unrecognized gcc debugging option: i
cc1: warning: unrecognized gcc debugging option: s
cc1: warning: unrecognized gcc debugging option: b
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: e
cc1: warning: unrecognized gcc debugging option: -
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: m
cc1: warning: unrecognized gcc debugging option: -
cc1: warning: unrecognized gcc debugging option: o
cc1: warning: unrecognized gcc debugging option: t
cc1: warning: unrecognized gcc debugging option: z
cc1: warning: unrecognized gcc debugging option: n
cc1: warning: unrecognized gcc debugging option: s
cc1: Unknown command line argument ‘-m32’. Try: ‘cc1 --help’
make: [Output/sse.expandfft.bc] Error 1 (ignored)
cp -f Output/sse.expandfft.bc Output/sse.expandfft.linked.rbc
cp: cannot stat ‘Output/sse.expandfft.bc’ No such file or directory

and then it tries to compile the following files like sse.isamax.c but I get the same warnings and errors…

Any idea on what might be wrong here? I have tried rerunning the configure options at the test-suite level with but the error still exists.

Also in the test-suite when I try to make a SPEC2006 benchmark where can I specify what passes to be run at the opt level?

Thanks,

George

Hi,

make[1]: Entering directory '/llvm/projects/test-suite/SingleSource'

usually it is llvm-test not test-suite. I don't know if this matters.

make[4]: *** No rule to make target 'Output/sse.expandfft.linked.rbc', needed by 'Output/sse.expandfft.linked.bc'. Stop.

This is a sign that it couldn't find llvm-gcc. Try rerunning configure,
not in the testsuite but in the top-level llvm directory.

when I went to /llvm and did a:

./configure

OK, I see you did :slight_smile:

with nothing else (earlier I was trying to setup the --with-llvmgccdir= llvm-4.2-2.4-x86-linux-RHEL4/bin from here and then did a make in the test-suite I get the following error:

...

cc1: warning: unrecognized gcc debugging option: i
cc1: warning: unrecognized gcc debugging option: s
cc1: warning: unrecognized gcc debugging option: b
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: e
cc1: warning: unrecognized gcc debugging option: -
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: l
cc1: warning: unrecognized gcc debugging option: m
cc1: warning: unrecognized gcc debugging option: -
cc1: warning: unrecognized gcc debugging option: o
cc1: warning: unrecognized gcc debugging option: t
cc1: warning: unrecognized gcc debugging option: z
cc1: warning: unrecognized gcc debugging option: n
cc1: warning: unrecognized gcc debugging option: s
cc1: Unknown command line argument '-m32'. Try: 'cc1 --help'

It sounds like your versions of llvm and llvm-gcc are out of sync.
If you got llvm from svn then you need llvm-gcc from svn too.

Ciao,

Duncan.

ok I noticed a few errors I had… .

  1. inconsistency in llvm source code/ test suite and gcc front end… I synched up to the 2.5 versions and that seemed to help along with…

  2. the llvmgccdir should not be at the /bin level but the actual root directory…

so now I can compile the test-suite… but I still have an error…

When I run the make command from the 400.perlbench (External/SPEC/CINT2006/400.perlbench) folder I get llvm to compile the source code but I still some errors further on:

make
Compiling Base64.c to Output/Base64.bc
Compiling Cwd.c to Output/Cwd.bc
Compiling Dumper.c to Output/Dumper.bc
Compiling DynaLoader.c to Output/DynaLoader.bc
Compiling HiRes.c to Output/HiRes.bc
Compiling Hostname.c to Output/Hostname.bc
Compiling IO.c to Output/IO.bc
Compiling MD5.c to Output/MD5.bc
Compiling Opcode.c to Output/Opcode.bc
Compiling Parser.c to Output/Parser.bc
Compiling Peek.c to Output/Peek.bc
Compiling Storable.c to Output/Storable.bc
Compiling attrs.c to Output/attrs.bc
Compiling av.c to Output/av.bc
Compiling deb.c to Output/deb.bc
Compiling doio.c to Output/doio.bc
Compiling doop.c to Output/doop.bc
Compiling dump.c to Output/dump.bc
Compiling globals.c to Output/globals.bc
Compiling gv.c to Output/gv.bc
Compiling hv.c to Output/hv.bc
Compiling locale.c to Output/locale.bc
Compiling mg.c to Output/mg.bc
Compiling numeric.c to Output/numeric.bc
Compiling op.c to Output/op.bc
Compiling pad.c to Output/pad.bc
Compiling perl.c to Output/perl.bc
Compiling perlapi.c to Output/perlapi.bc
Compiling perlio.c to Output/perlio.bc
Compiling perlmain.c to Output/perlmain.bc
Compiling perly.c to Output/perly.bc
Compiling poll.c to Output/poll.bc
Compiling pp.c to Output/pp.bc
Compiling pp_ctl.c to Output/pp_ctl.bc
Compiling pp_hot.c to Output/pp_hot.bc
Compiling pp_pack.c to Output/pp_pack.bc
Compiling pp_sort.c to Output/pp_sort.bc
Compiling pp_sys.c to Output/pp_sys.bc
Compiling regcomp.c to Output/regcomp.bc
Compiling regexec.c to Output/regexec.bc
Compiling run.c to Output/run.bc
Compiling scope.c to Output/scope.bc
Compiling specrand.c to Output/specrand.bc
Compiling stdio.c to Output/stdio.bc
Compiling sv.c to Output/sv.bc
Compiling taint.c to Output/taint.bc
Compiling toke.c to Output/toke.bc
Compiling universal.c to Output/universal.bc
Compiling utf8.c to Output/utf8.bc
Compiling util.c to Output/util.bc
Compiling xsutils.c to Output/xsutils.bc
/gpatsil/llvm/Release/bin/llvm-ld -link-as-library -disable-opt Output/Base64.bc Output/Cwd.bc Output/Dumper.bc Output/DynaLoader.bc Output/HiRes.bc Output/Hostname.bc Output/IO.bc Output/MD5.bc Output/Opcode.bc Output/Parser.bc Output/Peek.bc Output/Storable.bc Output/attrs.bc Output/av.bc Output/deb.bc Output/doio.bc Output/doop.bc Output/dump.bc Output/globals.bc Output/gv.bc Output/hv.bc Output/locale.bc Output/mg.bc Output/numeric.bc Output/op.bc Output/pad.bc Output/perl.bc Output/perlapi.bc Output/perlio.bc Output/perlmain.bc Output/perly.bc Output/poll.bc Output/pp.bc Output/pp_ctl.bc Output/pp_hot.bc Output/pp_pack.bc Output/pp_sort.bc Output/pp_sys.bc Output/regcomp.bc Output/regexec.bc Output/run.bc Output/scope.bc Output/specrand.bc Output/stdio.bc Output/sv.bc Output/taint.bc Output/toke.bc Output/universal.bc Output/utf8.bc Output/util.bc Output/xsutils.bc -o Output/400.perlbench.linked.rbc
/gpatsil/llvm/Release/bin/opt -std-compile-opts -info-output-file=/gpatsil/llvm/projects/test-suite/External/SPEC/CINT2006/400.perlbench/Output/400.perlbench.linked.bc.info -stats -time-passes Output/400.perlbench.linked.rbc -o Output/400.perlbench.linked.bc -f
/tuck_data/gpatsil/llvm/Release/bin/llvm-ld -L/tuck_data/gpatsil/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/…/lib/gcc/i686-pc-linux-gnu/4.2.1 -L/tuck_data/gpatsil/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/…/lib -info-output-file=/tuck_data/gpatsil/llvm/projects/test-suite/External/SPEC/CINT2006/400.perlbench/Output/400.perlbench.llvm.bc.info -stats -time-passes Output/400.perlbench.linked.bc
-lc -o Output/400.perlbench.llvm

/gpatsil/llvm/Release/bin/llc -f Output/400.perlbench.llvm.bc -o Output/400.perlbench.llc.s
/gpatsil/llvm/Release/bin/llc -march=c Output/400.perlbench.llvm.bc -o Output/400.perlbench.cbe.c -f
gcc Output/400.perlbench.cbe.c -o Output/400.perlbench.cbe -lm -O3 -fno-strict-aliasing -fno-inline
Output/400.perlbench.cbe.c:2254: error: conflicting types for ‘__sigsetjmp’
/usr/include/setjmp.h:58: error: previous declaration of ‘__sigsetjmp’ was here
Output/400.perlbench.cbe.c:2254: error: conflicting types for ‘__sigsetjmp’
/usr/include/setjmp.h:58: error: previous declaration of ‘__sigsetjmp’ was here
Output/400.perlbench.cbe.c:2269: error: conflicting types for ‘siglongjmp’
/usr/include/setjmp.h:109: error: previous declaration of ‘siglongjmp’ was here
Output/400.perlbench.cbe.c:2269: error: conflicting types for ‘siglongjmp’
/usr/include/setjmp.h:109: error: previous declaration of ‘siglongjmp’ was here
Output/400.perlbench.cbe.c:3028: warning: conflicting types for built-in function ‘malloc’
Output/400.perlbench.cbe.c:3035: warning: conflicting types for built-in function ‘powl’
Output/400.perlbench.cbe.c:3037: warning: conflicting types for built-in function ‘expl’
Output/400.perlbench.cbe.c:3039: warning: conflicting types for built-in function ‘logl’
Output/400.perlbench.cbe.c:3041: warning: conflicting types for built-in function ‘sqrtl’
Output/400.perlbench.cbe.c: In function XS_IO__Poll__poll': Output/400.perlbench.cbe.c:23118: error: syntax error before string constant Output/400.perlbench.cbe.c:23122: error: syntax error before string constant Output/400.perlbench.cbe.c:23126: error: syntax error before string constant Output/400.perlbench.cbe.c:23130: error: syntax error before string constant Output/400.perlbench.cbe.c:23174: error: syntax error before string constant Output/400.perlbench.cbe.c:23209: error: syntax error before string constant Output/400.perlbench.cbe.c:23216: error: syntax error before string constant Output/400.perlbench.cbe.c:23223: error: syntax error before string constant Output/400.perlbench.cbe.c:23294: error: syntax error before string constant Output/400.perlbench.cbe.c:23306: error: syntax error before string constant Output/400.perlbench.cbe.c:23310: error: syntax error before string constant Output/400.perlbench.cbe.c:23314: error: syntax error before string constant Output/400.perlbench.cbe.c: In function main’:
Output/400.perlbench.cbe.c:301306: warning: return type of ‘main’ is not `int’
make: [Output/400.perlbench.cbe] Error 1 (ignored)

Eventually the test fails… I had a similar problem with bzip2 too… Has anyone seen this error before?

Thanks,
George