using dsa

What versions of llvm and llvm-poolalloc should I check out of cvs, in order to use DSA? In a previous post John Criswell suggested checking llvm and llvm-poolalloc out of cvs using the -r release_19 flag. However, there were several post later that said that changes should not be made to the release_19 branch.

At any rate, I've not seen any update on which versions of llvm and llvm-poolalloc compile with each other. Could someone please let me know? I tried using the -r release_19 flag (as was originally suggested), but that version of LLVM fails to compile. I get the following error:

make[1]: Entering directory `/home/lefever/work/llvm-release_19/tools/llvm-config'
llvm[1]: Regenerating LibDeps.txt
llvm[1]: Finding cyclic dependencies between LLVM libraries.
find-cycles.pl: Circular dependency between *.a files:
find-cycles.pl: libLLVMCore.a libLLVMSupport.a
llvm[1]: Building llvm-config script.
cat: /home/lefever/work/llvm-release_19/tools/llvm-config/FinalLibDeps.txt: No such file or directory
make[1]: *** [/home/lefever/work/llvm-release_19/Debug/bin/llvm-config] Error 1
make[1]: Leaving directory `/home/lefever/work/llvm-release_19/tools/llvm-config'
make: *** [all] Error 1

Regards,
Ryan

I updated dsa to mainline cvs. Poolalloc is broken, however.

How do I acquire that version of DSA that you've updated to mainline cvs? Do I still check out llvm-poolalloc, or is there a way to only check out DSA?

Patrick Meredith wrote:

Ryan M. Lefever wrote:

How do I acquire that version of DSA that you've updated to mainline
cvs? Do I still check out llvm-poolalloc, or is there a way to only
check out DSA?
  

I don't know for sure, but I'd imagine that you'd checkout mainline
llvm-poolalloc and just build the lib/DSA directory. If you're in a
hurry, you can try that. Otherwise, you can wait for Patrick, who will
know for sure.

-- John T.

Thank you Patrick! For anyone interested, I was able to get the mainline version of DSA to compile with the mainline version of LLVM. As Patrick pointed out, the mainline version of PoolAllocate does not compile with the mainline version of LLVM. So, I made a small change to llvm-poolalloc/lib/Makefile in which I removed PoolAllocate from the line:

PARALLEL_DIRS=DSA PoolAllocate

After having made that change, I was able to successfully perform a make and make install from the llvm source directory with llvm-poolalloc in the projects directory.

Patrick Meredith wrote:

dear community,

sorry for posting again a beginner's question but i can't find a solution on
my own.
i installed all llvm and llvm-gcc4 in a directory
called "~/programs/llvm/install" in my home folder.
i can build a test c - file as follows:

~/programs/llvm/install/bin/gcc -v -o test test.c
Using built-in specifications.
Target: i686-pc-linux-gnu
Configured
with: ../llvm-gcc4-1.9.source/configure --disable-shared --enable-languages=c,c++ --prefix=/home/stefan/programs/llvm/install/ --enable-llvm=/home/stefan/programs/llvm/llvm-1.9/
Thread-Modell: posix
gcc-Version 4.0.1 LLVM (Apple Computer, Inc. build 5421)
/home/stefan/programs/llvm/install/bin/../libexec/gcc/i686-pc-linux-gnu/4.0.1/cc1 -quiet -v -iprefix /home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/
test.c -quiet -dumpbase test.c -mtune=generic -auxbase
test -version -o /tmp/ccho8QKH.s
non-existent
Directory »/home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include«
will be ignored
double-existent
directory »/home/stefan/programs/llvm/install//lib/gcc/i686-pc-linux-gnu/4.0.1/include«
will be ignored
non-existent
Directory »/home/stefan/programs/llvm/install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include«
will be ignored
#include "..." - Search starts here:
#include <...> - Search starts here:
/home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/include
/usr/local/include
/home/stefan/programs/llvm/install//include
/usr/include
End of serachlist.
GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 5421) (i686-pc-linux-gnu)
        compiled by GNU C version 4.1.2 (Ubuntu 4.1.2-0ubuntu4).
GGC-Heuristic: --param ggc-min-expand=98 --param ggc-min-heapsize=127428
Compiler executable checksum: b00bf19666304299a0fa73d964403765
as --traditional-format -V -Qy -o /tmp/ccfBb8QI.o /tmp/ccho8QKH.s
GNU assembler version 2.17.50 (i486-linux-gnu) using BFD version 2.17.50
20070103 Ubuntu
/home/stefan/programs/llvm/install/bin/../libexec/gcc/i686-pc-linux-gnu/4.0.1/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o
test /usr/lib/crt1.o /usr/lib/crti.o /home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/crtbegin.o -L/home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1 -L/home/stefan/programs/llvm/install/bin/../lib/gcc -L/home/stefan/programs/llvm/install//lib/gcc/i686-pc-linux-gnu/4.0.1 -L/home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../.. -L/home/stefan/programs/llvm/install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../.. /tmp/ccfBb8QI.o -lgcc -lc -lgcc /home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/crtend.o /usr/lib/crtn.o

this was in german so don't be surprised if you find expressions in english
that llvm-gcc wouldn't output - it's due to my "guess-translation"

ok that works - fine.

but it doesn't produce .bc files so i add the "-emit-llvm" option:

~/programs/llvm/install/bin/gcc -v -emit-llvm -o test test.c
Using built-in specifications.
Target: i686-pc-linux-gnu
Configured
with: ../llvm-gcc4-1.9.source/configure --disable-shared --enable-languages=c,c++ --prefix=/home/stefan/programs/llvm/install/ --enable-llvm=/home/stefan/programs/llvm/llvm-1.9/
Thread-Modell: posix
gcc-Version 4.0.1 LLVM (Apple Computer, Inc. build 5421)
/home/stefan/programs/llvm/install/bin/../libexec/gcc/i686-pc-linux-gnu/4.0.1/cc1 -quiet -v -iprefix /home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/
test.c -emit-llvm-bc -o /tmp/ccHzlSjX.o -quiet -dumpbase
test.c -mtune=generic -auxbase test -version
non-existent
Directory »/home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include«
will be ignored
double-existent
directory »/home/stefan/programs/llvm/install//lib/gcc/i686-pc-linux-gnu/4.0.1/include«
will be ignored
non-existent
Directory »/home/stefan/programs/llvm/install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include«
will be ignored
#include "..." - Search starts here:
#include <...> - Search starts here:
/home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/include
/usr/local/include
/home/stefan/programs/llvm/install//include
/usr/include
End of serachlist.
GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 5421) (i686-pc-linux-gnu)
        compiled by GNU C version 4.1.2 (Ubuntu 4.1.2-0ubuntu4).
GGC-Heuristic: --param ggc-min-expand=98 --param ggc-min-heapsize=127428
Compiler executable checksum: b00bf19666304299a0fa73d964403765
/home/stefan/programs/llvm/install/bin/../libexec/gcc/i686-pc-linux-gnu/4.0.1/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o
test -emit-llvm /usr/lib/crt1.o /usr/lib/crti.o /home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/crtbegin.o -L/home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1 -L/home/stefan/programs/llvm/install/bin/../lib/gcc -L/home/stefan/programs/llvm/install//lib/gcc/i686-pc-linux-gnu/4.0.1 -L/home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../.. -L/home/stefan/programs/llvm/install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../.. /tmp/ccHzlSjX.o -lgcc -lc -lgcc /home/stefan/programs/llvm/install/bin/../lib/gcc/i686-pc-linux-gnu/4.0.1/crtend.o /usr/lib/crtn.o

~/programs/llvm/install/bin/gcc -v -emit-llvm -o test test.c

~/programs/llvm/install/bin/gcc -c -v -emit-llvm -o test test.c