qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X
@ 2016-03-30 16:35 Programmingkid
  2016-03-30 16:38 ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Programmingkid @ 2016-03-30 16:35 UTC (permalink / raw)
  To: qemu-devel qemu-devel; +Cc: Paolo Bonzini, Peter Maydell

Remove macro that prevents event_notifier_init_fd() function from being compiled on Mac OS X.

This patch fixes this error:

Undefined symbols for architecture x86_64:
  "_event_notifier_init_fd", referenced from:
      _process_msg in ivshmem.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-ppc] Error 1
make: *** [subdir-ppc-softmmu] Error 2


Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
 util/event_notifier-posix.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c
index e150301..11cef87 100644
--- a/util/event_notifier-posix.c
+++ b/util/event_notifier-posix.c
@@ -21,7 +21,6 @@
 #include <sys/eventfd.h>
 #endif
 
-#ifdef CONFIG_EVENTFD
 /*
  * Initialize @e with existing file descriptor @fd.
  * @fd must be a genuine eventfd object, emulation with pipe won't do.
@@ -31,7 +30,6 @@ void event_notifier_init_fd(EventNotifier *e, int fd)
     e->rfd = fd;
     e->wfd = fd;
 }
-#endif
 
 int event_notifier_init(EventNotifier *e, int active)
 {
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X
  2016-03-30 16:35 [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X Programmingkid
@ 2016-03-30 16:38 ` Paolo Bonzini
  2016-04-08 11:25   ` Markus Armbruster
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2016-03-30 16:38 UTC (permalink / raw)
  To: Programmingkid, qemu-devel qemu-devel; +Cc: Peter Maydell, Markus Armbruster



On 30/03/2016 18:35, Programmingkid wrote:
> Remove macro that prevents event_notifier_init_fd() function from being compiled on Mac OS X.
> 
> This patch fixes this error:
> 
> Undefined symbols for architecture x86_64:
>   "_event_notifier_init_fd", referenced from:
>       _process_msg in ivshmem.o
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> make[1]: *** [qemu-system-ppc] Error 1
> make: *** [subdir-ppc-softmmu] Error 2
> 
> 
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>

This is intentional, this feature of ivshmem.o could never work on OS X.
 I am not sure that failing the build is intentional.  Markus, any clue?

Paolo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X
  2016-03-30 16:38 ` Paolo Bonzini
@ 2016-04-08 11:25   ` Markus Armbruster
  2016-04-14 18:24     ` Programmingkid
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Armbruster @ 2016-04-08 11:25 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Programmingkid, qemu-devel qemu-devel, Peter Maydell

[Wasn't delivered correctly by eggs.gnu.org, resending]

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 30/03/2016 18:35, Programmingkid wrote:
>> Remove macro that prevents event_notifier_init_fd() function from being compiled on Mac OS X.
>> 
>> This patch fixes this error:
>> 
>> Undefined symbols for architecture x86_64:
>>   "_event_notifier_init_fd", referenced from:
>>       _process_msg in ivshmem.o
>> ld: symbol(s) not found for architecture x86_64
>> collect2: error: ld returned 1 exit status
>> make[1]: *** [qemu-system-ppc] Error 1
>> make: *** [subdir-ppc-softmmu] Error 2
>> 
>> 
>> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>
> This is intentional, this feature of ivshmem.o could never work on OS X.
>  I am not sure that failing the build is intentional.  Markus, any clue?

ivshmem.o should only be linked when CONFIG_EVENTFD is set.  pci.mak has

    CONFIG_IVSHMEM=$(CONFIG_EVENTFD)

The compile error shown above indicates CONFIG_EVENTFD=y for make (since
ivshmem.o gets linked), but !defined(CONFIG_EVENTFD) for C (or else
event_notifier_init_fd() would exist).  Your build tree is messed up, or
the makefiles are broken.  Try starting over with a fresh build tree.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X
  2016-04-08 11:25   ` Markus Armbruster
@ 2016-04-14 18:24     ` Programmingkid
  2016-04-14 18:39       ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Programmingkid @ 2016-04-14 18:24 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: Paolo Bonzini, qemu-devel qemu-devel, Peter Maydell


On Apr 8, 2016, at 7:25 AM, Markus Armbruster wrote:

> [Wasn't delivered correctly by eggs.gnu.org, resending]
> 
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> On 30/03/2016 18:35, Programmingkid wrote:
>>> Remove macro that prevents event_notifier_init_fd() function from being compiled on Mac OS X.
>>> 
>>> This patch fixes this error:
>>> 
>>> Undefined symbols for architecture x86_64:
>>>  "_event_notifier_init_fd", referenced from:
>>>      _process_msg in ivshmem.o
>>> ld: symbol(s) not found for architecture x86_64
>>> collect2: error: ld returned 1 exit status
>>> make[1]: *** [qemu-system-ppc] Error 1
>>> make: *** [subdir-ppc-softmmu] Error 2
>>> 
>>> 
>>> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>> 
>> This is intentional, this feature of ivshmem.o could never work on OS X.
>> I am not sure that failing the build is intentional.  Markus, any clue?
> 
> ivshmem.o should only be linked when CONFIG_EVENTFD is set.  pci.mak has
> 
>    CONFIG_IVSHMEM=$(CONFIG_EVENTFD)
> 
> The compile error shown above indicates CONFIG_EVENTFD=y for make (since
> ivshmem.o gets linked), but !defined(CONFIG_EVENTFD) for C (or else
> event_notifier_init_fd() would exist).  Your build tree is messed up, or
> the makefiles are broken.  Try starting over with a fresh build tree.

I did a fresh clone of the QEMU repository. Then tried building QEMU. This is
the error I saw:

  CC    contrib/ivshmem-client/ivshmem-client.o
  CC    contrib/ivshmem-client/main.o
  LINK  ivshmem-client
collect2: error: ld terminated with signal 11 [Segmentation fault]
make: *** [ivshmem-client] Error 1
make: *** Deleting file `ivshmem-client'

It is different from the last error, but it still involves something called ivshmem.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X
  2016-04-14 18:24     ` Programmingkid
@ 2016-04-14 18:39       ` Peter Maydell
  2016-04-14 18:47         ` Programmingkid
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2016-04-14 18:39 UTC (permalink / raw)
  To: Programmingkid; +Cc: Markus Armbruster, Paolo Bonzini, qemu-devel qemu-devel

On 14 April 2016 at 19:24, Programmingkid <programmingkidx@gmail.com> wrote:
> I did a fresh clone of the QEMU repository. Then tried building QEMU. This is
> the error I saw:
>
>   CC    contrib/ivshmem-client/ivshmem-client.o
>   CC    contrib/ivshmem-client/main.o
>   LINK  ivshmem-client
> collect2: error: ld terminated with signal 11 [Segmentation fault]
> make: *** [ivshmem-client] Error 1
> make: *** Deleting file `ivshmem-client'
>
> It is different from the last error, but it still involves something called ivshmem.

If ld is segfaulting then either:
 * your hardware is bad (dodgy memory is infamous for causing random segvs)
 * your toolchain is buggy (the linker should never segv regardless of input)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X
  2016-04-14 18:39       ` Peter Maydell
@ 2016-04-14 18:47         ` Programmingkid
  2016-04-14 18:58           ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Programmingkid @ 2016-04-14 18:47 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Markus Armbruster, Paolo Bonzini, qemu-devel qemu-devel


On Apr 14, 2016, at 2:39 PM, Peter Maydell wrote:

> On 14 April 2016 at 19:24, Programmingkid <programmingkidx@gmail.com> wrote:
>> I did a fresh clone of the QEMU repository. Then tried building QEMU. This is
>> the error I saw:
>> 
>>  CC    contrib/ivshmem-client/ivshmem-client.o
>>  CC    contrib/ivshmem-client/main.o
>>  LINK  ivshmem-client
>> collect2: error: ld terminated with signal 11 [Segmentation fault]
>> make: *** [ivshmem-client] Error 1
>> make: *** Deleting file `ivshmem-client'
>> 
>> It is different from the last error, but it still involves something called ivshmem.
> 
> If ld is segfaulting then either:
> * your hardware is bad (dodgy memory is infamous for causing random segvs)
> * your toolchain is buggy (the linker should never segv regardless of input)


Maybe I should try to update my ld command.

Are you able to build QEMU on Mac OS X using the most recent commit?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X
  2016-04-14 18:47         ` Programmingkid
@ 2016-04-14 18:58           ` Peter Maydell
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2016-04-14 18:58 UTC (permalink / raw)
  To: Programmingkid; +Cc: Markus Armbruster, Paolo Bonzini, qemu-devel qemu-devel

On 14 April 2016 at 19:47, Programmingkid <programmingkidx@gmail.com> wrote:
>
> On Apr 14, 2016, at 2:39 PM, Peter Maydell wrote:
>
>> On 14 April 2016 at 19:24, Programmingkid <programmingkidx@gmail.com> wrote:
>>> I did a fresh clone of the QEMU repository. Then tried building QEMU. This is
>>> the error I saw:
>>>
>>>  CC    contrib/ivshmem-client/ivshmem-client.o
>>>  CC    contrib/ivshmem-client/main.o
>>>  LINK  ivshmem-client
>>> collect2: error: ld terminated with signal 11 [Segmentation fault]
>>> make: *** [ivshmem-client] Error 1
>>> make: *** Deleting file `ivshmem-client'
>>>
>>> It is different from the last error, but it still involves something called ivshmem.
>>
>> If ld is segfaulting then either:
>> * your hardware is bad (dodgy memory is infamous for causing random segvs)
>> * your toolchain is buggy (the linker should never segv regardless of input)

> Maybe I should try to update my ld command.
>
> Are you able to build QEMU on Mac OS X using the most recent commit?

Yes. I test build every merge on OSX before pushing it to master.
In my config ivshmem-client is built, links ok and I've just tested
and it runs (at least enough to print out a usage message).

thanks
-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-14 18:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-30 16:35 [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X Programmingkid
2016-03-30 16:38 ` Paolo Bonzini
2016-04-08 11:25   ` Markus Armbruster
2016-04-14 18:24     ` Programmingkid
2016-04-14 18:39       ` Peter Maydell
2016-04-14 18:47         ` Programmingkid
2016-04-14 18:58           ` Peter Maydell

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).