LLVM 2.1 (or later) and Ubuntu Gutsy

Does anybody have a working version of LLVM 2.1+ (ideally in a .deb
file) that they're willing to share? I'm having some weird problems
trying to get a working version on my 7.10 machine.

Or even better, does anyone have a recipe for building on Gutsy?

Antony Blakey

Antony Blakey wrote:

Does anybody have a working version of LLVM 2.1+ (ideally in a .deb
file) that they're willing to share? I'm having some weird problems
trying to get a working version on my 7.10 machine.
    
Or even better, does anyone have a recipe for building on Gutsy?
  
What problems did you encounter?
I have built it successfully from source on Debian sid, which should be
very similar to Gutsy, at least in terms of build system.
I don't have a .deb file though.

What version are you using? The released one, or SVN?
Are you having trouble building llvm-gcc or llvm itself?

--Edwin

Antony Blakey wrote:

I installed gutsy desktop, and llvm svn head (which compiles for me on MacIntel and Win32. The problem I encounter is with gcc. The llvm config executes gcc -V, which on my installation fails because -V requires an argument. This leads configure to think that the compiler cannot produce executables.

I'm not au fait with the gcc version configuration stuff in Ubuntu, which is where I suspect this is going wrong.

Antony Blakey

Well, _theoretically_ it should be as simple as this (assumed you have
apt, wget, devscripts installed):

apt-get source llvm
mkdir llvm-2.1
cd llvm-2.1
wget http://llvm.org/releases/2.1/llvm-2.1.tar.gz
wget http://llvm.org/releases/2.1/llvm-test-2.1.tar.gz
wget http://llvm.org/releases/2.1/llvm-gcc4.0-2.1.source.tar.gz
cd ..
tar cvzf llvm_2.1.orig.tar.gz llvm-2.1/
rm -rf llvm-2.1/
cd llvm-1.8b/
uupdate -u ../llvm_2.1.orig.tar.gz
cd ../llvm-2.1
debuild

Voila, new .deb in ..!

But...

1. It doesn't work because you have to adjust some build scripts! :frowning:
2. If you try to adjust those scripts you will look like Brad Pitt in 12
Monkeys! :frowning:
3. Having llvm, test and gcc in one package is ugly.
4. Splitting into separate packages is more work than typing 13 shell
commands :((

So...

... if somebody wants to try I would be glad to help/test.

g

PS.: Yes, I tried, and I failed.

PPS.: Yes, I tried to contact the Debian maintainer, but he's busy.

PPS.: Nice to see that Google Summer of Code was invented by Terry
Gilliam ( - YouTube, at 00:41 )

Antony Blakey wrote:

I installed gutsy desktop, and llvm svn head (which compiles for me on
MacIntel and Win32. The problem I encounter is with gcc. The llvm config
executes gcc -V, which on my installation fails because -V requires an
argument. This leads configure to think that the compiler cannot produce
executables.

I'm not au fait with the gcc version configuration stuff in Ubuntu,
which is where I suspect this is going wrong.

Antony Blakey

Antony,

My GCC (4.1.3, gutsy) also requires an argument for -V, but that does
not seem to be a problem. The relevant piece of configure.log

configure:2718: gcc -V >&5
gcc: '-V' option must have argument
configure:2721: $? = 1
configure:2744: checking for C compiler default output file name
configure:2771: gcc conftest.c >&5
configure:2774: $? = 0
configure:2820: result: a.out
configure:2825: checking whether the C compiler works
configure:2835: ./a.out
configure:2838: $? = 0
configure:2855: result: yes

A difference may be that I build for x86_64.

Regards,

John

Antony Blakey schreef:

I installed gutsy desktop, and llvm svn head (which compiles for me on MacIntel and Win32. The problem I encounter is with gcc. The llvm config executes gcc -V, which on my installation fails because -V requires an argument. This leads configure to think that the compiler cannot produce executables.

I'm not au fait with the gcc version configuration stuff in Ubuntu, which is where I suspect this is going wrong.

Antony Blakey

Antony,

My GCC (4.1.3, gutsy) also requires an argument for -V, but that does
not seem to be a problem. The relevant piece of configure.log

configure:2718: gcc -V >&5
gcc: '-V' option must have argument
configure:2721: $? = 1
configure:2744: checking for C compiler default output file name
configure:2771: gcc conftest.c >&5
configure:2774: $? = 0
configure:2820: result: a.out
configure:2825: checking whether the C compiler works
configure:2835: ./a.out
configure:2838: $? = 0
configure:2855: result: yes

A difference may be that I build for x86_64.

Regards,

John

Stupid me, I didn't check that g++ was installed - I thought gcc would have covered it. Anyway, now it configures and is currently building.

Antony Blakey