Re: Clang support

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clang support
Date: 2013-11-19 22:11:13
Message-ID: CAFjNrYsxHfA4t7D5LdCdmcFqYvbgTiwzTMqkJJnP-WA=ppShjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19 November 2013 23:02, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:

> On 19 November 2013 22:54, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
>
>> Szymon Guz <mabewlun(at)gmail(dot)com> wrote:
>>
>> > is clang supported for compiling Postgres? I found some websites
>> > with information that some people compiled Postgres succesfully,
>> > but I got plenty of errors even with running ./configure. So I'm
>> > wondering if it's my fault, however gcc works properly.
>>
>> I am able to build with this version of clang:
>>
>> Ubuntu clang version 3.4-1~exp1 (trunk) (based on LLVM 3.4)
>> Target: x86_64-pc-linux-gnu
>> Thread model: posix
>>
>> All I do is `export CC=clang` before running ./configure and make.
>>
>> I was getting three benign warnings which didn't show up for gcc,
>> and recently committed changes to quiet those.
>>
>>
>>
> Hi Kevin,
> thanks for the answer.
>
> I still get about twenty errors like:
>
> checking zlib.h usability... no
> checking zlib.h presence... yes
> configure: WARNING: zlib.h: present but cannot be compiled
> configure: WARNING: zlib.h: check for missing prerequisite headers?
> configure: WARNING: zlib.h: see the Autoconf documentation
> configure: WARNING: zlib.h: section "Present But Cannot Be Compiled"
> configure: WARNING: zlib.h: proceeding with the preprocessor's result
> configure: WARNING: zlib.h: in the future, the compiler will take
> precedence
> configure: WARNING: ## ---------------------------------------- ##
> configure: WARNING: ## Report this to pgsql-bugs(at)postgresql(dot)org ##
> configure: WARNING: ## ---------------------------------------- ##
>
> But it seems that I'm using older clang:
> Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM
> 3.2)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
>
> So maybe that's the problem, I will update clang and try once again.
>
>
Yep, that's the problem. After updating to clang 3.4, there were no errors
in configuring and compilation runs properly so far.

thanks,
Szymon

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-11-19 22:16:56 Re: better atomics - v0.2
Previous Message Bruce Momjian 2013-11-19 22:02:23 Re: Changing pg_dump default file format