LLVM Project News and Details from the Trenches

Wednesday, April 3, 2013

LLVM Debian/Ubuntu nightly packages


In order to facilitate testing and to improve the deployment of the LLVM toolchain, we are happy to publish LLVM Debian/Ubuntu nightly packages. Read on for information about how it works and what we're building.

These packages provide LLVM, Clang, compiler-rt, polly and LLDB.
They are built for Debian:
  • Wheezy (future stable)
  • Unstable
and Ubuntu:
  • Precise
  • Quantal
  • Raring
 For now, amd64 and i386 are supported.

For example, installing the nightly build of clang 3.3 is as simple as:

echo "deb http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy main"> /etc/apt/sources.list.d/llvm.list
apt-get update
apt-get install clang-3.3

Packages are automatically built twice a day for every architecture and operating system in clean chroots. They are built by a Jenkins instance hosted by IRILL and push the LLVM infrastructure.

 

Repositories

Debian

wheezy (currently testing)
deb http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy main
deb-src http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy main

sid (unstable)
deb http://llvm.org/apt/unstable/ llvm-toolchain main
deb-src http://llvm.org/apt/unstable/ llvm-toolchain main

Ubuntu

Precise (12.04)
deb http://llvm.org/apt/precise/ llvm-toolchain-precise main
deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise main
 
Quantal (12.10)

deb http://llvm.org/apt/quantal/ llvm-toolchain-quantal main
deb-src http://llvm.org/apt/quantal/ llvm-toolchain-quantal main
 
Raring (13.04)
deb http://llvm.org/apt/raring/ llvm-toolchain-raring main
deb-src http://llvm.org/apt/raring/ llvm-toolchain-raring main

 

Install

The following commands will install all packages provided by the llvm-toolchain:

apt-get install clang-3.3 clang-3.3-doc libclang-common-dev libclang-dev libclang1 libclang1-dbg libllvm-3.3-ocaml-dev libllvm3.3 libllvm3.3-dbg lldb-3.3 llvm-3.3 llvm-3.3-dev llvm-3.3-doc llvm-3.3-examples llvm-3.3-runtime

 

Technical workflow

Twice a day, each jenkins job will checkout the debian/ directory necessary to build the packages. The repository is available on the Debian hosting infrastructure: http://anonscm.debian.org/viewvc/pkg-llvm/llvm-toolchain/branches/. In the llvm-toolchain-*-source, the following tasks will be performed:
  • upstream sources will be checkout
  • tarballs will be created. They are named:
    • llvm-toolchain_X.Y~svn123456.orig-lldb.tar.bz2
    • llvm-toolchain_X.Y~svn123456.orig-compiler-rt.tar.bz2
    • llvm-toolchain_X.Y~svn123456.orig.tar.bz2
    • llvm-toolchain_X.Y~svn123456.orig-clang.tar.bz2
    • llvm-toolchain_X.Y~svn123456.orig-polly.tar.bz2
  • Debian .dsc package description is created
  • Start the jenkins job llvm-toolchain-X-binary
Then, the job llvm-toolchain-X-binary will:
  • Create a chroot using cowbuilder or update it is already existing
  • Install libisl >=0.11 if necessary (for polly)
  • Build all the packages
  • Launch lintian, the Debian static analyzer
  • Publish the result on the LLVM repository
Note that a few patches are applied over the LLVM tarballs (and should be merged upstream soon).

Future

This versatile infrastructure allows some more interesting features like:
  • Automatic launch of scan-build on the whole code
  • Full bootstrap of LLVM/Clang
  • Code coverage on the latest release

21 comments:

bar hofesh said...

Where can I get the Repo's public key from ?

Mathiasdm said...

On Ubuntu Precise, I cannot install llvm-3.3-dev, because it depends on libisl10, which does not exist.

Ledru Sylvestre said...

@bar:
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -


@mathiasdm: it should be fixed now. Sorry

rbrito said...

@sylvestre: The key seems to be only self-signed.

For better trust, please sign the key with your own, personal key, so that we know that the repository key is not completely random.

See, for instance, what Mike Hommey does at:

http://mozilla.debian.net/

Bart said...

I'm a novice, so forgive me if this is trivial, but I'm getting, "Depends: libffi5 (>= 3.0.4) but it is not installable". Looks like libffi5 has been deleted from the repositoryh for ubuntu 12.10

Tianyu Zhu said...

Just to clarify: Is libc++ included here as well?

Ledru Sylvestre said...

@Tianyu Zhu: No, not yet at least.


@rbrito: Good idea. I just signed the key and pushed it

@Bart: Are you sure you are not trying to install with precise (12.04) ? Quantal (12.10) does not have libffi5 but libffi6.
See:
http://llvm.org/apt/quantal/dists/llvm-toolchain-quantal/main/binary-amd64/Packages
http://packages.ubuntu.com/quantal/libffi6

Clare Macrae said...

Thank you for this. It worked for me on a vanilla Ubuntu 12.10.

Do similar packages exist for cpp11-migrate - and other tooling components...

If not, is there any way they could be added to this mechanism?

Ledru Sylvestre said...

You are welcome.

This is an ongoing task. However, there are some (minor) bugs which prevents to do it.
See:
http://llvm.org/bugs/show_bug.cgi?id=15793
Besides that, clang extra tools are now built (but not yet shipped).
This will arrive soon.

Kal said...

This is great. Can you provide packages of the release version of llvm/clang in addition to nightly builds? I assume all the 3.3 packages will be pinned to the release version when it gets released then new 3.4 packages will be created for the nightly builds?

Ledru Sylvestre said...

The 3.3 release will be done within the Debian/Ubuntu distribution context.

Since llvm.org/apt/ is provided for the latest trunk, they are currently proposing the 3.4 release.
ex:
apt-get install clang-3.4

brucedawson said...

I would like to build 32-bit executables on 64-bit Ubuntu. When I specify -m32 I get warnings about gnu/stubs-32.h not being found. If I run "sudo apt-get install clang:i386" I get errors about unmet dependencies.

Is either of these techniques support, or likely to be supported?

If these techniques are not supported then better error messages would be appreciated. In particular if -m32 doesn't work then I wish clang would say that.

shishkander said...

I think the dependencies are not properly specified in packages when only some are updated. For example, right now installing 3.3 fails for this reason:

The following packages have unmet dependencies:
libclang-common-dev : Depends: libllvm3.4 (= 1:3.4~svn182727-1~exp1) but 1:3.4~svn188900-1~exp1 is to be installed

It looks like your build process doesn't recreate all packages, but only those whose source has changed. This creates versions mismatches.

ljkfsdaDSAFDA234dfsafa said...

Would you please add support for CentOS 5.* or CentOS 6.*

Ledru Sylvestre said...

@shishkander: what is your distribution and suite ?

@ljkfsdaDSAFDA234dfsafa: I haven't planned to do it but I would be glad to help.

@brucedawson: please report a bug on the Debian or Ubuntu bug tracker (i would prefer the Debian one)

Philipp B said...

I think the dependencies are not properly specified in packages when only some are updated. For example, right now installing 3.3 fails for this reason:

The following packages have unmet dependencies:
libclang-common-dev : Depends: libllvm3.4 (= 1:3.4~svn182727-1~exp1) but 1:3.4~svn188900-1~exp1 is to be installed

It looks like your build process doesn't recreate all packages, but only those whose source has changed. This creates versions mismatches.

Yes, I have the exact same problem on Debian 7. Is there any way to fix this locally?

Ledru Sylvestre said...

@Philipp: what is the distribution which has this issue ?
Thanks

Philipp B said...

@Ledru Sylvestre
Sorry for the delay
My Distribution is Debian 7 "Wheezy" 64bit.

I tried installing clang-3.3, this fails with:
clang-3.3 : Depends: libclang-common-dev (= 1:3.3~svn181334-1~exp1) but 1:3.4~svn182723-1~exp1 is to be installed
libclang-common-dev : Depends: libllvm3.4 (= 1:3.4~svn182723-1~exp1) but 1:3.4~svn191594-1~exp1 is to be installed
So either clang should depend on Version 3.4 or there should be a new package for version 3.3
"apt-cache policy" shows version 3.4 only.

Ledru Sylvestre said...

Oh, don't try to use clang-3.3, just use the 3.4 (they should not be here: I will clean this).

Ledru Sylvestre said...

The LLVM tracker has now a "Packaging" section: http://llvm.org/bugs/enter_bug.cgi?product=Packaging
Please use it to report issues.

CAHWATU said...

i had been install clang 3.5 at debian 7 and me check version clang -v appears
Debian clang version 3.5.0-1~exp1 (trunk) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.7
Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.7.2
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6.3
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7.2
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.1
Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.7.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.1
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7
Candidate multilib: .;@m64
Selected multilib: .;@m64

How to Remove ??? Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.7
Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.7.2
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6.3
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7.2
Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.7.2

Post a Comment