libX11 and clang: compile error

Oliver Pinter oliver.pntr at gmail.com
Sun May 27 14:55:02 UTC 2012


On 5/27/12, Niclas Zeising <zeising at daemonic.se> wrote:
> On 2012-05-26 21:06, Oliver Pinter wrote:
>> On 5/26/12, Mel Flynn <rflynn at acsalaska.net> wrote:
>>> On 26-5-2012 20:40, Oliver Pinter wrote:
>>>> On 5/26/12, Mel Flynn <rflynn at acsalaska.net> wrote:
>>>>> On 26-5-2012 19:17, Oliver Pinter wrote:
>>>>>> I think src.conf is relevant, while it changes the system behavior,
>>>>>> as
>>>>>> changed the default cc from gcc-4.2 to clang.
>>>>>
>>>>> Thinking it doesn't make it so. Run:
>>>>> grep _WITHOUT_SRCCONF /usr/share/mk/*.mk
>>>>>
>>>>> Then investigate.
>>>>> Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
>>>>> Really. It does not.
>>>>> The file that can do that is /etc/make.conf.
>>>>> Another way is setting CC in your environment variables, through
>>>>> /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what
>>>>> not.
>>>>>
>>>>> In order to debug your issue, you should provide the output of what
>>>>> make
>>>>> thinks CC and CPP are and backtrack where they are set.
>>>>> Start with:
>>>>> make -C /usr/ports/x11/libX11 -V CC -V CPP
>>>>> --
>>>>> Mel
>>>>>
>>>>
>>>> After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and
>>>> c++ has changed:
>>>
>>> See ports/166373.
>>>
>>> Also, the fact that your /usr/bin/cpp == clang-cpp is relevant!
>>> Especially if you report:
>>>> Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...
>>>
>>> --
>>> Mel
>>>
>>
>> this is a workaround, see the attached file
>
> This is a known issue and is being looked into.  The issue is that clang
> cpp and gcc cpp behaves differently wrt. -traditional.
> We will try to find a general approach that works for all xorg ports
> that use cpp -traditional, probably regardless of the regular compiler
> used.
>
> Regards!
> --
> Niclas Zeising
>

Hi!

Attached a patch - the idea mostly based on ports/166373, but extended
with runtime compiler checking.

With this patch the xorg related ports building fine.


More information about the freebsd-x11 mailing list