Skip to contentSkip to conversation

Linking error on Mac

Qemu-devel C.W. Betts 2 participants 3 messages Mar 14, 2009 – Mar 15, 2009

lore
Share & tools
lore

C.W. Betts

author
#0 lore raw

When I try to link any qemu program or tool, I get a linking error:
Undefined symbols:
"_raw_aio_write", referenced from:
_raw_sg_aio_write in block-raw-posix.o
"_raw_aio_read", referenced from:
_raw_sg_aio_read in block-raw-posix.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I get the following warnings in block-raw-posix.c:
/Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c: In function ‘raw_sg_aio_read’:
/Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c:1218: warning: implicit declaration of function ‘raw_aio_read’ /Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c:1218: warning: return makes pointer from integer without a cast /Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c: In function ‘raw_sg_aio_write’:
/Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c:1226: warning: implicit declaration of function ‘raw_aio_write’ /Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c:1226: warning: return makes pointer from integer without a cast

I have disabled AIO due to a bug in Mac OS X (or qemu).

author
#1 lore raw
Quoted 18 lines · C.W. Betts

When I try to link any qemu program or tool, I get a linking error:
Undefined symbols:
"_raw_aio_write", referenced from:
_raw_sg_aio_write in block-raw-posix.o
"_raw_aio_read", referenced from:
_raw_sg_aio_read in block-raw-posix.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I get the following warnings in block-raw-posix.c:
/Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c: In function ‘raw_sg_aio_read’:
/Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c:1218: warning: implicit declaration of function ‘raw_aio_read’ /Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c:1218: warning: return makes pointer from integer without a cast /Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c: In function ‘raw_sg_aio_write’:
/Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c:1226: warning: implicit declaration of function ‘raw_aio_write’ /Users/cwbetts/makestuff/qemu-allmac/src/block-raw-posix.c:1226: warning: return makes pointer from integer without a cast

Quoted 4 lines

I have disabled AIO due to a bug in Mac OS X (or qemu).

I have also tested it on a Linux Sparc computer, and I get the same error and warnings when I disable AIO.

#2 lore raw
In reply to C.W. Betts

Am 14.03.2009 um 04:39 schrieb C.W. Betts:

Quoted 1 line

I have disabled AIO due to a bug in Mac OS X (or qemu).

Disregarding the linker issue, I did not disable AIO on Mac OS X and have not encountered problems so far. Do you have a particular test case?

Andreas