On Fri, 28 Aug 2020 10:10:02 +0200 Fabian Groffen <grob...@gentoo.org> wrote:
> On 28-08-2020 08:52:09 +0100, Sergei Trofimovich wrote: > > On Fri, 28 Aug 2020 07:37:54 +0100 > > Sergei Trofimovich <sly...@gentoo.org> wrote: > > > > > On Fri, 28 Aug 2020 08:15:47 +0200 > > > Jaco Kroon <j...@uls.co.za> wrote: > > > > > > > Hi All, > > > > > > > > https://bugs.gentoo.org/731280 > > > > > > > > Summary: > > > > > > > > This machine uses a clang/LLVM toolchain. > > > > Asterisk fails to compile, ./configure fails with: > > > > > > > > checking for RAII support... checking for clang -fblocks... > > > > configure: error: BlocksRuntime is required for clang, please install > > > > libblocksruntime > > > > > > > > I suspect this explains the issue: > > > > > > > > https://github.com/mackyle/blocksruntime > > > > > > > > I have no idea how to actually solve this. > > > > > > honggfuzz also needs it as it happens to use -fblocks on clang: > > > https://bugs.gentoo.org/729256 > > > > > > We need to package the library. I can give it a try. > > > > Packaged library as sys-libs/blocksruntime: > > > > https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae376c73ef197d6c7aa619e821c436ccab0cd77e > > > > Usage example for app-forensics/honggfuzz: > > > > https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd841336dfdefbc14907e2d9b1eb1a1a3f5f8b8e > > > > This is cool, but shouldn't it be something like openmp? (e.g. blocks) You mean when -fopenmp is present in LDFLAGS compiler itself pulls in runtime? That would be ideal. But currently clang does not install blocks runtime. > There is no reason blocks have to be used if not on macOS (where system > headers use blocks features). Sure. As with most extensions it can be avoided. Alas some projects use it is for convenience. At least honggfuzz uses blocks with __attribute__(cleanup) to emulate lexical scope destructors: https://github.com/google/honggfuzz/blob/03bbc2de983f13cfcd880f72e3a56582c4f82f24/libhfcommon/util.h#L57 -- Sergei