qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] posix-aio-compat error in 5996
@ 2008-12-17 17:36 Lev Lvovsky
  0 siblings, 0 replies; 7+ messages in thread
From: Lev Lvovsky @ 2008-12-17 17:36 UTC (permalink / raw)
  To: qemu-devel

On OSX 10.5, I get the following error when compiling with revision  
5996 and higher (5995 compiles).

As referenced in the initial RFC (http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00204.html 
), BSD's may not need this - is there any way to avoid using this  
based on OS, or is there something I'm missing in the configure options?

thanks,
-lev

---
posix-aio-compat.c: In function 'aio_thread':
posix-aio-compat.c:102: warning: implicit declaration of function  
'sigqueue'
gcc -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite- 
strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls - 
mdynamic-no-pic -m32 -I. -I/Users/lev/src/trunk -MMD -MP -MT block-raw- 
posix.o -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/ 
Users/lev/src/trunk/slirp -c -o block-raw-posix.o block-raw-posix.c
gcc -g -framework CoreFoundation -framework IOKit -m32 -pthread -o  
qemu-img qemu-img.o qemu-tool.o osdep.o cutils.o qemu-malloc.o block- 
cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o block- 
bochs.o block-vpc.o block-vvfat.o block-qcow2.o block-parallels.o  
block-nbd.o nbd.o block.o aio.o posix-aio-compat.o block-raw-posix.o - 
lz  -lpthread
Undefined symbols:
   "_sigqueue", referenced from:
       _aio_thread in posix-aio-compat.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
---

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

* [Qemu-devel] posix-aio-compat error in 5996
@ 2008-12-18  0:16 Lev Lvovsky
  2008-12-18  1:36 ` Anthony Liguori
  2008-12-18  2:29 ` M. Warner Losh
  0 siblings, 2 replies; 7+ messages in thread
From: Lev Lvovsky @ 2008-12-18  0:16 UTC (permalink / raw)
  To: qemu-devel

On OSX 10.5, I get the following error when compiling with revision  
5996 and higher (5995 compiles).

As referenced in the initial RFC (http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00204.html 
), BSD's may not need this - is there any way to avoid using this  
based on OS, or is there something I'm missing in the configure options?

thanks,
-lev

---
posix-aio-compat.c: In function 'aio_thread':
posix-aio-compat.c:102: warning: implicit declaration of function  
'sigqueue'
gcc -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite- 
strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls - 
mdynamic-no-pic -m32 -I. -I/Users/lev/src/trunk -MMD -MP -MT block-raw- 
posix.o -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/ 
Users/lev/src/trunk/slirp -c -o block-raw-posix.o block-raw-posix.c
gcc -g -framework CoreFoundation -framework IOKit -m32 -pthread -o  
qemu-img qemu-img.o qemu-tool.o osdep.o cutils.o qemu-malloc.o block- 
cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o block- 
bochs.o block-vpc.o block-vvfat.o block-qcow2.o block-parallels.o  
block-nbd.o nbd.o block.o aio.o posix-aio-compat.o block-raw-posix.o - 
lz  -lpthread
Undefined symbols:
  "_sigqueue", referenced from:
      _aio_thread in posix-aio-compat.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
---

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

* Re: [Qemu-devel] posix-aio-compat error in 5996
  2008-12-18  0:16 [Qemu-devel] posix-aio-compat error in 5996 Lev Lvovsky
@ 2008-12-18  1:36 ` Anthony Liguori
  2008-12-18 17:17   ` Lev Lvovsky
  2008-12-18  2:29 ` M. Warner Losh
  1 sibling, 1 reply; 7+ messages in thread
From: Anthony Liguori @ 2008-12-18  1:36 UTC (permalink / raw)
  To: qemu-devel

Lev Lvovsky wrote:
> On OSX 10.5, I get the following error when compiling with revision 
> 5996 and higher (5995 compiles).
>
> As referenced in the initial RFC 
> (http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00204.html), 
> BSD's may not need this - is there any way to avoid using this based 
> on OS, or is there something I'm missing in the configure options?

Have I mentioned that I strongly dislike OS X?

sigqueue is posix, does anyone know of the alternative function to use 
for OS X?  I guess we could use kill.

Regards,

Anthony Liguori

> thanks,
> -lev
>
> ---
> posix-aio-compat.c: In function 'aio_thread':
> posix-aio-compat.c:102: warning: implicit declaration of function 
> 'sigqueue'
> gcc -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels 
> -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes 
> -Wredundant-decls -mdynamic-no-pic -m32 -I. -I/Users/lev/src/trunk 
> -MMD -MP -MT block-raw-posix.o -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
> -D_LARGEFILE_SOURCE -I/Users/lev/src/trunk/slirp -c -o 
> block-raw-posix.o block-raw-posix.c
> gcc -g -framework CoreFoundation -framework IOKit -m32 -pthread -o 
> qemu-img qemu-img.o qemu-tool.o osdep.o cutils.o qemu-malloc.o 
> block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o 
> block-bochs.o block-vpc.o block-vvfat.o block-qcow2.o 
> block-parallels.o block-nbd.o nbd.o block.o aio.o posix-aio-compat.o 
> block-raw-posix.o -lz  -lpthread
> Undefined symbols:
>  "_sigqueue", referenced from:
>      _aio_thread in posix-aio-compat.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [qemu-img] Error 1
> ---
>
>
>
>
>
   

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

* Re: [Qemu-devel] posix-aio-compat error in 5996
  2008-12-18  0:16 [Qemu-devel] posix-aio-compat error in 5996 Lev Lvovsky
  2008-12-18  1:36 ` Anthony Liguori
@ 2008-12-18  2:29 ` M. Warner Losh
  1 sibling, 0 replies; 7+ messages in thread
From: M. Warner Losh @ 2008-12-18  2:29 UTC (permalink / raw)
  To: qemu-devel, lists2

In message: <F1DC1BB0-F28D-430E-8D67-863B5F2671BC@sonous.com>
            Lev Lvovsky <lists2@sonous.com> writes:
: On OSX 10.5, I get the following error when compiling with revision  
: 5996 and higher (5995 compiles).
: 
: As referenced in the initial RFC (http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00204.html 
: ), BSD's may not need this - is there any way to avoid using this  
: based on OS, or is there something I'm missing in the configure options?
: 
: thanks,
: -lev
: 
: ---
: posix-aio-compat.c: In function 'aio_thread':
: posix-aio-compat.c:102: warning: implicit declaration of function  
: 'sigqueue'
: gcc -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite- 
: strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls - 
: mdynamic-no-pic -m32 -I. -I/Users/lev/src/trunk -MMD -MP -MT block-raw- 
: posix.o -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/ 
: Users/lev/src/trunk/slirp -c -o block-raw-posix.o block-raw-posix.c
: gcc -g -framework CoreFoundation -framework IOKit -m32 -pthread -o  
: qemu-img qemu-img.o qemu-tool.o osdep.o cutils.o qemu-malloc.o block- 
: cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o block- 
: bochs.o block-vpc.o block-vvfat.o block-qcow2.o block-parallels.o  
: block-nbd.o nbd.o block.o aio.o posix-aio-compat.o block-raw-posix.o - 
: lz  -lpthread
: Undefined symbols:
:   "_sigqueue", referenced from:
:       _aio_thread in posix-aio-compat.o
: ld: symbol(s) not found
: collect2: ld returned 1 exit status
: make: *** [qemu-img] Error 1

FreeBSD has sigqueue.

Warner

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

* Re: [Qemu-devel] posix-aio-compat error in 5996
  2008-12-18  1:36 ` Anthony Liguori
@ 2008-12-18 17:17   ` Lev Lvovsky
  2008-12-18 17:24     ` Anthony Liguori
  0 siblings, 1 reply; 7+ messages in thread
From: Lev Lvovsky @ 2008-12-18 17:17 UTC (permalink / raw)
  To: qemu-devel, Anthony Liguori

Anthony,

On Dec 17, 2008, at 5:36 PM, Anthony Liguori wrote:

> Lev Lvovsky wrote:
>> On OSX 10.5, I get the following error when compiling with revision  
>> 5996 and higher (5995 compiles).
>>
>> As referenced in the initial RFC (http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00204.html 
>> ), BSD's may not need this - is there any way to avoid using this  
>> based on OS, or is there something I'm missing in the configure  
>> options?
>
> Have I mentioned that I strongly dislike OS X?
>
> sigqueue is posix, does anyone know of the alternative function to  
> use for OS X?  I guess we could use kill.

as I wrote to M. Losh, I should have checked the patch in the original  
RFC, which clearly had a conditional in the makefile for CONFIG_AIO.   
Running configure with --disable-aio compiled.

thanks!
-lev

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

* Re: [Qemu-devel] posix-aio-compat error in 5996
  2008-12-18 17:17   ` Lev Lvovsky
@ 2008-12-18 17:24     ` Anthony Liguori
  2008-12-18 21:24       ` Juergen Lock
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony Liguori @ 2008-12-18 17:24 UTC (permalink / raw)
  To: Lev Lvovsky; +Cc: qemu-devel

Lev Lvovsky wrote:
> Anthony,
>
> On Dec 17, 2008, at 5:36 PM, Anthony Liguori wrote:
>
>> Lev Lvovsky wrote:
>>> On OSX 10.5, I get the following error when compiling with revision 
>>> 5996 and higher (5995 compiles).
>>>
>>> As referenced in the initial RFC 
>>> (http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00204.html), 
>>> BSD's may not need this - is there any way to avoid using this based 
>>> on OS, or is there something I'm missing in the configure options?
>>
>> Have I mentioned that I strongly dislike OS X?
>>
>> sigqueue is posix, does anyone know of the alternative function to 
>> use for OS X?  I guess we could use kill.
>
> as I wrote to M. Losh, I should have checked the patch in the original 
> RFC, which clearly had a conditional in the makefile for CONFIG_AIO.  
> Running configure with --disable-aio compiled.

I still would like it to work for OS X.  If someone can write up a patch 
replacing sigqueue with the appropriate OS X function, I'd happily apply it.

Regards,

Anthony Liguori

> thanks!
> -lev
>

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

* Re: [Qemu-devel] posix-aio-compat error in 5996
  2008-12-18 17:24     ` Anthony Liguori
@ 2008-12-18 21:24       ` Juergen Lock
  0 siblings, 0 replies; 7+ messages in thread
From: Juergen Lock @ 2008-12-18 21:24 UTC (permalink / raw)
  To: anthony; +Cc: Lev Lvovsky, qemu-devel

In article <494A8740.4030504@codemonkey.ws> you write:
>Lev Lvovsky wrote:
>> Anthony,
>>
>> On Dec 17, 2008, at 5:36 PM, Anthony Liguori wrote:
>>
>>> Lev Lvovsky wrote:
>>>> On OSX 10.5, I get the following error when compiling with revision 
>>>> 5996 and higher (5995 compiles).
>>>>
>>>> As referenced in the initial RFC 
>>>> (http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00204.html), 
>>>> BSD's may not need this - is there any way to avoid using this based 
>>>> on OS, or is there something I'm missing in the configure options?
>>>
>>> Have I mentioned that I strongly dislike OS X?
>>>
>>> sigqueue is posix, does anyone know of the alternative function to 
>>> use for OS X?  I guess we could use kill.
>>
>> as I wrote to M. Losh, I should have checked the patch in the original 
>> RFC, which clearly had a conditional in the makefile for CONFIG_AIO.  
>> Running configure with --disable-aio compiled.
>
>I still would like it to work for OS X.  If someone can write up a patch 
>replacing sigqueue with the appropriate OS X function, I'd happily apply it.
>
>Regards,
>
>Anthony Liguori

The following _seems_ to work at least for FreeBSD 6.3 which also lacks
sigqueue(2):

Index: qemu/posix-aio-compat.c
@@ -99,9 +99,15 @@
         idle_threads++;
         pthread_mutex_unlock(&lock);
 
+	/* XXX FreeBSD < 7.0 doesn't have sigqueue(2) */
+#if _POSIX_REALTIME_SIGNALS > 0
         sigqueue(getpid(),
                  aiocb->aio_sigevent.sigev_signo,
                  aiocb->aio_sigevent.sigev_value);
+#else
+        kill(getpid(),
+                 aiocb->aio_sigevent.sigev_signo);
+#endif
     }
 
     idle_threads--;

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

end of thread, other threads:[~2008-12-18 21:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18  0:16 [Qemu-devel] posix-aio-compat error in 5996 Lev Lvovsky
2008-12-18  1:36 ` Anthony Liguori
2008-12-18 17:17   ` Lev Lvovsky
2008-12-18 17:24     ` Anthony Liguori
2008-12-18 21:24       ` Juergen Lock
2008-12-18  2:29 ` M. Warner Losh
  -- strict thread matches above, loose matches on Subject: below --
2008-12-17 17:36 Lev Lvovsky

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