qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Programmingkid <programmingkidx@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Eric Blake <eblake@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X
Date: Tue, 19 Jan 2016 18:49:30 -0500	[thread overview]
Message-ID: <DA992E3A-04E6-4178-ACAC-126FB2DBAA80@gmail.com> (raw)
In-Reply-To: <1457E61C-5578-4825-9524-B695E96FDDB8@gmail.com>


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 <programmingkidx@gmail.com> 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. 

  reply	other threads:[~2016-01-19 23:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17 22:23 [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X Programmingkid
2016-01-17 23:22 ` Paolo Bonzini
2016-01-17 23:45   ` Programmingkid
2016-01-18 17:45     ` Eric Blake
2016-01-18 17:59       ` Peter Maydell
2016-01-18 19:46         ` Programmingkid
2016-01-18 19:50       ` Programmingkid
2016-01-18 20:49         ` Peter Maydell
2016-01-18 21:09           ` Programmingkid
2016-01-18 22:09             ` Peter Maydell
2016-01-19  1:23               ` Programmingkid
2016-01-19 23:49                 ` Programmingkid [this message]
2016-01-18  9:58 ` Daniel P. Berrange
2016-01-18 14:36   ` Programmingkid
2016-01-19 14:06     ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DA992E3A-04E6-4178-ACAC-126FB2DBAA80@gmail.com \
    --to=programmingkidx@gmail.com \
    --cc=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).