llvm-toolchain-8: Meta-packages clang, llvm and lld etc.

54 views
Skip to first unread message

Sedat Dilek

unread,
Mar 22, 2019, 5:52:37 AM3/22/19
to Sylvestre Ledru, Clang-Built-Linux ML
Hi Sylvestre,

I have seen llvm-8 and clang-8 Final are available for Debian/unstable.

Can you provide also the meta-packages clang and llvm?
Personally, I do not use them.

Is it too late to have version 8 in Debian/buster?

Thanks for all your work.

Regards,
- Sedat -

P.S.: Output of apt-cache policy

root@iniza:~# LC_ALL=C apt-cache policy clang llvm lld
clang:
Installed: (none)
Candidate: 1:7.0-47
Version table:
1:9.0-48+0~20190219101442.49~1.gbpfaf61f 99
99 http://apt.llvm.org/unstable llvm-toolchain/main amd64 Packages
1:7.0-47 500
500 http://deb.debian.org/debian testing/main amd64 Packages
99 http://deb.debian.org/debian unstable/main amd64 Packages
1:3.8-36 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
llvm:
Installed: (none)
Candidate: 1:7.0-47
Version table:
1:9.0-48+0~20190219101442.49~1.gbpfaf61f 99
99 http://apt.llvm.org/unstable llvm-toolchain/main amd64 Packages
1:7.0-47 500
500 http://deb.debian.org/debian testing/main amd64 Packages
99 http://deb.debian.org/debian unstable/main amd64 Packages
1:3.8-36 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
lld:
Installed: (none)
Candidate: 1:7.0-47
Version table:
1:9.0-48+0~20190219101442.49~1.gbpfaf61f 99
99 http://apt.llvm.org/unstable llvm-toolchain/main amd64 Packages
1:7.0-47 500
500 http://deb.debian.org/debian testing/main amd64 Packages
99 http://deb.debian.org/debian unstable/main amd64 Packages
- EOT -

Sedat Dilek

unread,
Mar 25, 2019, 6:04:04 AM3/25/19
to Sylvestre Ledru, Clang-Built-Linux ML
On Fri, Mar 22, 2019 at 11:49 AM Sylvestre Ledru <sylv...@debian.org> wrote:
>
> Le 22/03/2019 à 10:52, Sedat Dilek a écrit :
> > Hi Sylvestre,
> >
> > I have seen llvm-8 and clang-8 Final are available for Debian/unstable.
> Yeah!
>
> > Can you provide also the meta-packages clang and llvm?
> > Personally, I do not use them.
> Not sure what you mean here. These packages are available and point to 7 in testing/unstable.
> I will upload in experimental the change to 8
>
> > Is it too late to have version 8 in Debian/buster?
> >
> Indeed!
>
> S
>

Now, there are 8.0-48~exp1 packages in Debian/experimental...

root@iniza:~# LC_ALL=C apt-cache policy clang llvm lld
clang:
Installed: (none)
Candidate: 1:7.0-47
Version table:
1:9.0-48+0~20190219101442.49~1.gbpfaf61f 99
99 http://apt.llvm.org/unstable llvm-toolchain/main amd64 Packages

1:8.0-48~exp1 99
99 http://deb.debian.org/debian experimental/main amd64 Packages

1:7.0-47.1 99
99 https://incoming.debian.org/debian-buildd
buildd-unstable/main amd64 Packages
1:7.0-47 500
500 http://deb.debian.org/debian testing/main amd64 Packages
99 http://deb.debian.org/debian unstable/main amd64 Packages
1:3.8-36 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
llvm:
Installed: (none)
Candidate: 1:7.0-47
Version table:
1:9.0-48+0~20190219101442.49~1.gbpfaf61f 99
99 http://apt.llvm.org/unstable llvm-toolchain/main amd64 Packages

1:8.0-48~exp1 99
99 http://deb.debian.org/debian experimental/main amd64 Packages

1:7.0-47.1 99
99 https://incoming.debian.org/debian-buildd
buildd-unstable/main amd64 Packages
1:7.0-47 500
500 http://deb.debian.org/debian testing/main amd64 Packages
99 http://deb.debian.org/debian unstable/main amd64 Packages
1:3.8-36 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
lld:
Installed: (none)
Candidate: 1:7.0-47
Version table:
1:9.0-48+0~20190219101442.49~1.gbpfaf61f 99
99 http://apt.llvm.org/unstable llvm-toolchain/main amd64 Packages

1:8.0-48~exp1 99
99 http://deb.debian.org/debian experimental/main amd64 Packages

1:7.0-47.1 99
99 https://incoming.debian.org/debian-buildd
buildd-unstable/main amd64 Packages
1:7.0-47 500
500 http://deb.debian.org/debian testing/main amd64 Packages
99 http://deb.debian.org/debian unstable/main amd64 Packages

...but the -8 packages are in Debian/unstable:

root@iniza:~# LC_ALL=C apt-cache policy clang-8 llvm-8 lld-8
clang-8:
Installed: 1:8-1
Candidate: 1:8-1
Version table:
*** 1:8-1 100
99 http://deb.debian.org/debian unstable/main amd64 Packages
100 /var/lib/dpkg/status
1:8~svn356034-1~exp1~20190313093332.54 99
99 http://apt.llvm.org/unstable llvm-toolchain-8/main amd64 Packages
llvm-8:
Installed: 1:8-1
Candidate: 1:8-1
Version table:
*** 1:8-1 100
99 http://deb.debian.org/debian unstable/main amd64 Packages
100 /var/lib/dpkg/status
1:8~svn356034-1~exp1~20190313093332.54 99
99 http://apt.llvm.org/unstable llvm-toolchain-8/main amd64 Packages
lld-8:
Installed: 1:8-1
Candidate: 1:8-1
Version table:
*** 1:8-1 100
99 http://deb.debian.org/debian unstable/main amd64 Packages
100 /var/lib/dpkg/status
1:8~svn356034-1~exp1~20190313093332.54 99
99 http://apt.llvm.org/unstable llvm-toolchain-8/main amd64 Packages

That is not what I expect.

- Sedat -

Sylvestre Ledru

unread,
Mar 25, 2019, 6:20:08 AM3/25/19
to sedat...@gmail.com, Clang-Built-Linux ML


> That is not what I expect.

I don't know what you are expecting :)

If you have a look here:

https://packages.debian.org/experimental/clang

you will see that it depends on clang-8

which is the goal, right?

S


Sedat Dilek

unread,
Mar 25, 2019, 6:32:10 AM3/25/19
to Sylvestre Ledru, Clang-Built-Linux ML
What I call meta-package do IMHO the following...

If I want to have parallel installation of Version 7 and 8 of clang I
can switch my default clang by installing that meta-package.

apt-get install clang -t testing

/usr/bin/clang -> /usr/bin/clang-7

Correct?

- sed@ -

Sedat Dilek

unread,
Mar 25, 2019, 6:52:54 AM3/25/19
to Sylvestre Ledru, Clang-Built-Linux ML
Some background information, why I think this should be done correctly:

When building with lld we pass in the continuous-integration
"-fuse-ld=lld" or when using the LLD patchset within the Linux kernel
build-system.
Passing '-fuse-ld=$LINKER-$VER" seems to be problematic and we also
have to look at the GCC compatibility (which supports -fuse-ld as
compiler flag, too).
NOTE: "ld." prefix is auto-appended means -fuse-ld=lld means use ld.lld etc.

Personally, I am forcing to set $LINKER in /usr/bin to my default $LINKER.

- Sedat -

Sedat Dilek

unread,
Mar 25, 2019, 8:12:15 AM3/25/19
to Sylvestre Ledru, Clang-Built-Linux ML
More details in CBL issue #342 "need to set -fuse-ld=lld for clang".

[1] https://github.com/ClangBuiltLinux/linux/issues/342

Sylvestre Ledru

unread,
Mar 25, 2019, 8:56:02 AM3/25/19
to sedat...@gmail.com, Clang-Built-Linux ML
Nope, if you need to use another version than the default compiler,
the right way to do that is to set CC/CXX variables to the right value.


S

Sedat Dilek

unread,
Mar 25, 2019, 11:53:58 AM3/25/19
to Sylvestre Ledru, Clang-Built-Linux ML
Is this a bit clearer?

root@iniza:~# LC_ALL=C ll /usr/bin/lld{,-[0-9]}
ls: cannot access '/usr/bin/lld': No such file or directory
lrwxrwxrwx 1 root root 21 Feb 28 13:50 /usr/bin/lld-7 -> ../lib/llvm-7/bin/lld
lrwxrwxrwx 1 root root 21 Mar 19 21:57 /usr/bin/lld-8 -> ../lib/llvm-8/bin/lld
lrwxrwxrwx 1 root root 35 Mar 21 11:19 /usr/bin/lld-9 ->
/opt/llvm-toolchain-9.0.0/bin/lld-9

root@iniza:~# LC_ALL=C apt-get install lld -t experimental
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
lld
0 upgraded, 1 newly installed, 0 to remove and 594 not upgraded.
Need to get 0 B/7092 B of archives.
After this operation, 21.5 kB of additional disk space will be used.
Selecting previously unselected package lld.
(Reading database ... 545537 files and directories currently installed.)
Preparing to unpack .../lld_1%3a8.0-48~exp1_amd64.deb ...
Unpacking lld (1:8.0-48~exp1) ...
Setting up lld (1:8.0-48~exp1) ...
Processing triggers for man-db (2.8.5-2) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

root@iniza:~# LC_ALL=C ll /usr/bin/lld{,-[0-9]}
lrwxrwxrwx 1 root root 5 Mar 22 11:51 /usr/bin/lld -> lld-8 <--- XXX: NEW
lrwxrwxrwx 1 root root 21 Feb 28 13:50 /usr/bin/lld-7 -> ../lib/llvm-7/bin/lld
lrwxrwxrwx 1 root root 21 Mar 19 21:57 /usr/bin/lld-8 -> ../lib/llvm-8/bin/lld
lrwxrwxrwx 1 root root 35 Mar 21 11:19 /usr/bin/lld-9 ->
/opt/llvm-toolchain-9.0.0/bin/lld-9

- Sedat -

Sylvestre Ledru

unread,
Mar 26, 2019, 1:30:49 AM3/26/19
to sedat...@gmail.com, Clang-Built-Linux ML
Le 22/03/2019 à 10:52, Sedat Dilek a écrit :
> Hi Sylvestre,
>
> I have seen llvm-8 and clang-8 Final are available for Debian/unstable.
Yeah!

> Can you provide also the meta-packages clang and llvm?
> Personally, I do not use them.
Not sure what you mean here. These packages are available and point to 7 in testing/unstable.
I will upload in experimental the change to 8

> Is it too late to have version 8 in Debian/buster?
>
Indeed!

S

Sylvestre Ledru

unread,
Mar 26, 2019, 4:29:17 AM3/26/19
to sedat...@gmail.com, Clang-Built-Linux ML
Le 25/03/2019 à 16:53, Sedat Dilek a écrit :
> On Mon, Mar 25, 2019 at 1:56 PM Sylvestre Ledru <sylv...@debian.org> wrote:
>>
>> Le 25/03/2019 à 11:31, Sedat Dilek a écrit :
>>> On Mon, Mar 25, 2019 at 11:20 AM Sylvestre Ledru <sylv...@debian.org> wrote:
>>>>
>>>>
>>>>
>>>>> That is not what I expect.
>>>>
>>>> I don't know what you are expecting :)
>>>>
>>>> If you have a look here:
>>>>
>>>> https://packages.debian.org/experimental/clang
>>>>
>>>> you will see that it depends on clang-8
>>>>
>>>> which is the goal, right?
>>>>
>>>> S
>>>>
>>>>
>>>
>>> What I call meta-package do IMHO the following...
>>>
>>> If I want to have parallel installation of Version 7 and 8 of clang I
>>> can switch my default clang by installing that meta-package.
>>>
>>> apt-get install clang -t testing
>>>
>>> /usr/bin/clang -> /usr/bin/clang-7
>>>
>>> Correct?
>> Nope, if you need to use another version than the default compiler,
>> the right way to do that is to set CC/CXX variables to the right value.
>>
>>
>
> Is this a bit clearer?
nope, please use words to explain :)

I don't understand what is your issue...

Sylvestre


Sedat Dilek

unread,
Mar 29, 2019, 6:11:19 AM3/29/19
to Sylvestre Ledru, Clang-Built-Linux ML
I want to easily switch my default /usr/bin/clang /usr/bin/llvm
/usr/bin/lld when I have diverse versions of
clang-$VER/llvm-$VER/lld-$VER.

I guess I mixed up llvm-toolchain-$VER with llvm-defaults package when
I want to have clang-8/llvm-8/lld-8 as my default clang/llvm/lld in
/usr/bin.

Status of llvm-defaults for Debian/unstable is (0.47.1) and
llvm-toolchain-7 whereas for Debian/experimental this is (0.48~exp1)
and llvm-toolchain-8.

What are the criteria to have according llvm-defaults providing
clang-8/llvm-8/lld-8 from llvm-toolchain-8 in Debian/unstable?

For the packages llvm-toolchain fom <apt.llvm.org/unstable>I see no
problem to install clang/llvm/lld packages together with
clang-9/llvm-9/lld-9 in the Continous-Integration (Travis-CI) setup.

- Sedat -







[1] https://metadata.ftp-master.debian.org/changelogs//main/l/llvm-defaults/llvm-defaults_0.48~exp1_changelog
Reply all
Reply to author
Forward
0 new messages