On 7/3/20 11:35 PM, Michele Denber wrote: > >> >> It appears that _IOR & friends are defined in >> /usr/include/sys/ioccom.h, but I can't figure out how to point gmake >> to that. Do I need some sort of "-I" in the Makefile? >> >> >> When I built QEMU 2.12, I ran into this too and ended up just >> commenting out all the references to _IOR, etc. in hw/tpm/tpm_ioctl.h >> but maybe we can do something more elegant this time. Thanks. > > OK, I fixed this by adding the line > > #include </usr/include/sys/ioccom.h> > > to hw/tpm/tpm_ioctl.h. > > gmake now went to the end but threw a bunch of errors all complaining > about something called TFR. This is the tail: > > ... > CC aarch64-softmmu/trace/generated-helpers.o > Undefined first referenced > symbol in file > TFR ../net/tap-solaris.o > ld: fatal: symbol referencing errors > collect2: error: ld returned 1 exit status > gmake[1]: *** [Makefile:208: qemu-system-mipsel] Error 1 > gmake: *** [Makefile:527: mipsel-softmmu/all] Error 2 > LINK mips-softmmu/qemu-system-mips > Undefined first referenced > symbol in file > TFR ../net/tap-solaris.o > ld: fatal: symbol referencing errors > collect2: error: ld returned 1 exit status > gmake[1]: *** [Makefile:208: qemu-system-mips] Error 1 > gmake: *** [Makefile:527: mips-softmmu/all] Error 2 > LINK arm-softmmu/qemu-system-arm > Undefined first referenced > symbol in file > TFR ../net/tap-solaris.o > ld: fatal: symbol referencing errors > collect2: error: ld returned 1 exit status > gmake[1]: *** [Makefile:208: qemu-system-arm] Error 1 > gmake: *** [Makefile:527: arm-softmmu/all] Error 2 > LINK aarch64-softmmu/qemu-system-aarch64 > Undefined first referenced > symbol in file > TFR ../net/tap-solaris.o > ld: fatal: symbol referencing errors > collect2: error: ld returned 1 exit status > gmake[1]: *** [Makefile:208: qemu-system-aarch64] Error 1 > gmake: *** [Makefile:527: aarch64-softmmu/all] Error 2 > root@hemlock:~/qemu-5.0.0# > > A web search for "solaris undefined symbol TFR" turned up nothing and > I'm not seeing it on the machine. man TFR returns nothing. I didn't > encounter this error while building 2.12. Here's an example of its use > (in tap-solaris.c): > > TFR(ip_fd = open("/dev/udp", O_RDWR, 0)); > > What is TFR?
TFR() is defined in include/qemu-common.h: #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) > > - Michele > >