Build failure on OS X - dynticks
Hello,
One of the recent patches (dynticks) has broken compilation on Mac OS X v10.4. Should this work on OS X or should this have been limited to Linux?
...
Documentation yes
gcc-3.3 -DQEMU_TOOL -Wall -O2 -g -fno-strict-aliasing -I. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -mdynamic-no-pic -g -o qemu-img qemu-img.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c block-parallels.c -lz
make -C i386-softmmu all
gcc-3.3 -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/Users/andreas/Q/tmp/qemu/target-i386 -I/Users/andreas/Q/tmp/qemu -D__powerpc__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/Users/andreas/Q/tmp/qemu/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/Users/andreas/Q/tmp/qemu/slirp -mdynamic-no-pic -c -o vl.o /Users/andreas/Q/tmp/qemu/vl.c /Users/andreas/Q/tmp/qemu/vl.c: In function `dynticks_start_timer':
/Users/andreas/Q/tmp/qemu/vl.c:1307: error: `timer_t' undeclared (first use in this function)
/Users/andreas/Q/tmp/qemu/vl.c:1307: error: (Each undeclared identifier is reported only once
/Users/andreas/Q/tmp/qemu/vl.c:1307: error: for each function it appears in.)
/Users/andreas/Q/tmp/qemu/vl.c:1307: error: parse error before "host_timer"
/Users/andreas/Q/tmp/qemu/vl.c:1323: warning: implicit declaration of function `timer_create'
/Users/andreas/Q/tmp/qemu/vl.c:1323: error: `CLOCK_REALTIME' undeclared (first use in this function)
/Users/andreas/Q/tmp/qemu/vl.c:1323: error: `host_timer' undeclared (first use in this function)
/Users/andreas/Q/tmp/qemu/vl.c: In function `dynticks_stop_timer':
/Users/andreas/Q/tmp/qemu/vl.c:1339: error: `timer_t' undeclared (first use in this function)
/Users/andreas/Q/tmp/qemu/vl.c:1339: error: parse error before "host_timer"
/Users/andreas/Q/tmp/qemu/vl.c:1341: warning: implicit declaration of function `timer_delete'
/Users/andreas/Q/tmp/qemu/vl.c:1341: error: `host_timer' undeclared (first use in this function)
/Users/andreas/Q/tmp/qemu/vl.c: In function `dynticks_rearm_timer':
/Users/andreas/Q/tmp/qemu/vl.c:1346: error: `timer_t' undeclared (first use in this function)
/Users/andreas/Q/tmp/qemu/vl.c:1346: error: parse error before "host_timer"
/Users/andreas/Q/tmp/qemu/vl.c:1347: error: storage size of `timeout' isn't known
/Users/andreas/Q/tmp/qemu/vl.c:1358: warning: implicit declaration of function `timer_gettime'
/Users/andreas/Q/tmp/qemu/vl.c:1358: error: `host_timer' undeclared (first use in this function)
/Users/andreas/Q/tmp/qemu/vl.c:1371: warning: implicit declaration of function `timer_settime'
/Users/andreas/Q/tmp/qemu/vl.c:1347: warning: unused variable `timeout'
make[1]: *** [vl.o] Error 1
make: *** [subdir-i386-softmmu] Error 2
Andreas
Am 25.08.2007 um 09:37 schrieb Andreas Färber:
Quoted 1 line
One of the recent patches (dynticks) has broken compilation on Mac OS X v10.4. Should this work on OS X or should this have been limited to Linux?
Getting no answer on this I have prepared a quickfix which wraps all dynticks in conditional sections for __linux__, restoring compilation on OS X. If this is the right way to fix then the conditional sections can be merged with HPET, which is already limited to __linux__.
The patch also fixes an apparently wrong #endif comment.
Andreas
Index: vl.c
===================================================================
RCS file: /sources/qemu/qemu/vl.c,v
retrieving revision 1.332
diff -r1.332 vl.c
831a832,833
Quoted 2 lines
#ifdef
__linux__
835a838,839
Quoted 2 lines
#endif /*
__linux__*/
849a854
Quoted 1 line
#ifdef
__linux__
851a857
Quoted 1 line
#endif
1302c1308,1310
< #endif /* !defined(__linux__) */
---
Quoted 3 lines
#endif /*
defined(__linux__)*/#if
defined(__linux__)
1377a1386,1387
Quoted 2 lines
#endif /*
defined(__linux__)*/