Skip to contentSkip to conversation

Error building Qemu 2.12.0 on Fedora 31 GCC 9.2.1 with the below error

DISCUSSION Viktor Madarasz 2 participants 3 messages Mar 27, 2020 – Mar 28, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi

Im trying to build Qemu 2.12.0 on Fedora 31 with GCC 9.2.1 as this particular qemu version is the only one working for my qemu-systems-ppc64 emulation I need

./configure runs with no problem but running make breaks at this point.

--------------

  CC      aarch64_be-linux-user/accel/tcg/cpu-exec-common.o
  CC      aarch64_be-linux-user/accel/tcg/translate-all.o
  CC      aarch64_be-linux-user/accel/tcg/translator.o
  CC      aarch64_be-linux-user/accel/tcg/user-exec.o
  CC      aarch64_be-linux-user/accel/tcg/user-exec-stub.o
  CC      aarch64_be-linux-user/linux-user/main.o
  CC      aarch64_be-linux-user/linux-user/syscall.o
/home/viktormadarasz/Emulator/qemu-2.12.0/linux-user/ioctls.h:176:9: error: ‘SIOCGSTAMP’ undeclared here (not in a function); did you mean ‘SIOCSRARP’? 176 |   IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval)))
      |         ^~~~~~~~~~
/home/viktormadarasz/Emulator/qemu-2.12.0/linux-user/syscall.c:5678:23: note: in definition of macro ‘IOCTL’
 5678 |     { TARGET_ ## cmd, cmd, #cmd, access, 0, {  __VA_ARGS__ } },
      |                       ^~~
/home/viktormadarasz/Emulator/qemu-2.12.0/linux-user/ioctls.h:177:9: error: ‘SIOCGSTAMPNS’ undeclared here (not in a function); did you mean ‘SIOCGSTAMP_OLD’? 177 |   IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))
      |         ^~~~~~~~~~~~
/home/viktormadarasz/Emulator/qemu-2.12.0/linux-user/syscall.c:5678:23: note: in definition of macro ‘IOCTL’
 5678 |     { TARGET_ ## cmd, cmd, #cmd, access, 0, {  __VA_ARGS__ } },
      |                       ^~~
make[1]: *** [/home/viktormadarasz/Emulator/qemu-2.12.0/rules.mak:66: linux-user/syscall.o] Error 1
make: *** [Makefile:478: subdir-aarch64_be-linux-user] Error 2
[viktormadarasz@m93pserver qemu-2.12.0]$ make >> makeerror
make[1]: flex: Command not found
make[1]: bison: Command not found
make[1]: flex: Command not found
/home/viktormadarasz/Emulator/qemu-2.12.0/linux-user/ioctls.h:176:9: error: ‘SIOCGSTAMP’ undeclared here (not in a function); did you mean ‘SIOCSRARP’? 176 |   IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval)))
      |         ^~~~~~~~~~
/home/viktormadarasz/Emulator/qemu-2.12.0/linux-user/syscall.c:5678:23: note: in definition of macro ‘IOCTL’
 5678 |     { TARGET_ ## cmd, cmd, #cmd, access, 0, {  __VA_ARGS__ } },
      |                       ^~~
/home/viktormadarasz/Emulator/qemu-2.12.0/linux-user/ioctls.h:177:9: error: ‘SIOCGSTAMPNS’ undeclared here (not in a function); did you mean ‘SIOCGSTAMP_OLD’? 177 |   IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))
      |         ^~~~~~~~~~~~
/home/viktormadarasz/Emulator/qemu-2.12.0/linux-user/syscall.c:5678:23: note: in definition of macro ‘IOCTL’
 5678 |     { TARGET_ ## cmd, cmd, #cmd, access, 0, {  __VA_ARGS__ } },
      |                       ^~~
make[1]: *** [/home/viktormadarasz/Emulator/qemu-2.12.0/rules.mak:66: linux-user/syscall.o] Error 1
make: *** [Makefile:478: subdir-aarch64_be-linux-user] Error 2

-----------------

Thanks a lot for helping

Viktor

#2 lore raw
Quoted 9 lines · Viktor Madarasz

Hi

Im trying to build Qemu 2.12.0 on Fedora 31 with GCC 9.2.1 as this particular qemu version is the only one working for my qemu-systems-ppc64 emulation I need

./configure runs with no problem but running make breaks at this point.

If you try to build an old QEMU on a new distro like this you're likely to run a bunch of minor build bugs that have been fixed in mainline. You will probably need to trawl through the git history or the mailing list archives to find the relevant commits which fix them (searching for error messages is often a good tactic).

You should also choose configure options to minimise the amount of source you build that you don't need. If you only need qemu-system-ppc64, then pass configure the "--target-list=ppc64-softmmu" argument and it will build only that and won't try to build the linux-user code at all. If configure of that vintage supports --disable-tools that is also going to be useful (and if some bit of source that looks uninteresting fails check to see if there's a relevant --disable-something to just stop building it.)

thanks
-- PMM

#3 lore raw

On 3/27/20 10:28 PM, Peter Maydell wrote:

Hi Peter

Thanks, actually passing the argument to ./configure --target-list=ppc64-softmmu  resulted in a successfull build and it now works Ok.

Viktor

Quoted 28 lines · Viktor Madarasz
Quoted 8 lines

Hi

Im trying to build Qemu 2.12.0 on Fedora 31 with GCC 9.2.1 as this particular qemu version is the only one working for my qemu-systems-ppc64 emulation I need

./configure runs with no problem but running make breaks at this point.

If you try to build an old QEMU on a new distro like this you're likely to run a bunch of minor build bugs that have been fixed in mainline. You will probably need to trawl through the git history or the mailing list archives to find the relevant commits which fix them (searching for error messages is often a good tactic).

You should also choose configure options to minimise the amount of source you build that you don't need. If you only need qemu-system-ppc64, then pass configure the "--target-list=ppc64-softmmu" argument and it will build only that and won't try to build the linux-user code at all. If configure of that vintage supports --disable-tools that is also going to be useful (and if some bit of source that looks uninteresting fails check to see if there's a relevant --disable-something to just stop building it.)

thanks
-- PMM