[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X
From: |
Programmingkid |
Subject: |
Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X |
Date: |
Tue, 19 Jan 2016 18:49:30 -0500 |
On Jan 18, 2016, at 8:23 PM, Programmingkid wrote:
>
> On Jan 18, 2016, at 5:09 PM, Peter Maydell wrote:
>
>> On 18 January 2016 at 21:09, Programmingkid <address@hidden> wrote:
>>>
>>> On Jan 18, 2016, at 3:49 PM, Peter Maydell wrote:
>>>> Can you say what 'gcc --version' prints for you? That will
>>>> tell us the clang version number, which is more interesting
>>>> than what clang claims its gcc-compatibility is.
>>>
>>> $ gcc-4.9 --version
>>> gcc-4.9 (Homebrew gcc49 4.9.2_1) 4.9.2
>>> Copyright (C) 2014 Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions. There is NO
>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>> Ah, I misread your earlier message and I thought you said that
>> gcc-4.9 worked ok and it was plain 'gcc' that caused the warning.
>> Is that expansion of the macro the one produced by gcc-4.9, then?
>
> Actually it should have but wasn't. It is of gcc 4.2.1.
>
> Here is gcc 4.9.2's output:
>
> char control[(((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(struct
> cmsghdr)) + (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)) +
> ((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(int) * 16) +
> (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)))] = { 0 };
>
> This is gcc 4.2.1's output:
>
> char control[(((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(struct
> cmsghdr)) + (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)) +
> ((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(int) * 16) +
> (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)))] = { 0 };
>
> They appear to be identical.
>
>>
>> Also, you're right that we should figure out why it seems to
>> be using the wrong C compiler. Can you use 'V=1' to look at
>> what command line make is using to compile this file, please?
>> (you'll probably want to dump the whole make output to a file
>> and then search through it).
>
> It says gcc-4.9 for the compiler. I wonder if the wrong header file is being
> used somewhere.
>
>> Also:
>> * what does your config-host.mak say (in particular about what
>> it's set CC, HOST_CC, CXX, etc to)?
>
> CC=gcc-4.9
> HOST_CC=cc
> CXX=gcc-4.9
> CPP=gcc-4.9 -E
> OBJCC=gcc-4.9
>
>> * can you check your environment doesn't have CC set to anything?
>> ("env | grep CC" should tell you if it is)
>
> Nothing is returned.
printf("GCC version = %d.%d.%d\n", __GNUC__, __GNUC_MINOR__,
__GNUC_PATCHLEVEL__);
I thought I should add that with this code in the
qio_channel_socket_register_types() function of channel-socket.c, this was
printed: GCC version = 4.9.2
It looks like my theory of another version of GCC being used for compiling the
channel-socket.c file isn't correct.
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, (continued)
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, Paolo Bonzini, 2016/01/17
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, Programmingkid, 2016/01/17
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, Programmingkid, 2016/01/18
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, Peter Maydell, 2016/01/18
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, Programmingkid, 2016/01/18
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, Peter Maydell, 2016/01/18
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, Programmingkid, 2016/01/18
- Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X,
Programmingkid <=
Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X, Daniel P. Berrange, 2016/01/18