About test suits Cont1

[qali@qali llvm-2.8-rev]$ find . -exec grep -n “LLVMCC_EMITIR_FLAG” ./ {} ;
./projects/test-suite/Makefile.tests:47: -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:51: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:55: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:59: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:63: -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:67: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)

There are errors in config.log, but I need your help for clarifying them (I selected the first four errors below):
error 1:

configure:3475: gcc -E conftest.c
conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
configure:3481: $? = 1
configure: failed program was:

#include <ac_nonexistent.h>

error 2:

configure:4171: gcc -c -g -O2 conftest.c >&5
conftest.c: In function ‘main’:
conftest.c:26: error: ‘not’ undeclared (first use in this function)
conftest.c:26: error: (Each undeclared identifier is reported only once
conftest.c:26: error: for each function it appears in.)
conftest.c:26: error: expected ‘;’ before ‘big’
configure:4177: $? = 1
configure: failed program was:

#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif

;
return 0;
}

error 3:

configure:12186: gcc -c -g -O2 conftest.c >&5
conftest.c:104:16: error: dl.h: No such file or directory
configure:12192: $? = 1

error 4:

configure:12269: result: no
configure:12302: checking for dl.h
configure:12310: result: no
configure:12169: checking sys/dl.h usability
configure:12186: gcc -c -g -O2 conftest.c >&5
conftest.c:104:20: error: sys/dl.h: No such file or directory
configure:12192: $? = 1

2011/1/14 Eric Christopher <echristo@apple.com>

[qali@qali llvm-2.8-rev]$ find . -exec grep -n “LLVMCC_EMITIR_FLAG” ./ {} ;
./projects/test-suite/Makefile.tests:47: -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:51: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:55: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:59: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:63: -$(LCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)
./projects/test-suite/Makefile.tests:67: -$(LCXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -S $< -o $@ $(LLVMCC_EMITIR_FLAG)

I know this. The question I asked was to grep in your top level build directory. You a) searched all subdirectories, and b) in the source, not build directory.

There are errors in config.log, but I need your help for clarifying them (I selected the first four errors below):

These errors aren’t even important. In order to figure out what your system has configure will attempt to compile a bunch of different programs.

You’ll need to look for what is setting LLVMCC_EMITIR_FLAG and then debug from there.

-eric

1. I have searched the access/setting of LLVMCC_EMITIR_FLAG in the build directory, recursively, and all the output is what I pasted in last email (just the same to the that in source directory). Maybe the configure failed to do it. My command list for building the test suit is as followings:
(1) cd ~/SRC_DIR/llvm/projects
(2) svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
(3) cd LLVMGCC_DIR;
(4) gunzip --stdout llvm-gcc-4.2-version-platform.tar.gz | tar -xvf -
(5) cd ~/OBJ_DIR/llvm;
(6) SRC_DIR/configure --prefix=INS_DIR --enable-debug-runtime --disable-optimized --enable-debug-symbols --enable-assertions --with-llvmgccdir=LLVMGCC_DIR
(7) search LLVMCC_EMITIR_FLAG or “cd projects/test-suite” (both failed)

2. Another question
In the steps above, I omitted the re-configure process in http://llvm.org/docs/TestingGuide.html#testsuiterun , since I thought I have configured the $LLVM_GCC_DIR before building llvm.

As it failed, I did the following to reconfigure, but it failed again:
(8) cd OBJ_DIR/llvm/
(9) SRC_DIR/configure --prefix=INS_DIR --enable-debug-runtime --disable-optimized --enable-debug-symbols --enable-assertions --with-llvmgccdir=LLVMGCC_DIR

I need your help, and thanks very much for your time.

2011/1/18 Eric Christopher <echristo@apple.com>

I’m not quite sure what on earth you’re doing.

Let’s start from some questions:

a) llvm-gcc-4.2-version-platform.tar.gz

I don’t know what this is. Does it contain binaries? I don’t see you building llvm-gcc at any point, or installing binaries for it.

b) your commands have a lot of variables in them. Could you perhaps show the actual commands you’re running, very simply? It’s only about 10 lines.

Comments:

a) If you’ve got a failing configure then not re-running configure for subdirectories isn’t likely to change anything is it?

b) In a grep of my llvm build directory I have:

[yendi:Data/builds/build-llvm] echristo% grep EMITIR *
Makefile.config:LLVMCC_EMITIR_FLAG = -emit-llvm
config.log:LLVMCC_EMITIR_FLAG=‘-emit-llvm’
config.status:s,@LLVMCC_EMITIR_FLAG@,|#!!#|-emit-llvm,g

If you’ve done your configure correctly you’ll see something similar.

-eric

I am sorry for making you confused when I presented my problem.
1. My steps for the test suit building:
(1) cd /home/qali/Src; // This is my source directory for all application programs
(2) tar xzf llvm-2.8.tgz; // now, the top directory of source tree is /home/qali/llvm-2.8
(3) cd llvm-2.8/projects
(4) svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite // now I check out the test suite into /home/qali/llvm-2.8/projects
(5) cd /home/qali/install; // This is my Install directory for all applications
(6) tar xjf llvm-gcc4.2-2.8-x86_64-linux.tar.bz2 //Now, the binary file for llvm-gcc is in /bin, since what I downloaded was the binary version
(7) cd /home/qali/Build; mkdir llvm-2.8; cd llvm-2.8*;* // Now, it is in my top directory for building llvm: /home/qali/Build/llvm-2.8
(8) /home/qali/Src/llvm-2.8/configure --prefix=/home/qali/install/llvm-2.8 --enable-debug-runtime --disable-optimized --enable-debug-symbols --enable-assertions --with-llvmgccdir=/home/qali/install/llvm-gcc4.2-2.8-x86_64-linux
(9) make
(10) /home/qali/Src/llvm-2.8/configure --prefix=/home/qali/install/llvm-2.8 --enable-debug-runtime --disable-optimized --enable-debug-symbols --enable-assertions --with-llvmgccdir=/home/qali/install/llvm-gcc4.2-2.8-x86_64-linux // reconfigure process
(11) grep EMITIR *
Here, I get no results. It seems LLVMCC_EMITIR_FLAG was not set during my configuration.
My linux is Fedora Core 13, cpu is intel i3, and host gcc is 4.4.5.

2. After the reconfigure process, I have search LLVM in config.log, and all the results are below:

[qali@qali llvm-2.8-ori]$ grep “^LLVM” config.log
LLVMCC1=‘/home/qali/build/llvm-gcc4.2-2.8-x86_64-linux/bin/…/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/cc1’
LLVMCC1PLUS=‘/home/qali/build/llvm-gcc4.2-2.8-x86_64-linux/bin/…/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/cc1plus’
LLVMCC_OPTION=‘llvm-gcc’
LLVMGCC=‘/home/qali/build/llvm-gcc4.2-2.8-x86_64-linux/bin/llvm-gcc’
LLVMGCCCOMMAND=‘/home/qali/build/llvm-gcc4.2-2.8-x86_64-linux/bin/llvm-gcc’
LLVMGCCDIR=‘/home/qali/build/llvm-gcc4.2-2.8-x86_64-linux/bin/…’
LLVMGCC_LANGS=‘c,c++,fortran’
LLVMGXX=‘/home/qali/build/llvm-gcc4.2-2.8-x86_64-linux/bin/llvm-g++’
LLVMGXXCOMMAND=‘/home/qali/build/llvm-gcc4.2-2.8-x86_64-linux/bin/llvm-g++’
LLVM_BINDIR=‘/home/qali/install/llvm-2.8-ori/bin’
LLVM_CONFIGTIME=‘Wed Jan 19 10:22:57 HKT 2011’
LLVM_COPYRIGHT=‘Copyright (c) 2003-2010 University of Illinois at Urbana-Champaign.’
LLVM_CROSS_COMPILING=‘0’
LLVM_DATADIR=‘/home/qali/install/llvm-2.8-ori/share/llvm’
LLVM_DOCSDIR=‘/home/qali/install/llvm-2.8-ori/share/doc/llvm’
LLVM_ENUM_ASM_PARSERS=‘LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(X86) ’
LLVM_ENUM_ASM_PRINTERS=‘LLVM_ASM_PRINTER(MBlaze) LLVM_ASM_PRINTER(Blackfin) LLVM_ASM_PRINTER(SystemZ) LLVM_ASM_PRINTER(MSP430) LLVM_ASM_PRINTER(XCore) LLVM_ASM_PRINTER(PIC16) LLVM_ASM_PRINTER(CellSPU) LLVM_ASM_PRINTER(Mips) LLVM_ASM_PRINTER(ARM) LLVM_ASM_PRINTER(Alpha) LLVM_ASM_PRINTER(PowerPC) LLVM_ASM_PRINTER(Sparc) LLVM_ASM_PRINTER(X86) ’
LLVM_ENUM_DISASSEMBLERS=‘LLVM_DISASSEMBLER(ARM) LLVM_DISASSEMBLER(X86) ’
LLVM_ENUM_TARGETS=‘LLVM_TARGET(MBlaze) LLVM_TARGET(CppBackend) LLVM_TARGET(CBackend) LLVM_TARGET(Blackfin) LLVM_TARGET(SystemZ) LLVM_TARGET(MSP430) LLVM_TARGET(XCore) LLVM_TARGET(PIC16) LLVM_TARGET(CellSPU) LLVM_TARGET(Mips) LLVM_TARGET(ARM) LLVM_TARGET(Alpha) LLVM_TARGET(PowerPC) LLVM_TARGET(Sparc) LLVM_TARGET(X86) ’
LLVM_ETCDIR=’/home/qali/install/llvm-2.8-ori/etc/llvm’
LLVM_INCLUDEDIR=’/home/qali/install/llvm-2.8-ori/include’
LLVM_INFODIR=‘/home/qali/install/llvm-2.8-ori/info’
LLVM_LIBDIR=‘/home/qali/install/llvm-2.8-ori/lib’
LLVM_MANDIR=‘/home/qali/install/llvm-2.8-ori/man’
LLVM_ON_UNIX=‘1’
LLVM_ON_WIN32=‘0’
LLVM_PREFIX=‘/home/qali/install/llvm-2.8-ori’

2011/1/19 Eric Christopher <echristo@apple.com>

Aha. I figured it out, my apologies for not noticing this sooner.

The LLVM_EMITIR_FLAG variable was added after 2.8, so by checking out the testsuite into a newer source tree you're mixing and matching two versions that aren't compatible anymore.

You have two options:

a) check out llvm and the testsuite from svn
b) use the source and testsuite from the download

Thanks for the report and working with us nicely :slight_smile:

Good luck!

-eric