QEmu

Posted:
in Mac Software edited January 2014
Hi all. I just recently rediscovered QEmu, the processor emulator. I tried to compile it and here's the error I get:



[MacOSXRules:~/qemu-0.4.3] charlie% make

gcc -Wall -O2 -g -DHAVE_BYTESWAP_H -D_GNU_SOURCE -c -o elfload.o elfload.c

thunk.h:27: header file 'byteswap.h' not found

cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode

make: *** [elfload.o] Error 1



Where can I find byteswap.h and where would I put it?



Thanks...

Comments

  • Reply 1 of 7
    Quote:

    Originally posted by Proud iBook Owner 2k2

    Hi all. I just recently rediscovered QEmu, the processor emulator. I tried to compile it and here's the error I get:



    [MacOSXRules:~/qemu-0.4.3] charlie% make

    gcc -Wall -O2 -g -DHAVE_BYTESWAP_H -D_GNU_SOURCE -c -o elfload.o elfload.c

    thunk.h:27: header file 'byteswap.h' not found

    cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode

    make: *** [elfload.o] Error 1



    Where can I find byteswap.h and where would I put it?



    Thanks...




    First try and modify the Makefile so that gcc is run without HAVE_BYTESWAP_H defined, since it is pretty clear you don't have byteswap.h
  • Reply 2 of 7
    Quote:

    Originally posted by WJMoore

    First try and modify the Makefile so that gcc is run without HAVE_BYTESWAP_H defined, since it is pretty clear you don't have byteswap.h



    What would I have to edit to make that happen?
  • Reply 3 of 7
    make a backup of Makefile, then search through it for '-DHAVE_BYTESWAP_H'. edit that out. then try again. if it doesn't work, then you'll probably need the header file, and maybe an associated library.
  • Reply 4 of 7
    wmfwmf Posts: 1,164member
    Wait for a programmer to port it.
  • Reply 5 of 7
    Quote:

    Originally posted by wmf

    Wait for a programmer to port it.



    I'll try removing the Byteswap ref in the makefile first....
  • Reply 6 of 7
    Quote:

    Originally posted by Proud iBook Owner 2k2

    I'll try removing the Byteswap ref in the makefile first....



    That didn't do any good....



    Quote:

    [MacOSXRules:~/qemu-0.4.3] gasparhe% make

    gcc -Wall -O2 -g -D_GNU_SOURCE -c -o elfload.o elfload.c

    elfload.c: In function `get_free_page':

    elfload.c:247: `MAP_ANONYMOUS' undeclared (first use in this function)

    elfload.c:247: (Each undeclared identifier is reported only once

    elfload.c:247: for each function it appears in.)

    elfload.c: In function `setup_arg_pages':

    elfload.c:414: `MAP_ANONYMOUS' undeclared (first use in this function)

    elfload.c: In function `set_brk':

    elfload.c:452: `MAP_ANONYMOUS' undeclared (first use in this function)

    elfload.c: In function `load_elf_interp':

    elfload.c:626: `MAP_DENYWRITE' undeclared (first use in this function)

    elfload.c:689: `MAP_ANONYMOUS' undeclared (first use in this function)

    elfload.c: In function `load_elf_binary':

    elfload.c:928: `ELIBBAD' undeclared (first use in this function)

    elfload.c:987: `MAP_DENYWRITE' undeclared (first use in this function)

    make: *** [elfload.o] Error 1



    o.O I WOULD wait for the developer to fix it but he's either too busy or he abandoned the project....
  • Reply 7 of 7
    Quote:

    Originally posted by Proud iBook Owner 2k2

    That didn't do any good....







    o.O I WOULD wait for the developer to fix it but he's either too busy or he abandoned the project....




    I asked this on the qemu-devel mailing list, and byteswap.h is a header that is only in Linux... qemu is designed to be run on x86 machines, so unless you'd like to do a heavy amount of porting to get it working without byteswap.h, it's not going to work, I'm afraid!



    HTH.
Sign In or Register to comment.