Re: LLVM compile failing in seawasp

From: didier <did447(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, buildfarm(at)coelho(dot)net
Subject: Re: LLVM compile failing in seawasp
Date: 2019-06-06 17:57:05
Message-ID: CAJRYxuLbtcN+D+KrD6wui-rhXoo7XOungCB5vAech=R90LOTuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

c.h defines a C Min macro conflicting with llvm new class
llvm:ElementCount Min member

On Thu, Jun 6, 2019 at 7:32 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> Seawasp (using experimental clang 9.0) has been complaining of late:
>
> /home/fabien/clgtk/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE -I/home/fabien/clgtk/include -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -flto=thin -emit-llvm -c -o llvmjit_types.bc llvmjit_types.c
> In file included from /home/fabien/clgtk/include/llvm/ADT/DenseMapInfo.h:20:0,
> from /home/fabien/clgtk/include/llvm/ADT/DenseMap.h:16,
> from /home/fabien/clgtk/include/llvm/ADT/DenseSet.h:16,
> from /home/fabien/clgtk/include/llvm/ADT/SetVector.h:23,
> from llvmjit_inline.cpp:45:
> /home/fabien/clgtk/include/llvm/Support/ScalableSize.h:27:12: error: macro "Min" requires 2 arguments, but only 1 given
> : Min(Min), Scalable(Scalable) {}
> ^
> In file included from /home/fabien/clgtk/include/llvm/ADT/DenseMapInfo.h:20:0,
> from /home/fabien/clgtk/include/llvm/ADT/DenseMap.h:16,
> from /home/fabien/clgtk/include/llvm/ADT/DenseSet.h:16,
> from /home/fabien/clgtk/include/llvm/ADT/SetVector.h:23,
> from llvmjit_inline.cpp:45:
> /home/fabien/clgtk/include/llvm/Support/ScalableSize.h: In constructor \xe2\x80\x98llvm::ElementCount::ElementCount(unsigned int, bool)\xe2\x80\x99:
> /home/fabien/clgtk/include/llvm/Support/ScalableSize.h:27:13: error: expected \xe2\x80\x98(\xe2\x80\x99 before \xe2\x80\x98,\xe2\x80\x99 token
> : Min(Min), Scalable(Scalable) {}
> ^
> <builtin>: recipe for target 'llvmjit_inline.o' failed
>
> This was working earlier, and as far as I can tell the cpluspluscheck
> fixes are not the cause (because those happened earlier than the first
> failure). Apparently clang got upgraded from "trunk 361691" to "trunk
> 362290" ... is the new clang broken?
>
> --
> Álvaro Herrera 39°50'S 73°21'W
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2019-06-06 18:22:07 Re: [HACKERS] [PATCH] Generic type subscripting
Previous Message Tom Lane 2019-06-06 17:44:54 Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)