From: | Sergei Trofimovich <slyfox@g.o> | ||
---|---|---|---|
To: | gentoo-dev@l.g.o | ||
Subject: | Re: [gentoo-dev] net-misc/asterisk fails to compile: clang/LLVM: bug 731280 | ||
Date: | Fri, 28 Aug 2020 18:38:37 | ||
Message-Id: | 20200828193815.3b2695d8@sf | ||
In Reply to: | Re: [gentoo-dev] net-misc/asterisk fails to compile: clang/LLVM: bug 731280 by Fabian Groffen |
1 | On Fri, 28 Aug 2020 10:10:02 +0200 |
2 | Fabian Groffen <grobian@g.o> wrote: |
3 | |
4 | > On 28-08-2020 08:52:09 +0100, Sergei Trofimovich wrote: |
5 | > > On Fri, 28 Aug 2020 07:37:54 +0100 |
6 | > > Sergei Trofimovich <slyfox@g.o> wrote: |
7 | > > |
8 | > > > On Fri, 28 Aug 2020 08:15:47 +0200 |
9 | > > > Jaco Kroon <jaco@××××××.za> wrote: |
10 | > > > |
11 | > > > > Hi All, |
12 | > > > > |
13 | > > > > https://bugs.gentoo.org/731280 |
14 | > > > > |
15 | > > > > Summary: |
16 | > > > > |
17 | > > > > This machine uses a clang/LLVM toolchain. |
18 | > > > > Asterisk fails to compile, ./configure fails with: |
19 | > > > > |
20 | > > > > checking for RAII support... checking for clang -fblocks... |
21 | > > > > configure: error: BlocksRuntime is required for clang, please install |
22 | > > > > libblocksruntime |
23 | > > > > |
24 | > > > > I suspect this explains the issue: |
25 | > > > > |
26 | > > > > https://github.com/mackyle/blocksruntime |
27 | > > > > |
28 | > > > > I have no idea how to actually solve this. |
29 | > > > |
30 | > > > honggfuzz also needs it as it happens to use -fblocks on clang: |
31 | > > > https://bugs.gentoo.org/729256 |
32 | > > > |
33 | > > > We need to package the library. I can give it a try. |
34 | > > |
35 | > > Packaged library as sys-libs/blocksruntime: |
36 | > > https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae376c73ef197d6c7aa619e821c436ccab0cd77e |
37 | > > |
38 | > > Usage example for app-forensics/honggfuzz: |
39 | > > https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd841336dfdefbc14907e2d9b1eb1a1a3f5f8b8e |
40 | > |
41 | > This is cool, but shouldn't it be something like openmp? (e.g. blocks) |
42 | |
43 | You mean when -fopenmp is present in LDFLAGS compiler itself pulls in runtime? |
44 | That would be ideal. But currently clang does not install blocks runtime. |
45 | |
46 | > There is no reason blocks have to be used if not on macOS (where system |
47 | > headers use blocks features). |
48 | |
49 | Sure. As with most extensions it can be avoided. Alas some projects use it |
50 | is for convenience. At least honggfuzz uses blocks with __attribute__(cleanup) |
51 | to emulate lexical scope destructors: |
52 | https://github.com/google/honggfuzz/blob/03bbc2de983f13cfcd880f72e3a56582c4f82f24/libhfcommon/util.h#L57 |
53 | |
54 | -- |
55 | |
56 | Sergei |