Skip to contentSkip to conversation

posix-aio-compat error in 5996

Qemu-devel Lev Lvovsky 4 participants 6 messages Dec 18, 2008

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 3 lines · Lev Lvovsky

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

Quoted 25 lines

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

(quoted diff) +0 -4
-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
---

#2 lore raw

Anthony,

Quoted 8 lines · Anthony Liguori
Quoted 3 lines · Lev Lvovsky

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

#3 lore raw
Quoted 7 lines · Lev Lvovsky

Anthony,

Quoted 3 lines · Anthony Liguori
Quoted 2 lines · Lev Lvovsky

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

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

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

Quoted 3 lines

thanks!
-lev

#4 lore raw

In article <[email protected]> you write:

Quoted 23 lines
Quoted 13 lines · Lev Lvovsky

Anthony,

Quoted 9 lines · Anthony Liguori
Quoted 7 lines · Lev Lvovsky

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?

Quoted 8 lines
Quoted 4 lines

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.

Quoted 6 lines

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--;
#5 lore raw
In reply to Lev Lvovsky

In message: <[email protected]>
Lev Lvovsky <[email protected]> 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