Re: LLVM compile failing in seawasp

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, didier <did447(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, buildfarm(at)coelho(dot)net
Subject: Re: LLVM compile failing in seawasp
Date: 2019-07-28 07:47:17
Message-ID: alpine.DEB.2.21.1907280935520.1292@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Thomas,

>> I would just #undef Min for our small number of .cpp files that
>> include LLVM headers. It's not as though you need it in C++, which
>> has std::min() from <algorithm>.
>
> Like so. Fixes the problem for me (llvm-devel-9.0.d20190712).

Hmmm. Not so nice, but if it works, why not, at least the impact is
much smaller than renaming.

Note that the Min macro is used in several pg headers (ginblock.h,
ginxlog.h, hash.h, simplehash.h, spgist_private.h), so you might really
need it depending on what is being done later.

Otherwise, why not simply move llvm C++ includes *before* postgres
includes? They should be fully independent anyway, so the order should
not matter?

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-07-28 10:15:20 Re: ANALYZE: ERROR: tuple already updated by self
Previous Message Michael Paquier 2019-07-28 07:28:13 Re: Add parallelism and glibc dependent only options to reindexdb