| View previous topic :: View next topic |
| Author |
Message |
mike934 n00b

Joined: 25 Aug 2007 Posts: 15 Location: Moscow, Russia
|
Posted: Sat Aug 25, 2007 2:54 pm Post subject: Can't emerge qemu [SOLVED] |
|
|
I want to install qemu but emerging it results in errors:
| Code: | gcc -O2 -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/target-arm -I/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0 -I/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/linux-user -I/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/linux-user/arm -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/fpu -I/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/slirp -c -o mmap.o /var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/linux-user/mmap.c
/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/linux-user/syscall.c:215: error: syntax error before "gettid"
/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/linux-user/syscall.c:221: error: syntax error before "sys_uname"
/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/linux-user/syscall.c:222: error: syntax error before "sys_getcwd1"
/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/linux-user/syscall.c:223: error: syntax error before "sys_getdents"
[...]
make[1]: *** [syscall.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/app-emulation/qemu-user-0.8.0/work/qemu-0.8.0/arm-user'
make: *** [all] Error 1
!!! ERROR: app-emulation/qemu-user-0.8.0 failed.
Call stack:
ebuild.sh, line 1638: Called dyn_compile
ebuild.sh, line 985: Called qa_call 'src_compile'
ebuild.sh, line 44: Called src_compile
qemu-user-0.8.0.ebuild, line 73: Called die
|
That is what gcc-config says:
| Code: | mike@miked1 / $ gcc-config -l
[1] i686-pc-linux-gnu-3.3.6 *
[2] i686-pc-linux-gnu-3.4.6
[3] i686-pc-linux-gnu-3.4.6-hardened
[4] i686-pc-linux-gnu-3.4.6-hardenednopie
[5] i686-pc-linux-gnu-3.4.6-hardenednopiessp
[6] i686-pc-linux-gnu-3.4.6-hardenednossp
[7] i686-pc-linux-gnu-4.1.2
[8] i686-pc-linux-gnu-4.2.0 |
package.mask
| Code: | >=app-emulation/qemu-0.8.1
>=app-emulation/qemu-user-0.8.1
>=app-emulation/qemu-softmmu-0.8.1 |
And I have set
| Code: | | CFLAGS="-O2 -mtune=pentium4 -pipe" |
in /etc/make.conf instead of
| Code: | | CFLAGS="-O2 -march=nocona -pipe" |
What should I do to emerge qemu?
Last edited by mike934 on Sat Aug 25, 2007 7:38 pm; edited 1 time in total |
|
| Back to top |
|
 |
didymos Advocate


Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Sat Aug 25, 2007 3:44 pm Post subject: |
|
|
Maybe try using a gcc that's not quite so old? _________________ Thomas S. Howard |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8657 Location: beyond the rim
|
Posted: Sat Aug 25, 2007 4:02 pm Post subject: |
|
|
| didymos wrote: | | Maybe try using a gcc that's not quite so old? |
and/or testing with qemu-0.9.0 |
|
| Back to top |
|
 |
mike934 n00b

Joined: 25 Aug 2007 Posts: 15 Location: Moscow, Russia
|
Posted: Sat Aug 25, 2007 4:36 pm Post subject: |
|
|
| Genone wrote: | | didymos wrote: | | Maybe try using a gcc that's not quite so old? |
and/or testing with qemu-0.9.0 | With gcc-3.4.6 and qemu-0.8.0 it is the same. With gcc-3.4.6 and qemu-0.9.0 the error is different: | Code: | i686-pc-linux-gnu-gcc -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0/work/qemu-0.9.0/target-i386 -I/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0/work/qemu-0.9.0 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0/work/qemu-0.9.0/fpu -DHAS_AUDIO -I/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0/work/qemu-0.9.0/slirp -c -o i386-dis.o /var/tmp/portage/app-emulation/qemu-softmmu-0.9.0/work/qemu-0.9.0/i386-dis.c
../softmmu_template.h: In function `__stq_mmu':
../softmmu_template.h:260: error: unable to find a register to spill in class `GENERAL_REGS'
../softmmu_template.h:260: error: this is the insn:
(insn:HI 365 364 366 13 ../softmmu_template.h:290 (parallel [
(set (reg:DI 0 ax [216])
(lshiftrt:DI (reg/v:DI 59 [ val ])
(subreg:QI (reg:SI 0 ax [215]) 0)))
(clobber (scratch:SI))
(clobber (reg:CC 17 flags))
]) 309 {lshrdi3_1} (insn_list 364 (nil))
(expr_list:REG_DEAD (reg:SI 0 ax [215])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_UNUSED (scratch:SI)
(nil)))))
[...]
!!! ERROR: app-emulation/qemu-softmmu-0.9.0 failed.
Call stack:
ebuild.sh, line 1638: Called dyn_compile
ebuild.sh, line 985: Called qa_call 'src_compile'
ebuild.sh, line 44: Called src_compile
qemu-softmmu-0.9.0.ebuild, line 96: Called die |
Are there any other options? |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8657 Location: beyond the rim
|
Posted: Sat Aug 25, 2007 4:56 pm Post subject: |
|
|
| According to Google that error is usually caused by building qemu with gcc-4, so might be worth checking `gcc --version` to make sure that gcc-3 is really selected. On one wiki there was also the suggestion to not use any CFLAGS to avoid that error. |
|
| Back to top |
|
 |
drwook Veteran

Joined: 30 Mar 2005 Posts: 1313 Location: London
|
Posted: Sat Aug 25, 2007 5:32 pm Post subject: |
|
|
| did you source /etc/profile after changing compiler? |
|
| Back to top |
|
 |
mike934 n00b

Joined: 25 Aug 2007 Posts: 15 Location: Moscow, Russia
|
Posted: Sat Aug 25, 2007 5:51 pm Post subject: |
|
|
| Genone wrote: | | According to Google that error is usually caused by building qemu with gcc-4, so might be worth checking `gcc --version` to make sure that gcc-3 is really selected. On one wiki there was also the suggestion to not use any CFLAGS to avoid that error. |
Here is my gcc at the moment | Code: | | gcc (GCC) 3.4.6 (Gentoo 3.4.6-r2 p1.5, ssp-3.4.6-1.0, pie-8.7.10) | I commented CFLAGS out but unfortunately it did not help. |
|
| Back to top |
|
 |
mike934 n00b

Joined: 25 Aug 2007 Posts: 15 Location: Moscow, Russia
|
Posted: Sat Aug 25, 2007 5:52 pm Post subject: |
|
|
| drwook wrote: | | did you source /etc/profile after changing compiler? | Yes, sure. |
|
| Back to top |
|
 |
saboya Tux's lil' helper

Joined: 28 Nov 2006 Posts: 148 Location: Brazil
|
Posted: Sat Aug 25, 2007 6:45 pm Post subject: |
|
|
| The error you experienced using gcc-3.4.6 I did too, I switched to 3.3.6 and it worked, which means the problem is probably in your setup. |
|
| Back to top |
|
 |
mike934 n00b

Joined: 25 Aug 2007 Posts: 15 Location: Moscow, Russia
|
Posted: Sat Aug 25, 2007 7:00 pm Post subject: |
|
|
| saboya wrote: | | The error you experienced using gcc-3.4.6 I did too, I switched to 3.3.6 and it worked, which means the problem is probably in your setup. | As one could see in my first message I had already tried gcc-3.3.6. Yes, I understand that something is wrong in my setup. Could you please give me a hint what it could be? |
|
| Back to top |
|
 |
mike934 n00b

Joined: 25 Aug 2007 Posts: 15 Location: Moscow, Russia
|
Posted: Sat Aug 25, 2007 7:37 pm Post subject: Can't emerge qemu [SOLVED] |
|
|
| mike934 wrote: | | Genone wrote: | | According to Google that error is usually caused by building qemu with gcc-4, so might be worth checking `gcc --version` to make sure that gcc-3 is really selected. On one wiki there was also the suggestion to not use any CFLAGS to avoid that error. |
I commented CFLAGS out but unfortunately it did not help. | emerge --info helped me to see that I had to set CFLAGS="" instead of commenting the line out. After that I managed to emerge qemu with gcc-3.3.6 and qemu-0.9.0.
Thanks to all who replied to my post, especially to Genone! |
|
| Back to top |
|
 |
mightymephisto n00b

Joined: 19 Dec 2005 Posts: 9
|
Posted: Thu Oct 18, 2007 10:03 pm Post subject: |
|
|
I know this is marked as solved, but I have managed to get qemu to compile with gcc4 with the thanks of this patch
http://www.kju-app.org/proj/browser/trunk/patches/qemu-0.9.0-gcc4.patch?format=txt
- Copied /usr/portage/app-emulation/qemu-softmmu into my portage overlay
- Downloaded patch into files directory
- Added epatch "${FILESDIR}"/qemu-0.9.0-gcc4.patch after the cd ${S} in the ebuild src_unpack
- Comment out all of pkg_setup
|
|
| Back to top |
|
 |
drwook Veteran

Joined: 30 Mar 2005 Posts: 1313 Location: London
|
Posted: Sat Oct 20, 2007 2:18 pm Post subject: |
|
|
| mightymephisto wrote: | I know this is marked as solved, but I have managed to get qemu to compile with gcc4 with the thanks of this patch
http://www.kju-app.org/proj/browser/trunk/patches/qemu-0.9.0-gcc4.patch?format=txt
- Copied /usr/portage/app-emulation/qemu-softmmu into my portage overlay
- Downloaded patch into files directory
- Added epatch "${FILESDIR}"/qemu-0.9.0-gcc4.patch after the cd ${S} in the ebuild src_unpack
- Comment out all of pkg_setup
|
Do we know if this patch has been pushed upstream?
Anyone opened a bug to have it included in the portage tree? (esp. if it's being blocked upstream without good reason?) |
|
| Back to top |
|
 |
ecks n00b

Joined: 27 Feb 2007 Posts: 64
|
Posted: Sat Oct 20, 2007 11:06 pm Post subject: |
|
|
| I tried the patch and unfortunately it failed to build for me. What version of gcc did you use? I have gcc-4.1.2, maybe it worked under gcc-4.2.2. I have my build.log at http://www.pastebin.ca/743966. |
|
| Back to top |
|
 |
mightymephisto n00b

Joined: 19 Dec 2005 Posts: 9
|
Posted: Mon Oct 22, 2007 2:35 pm Post subject: |
|
|
| Yes it was under gcc 4.2.2 |
|
| Back to top |
|
 |
xPosiMattx n00b

Joined: 13 Jul 2004 Posts: 9
|
Posted: Sun Dec 30, 2007 7:49 am Post subject: |
|
|
Has anyone had any luck with this recently? It seems that gcc 3.3.6 is masked to use no keywords at this point due to compilation problems / changes in bison, etc. Using i686-pc-linux-gnu-3.4.6, `CFLAGS="" emerge -av qemu` exits with:
| Code: |
i686-pc-linux-gnu-gcc -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0-r1/work/qemu-0.9.0/target-i386 -I/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0-r1/work/qemu-0.9.0 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0-r1/work/qemu-0.9.0/fpu -DHAS_AUDIO -I/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0-r1/work/qemu-0.9.0/slirp -c -o i8254.o /var/tmp/portage/app-emulation/qemu-softmmu-0.9.0-r1/work/qemu-0.9.0/hw/i8254.c
../softmmu_template.h: In function `__stq_mmu':
../softmmu_template.h:260: error: unable to find a register to spill in class `GENERAL_REGS'
../softmmu_template.h:260: error: this is the insn:
(insn:HI 337 317 338 13 ../softmmu_template.h:287 (parallel [
(set (reg:DI 0 ax [214])
(lshiftrt:DI (reg/v:DI 59 [ val ])
(subreg:QI (reg:SI 235) 0)))
(clobber (scratch:SI))
(clobber (reg:CC 17 flags))
]) 309 {lshrdi3_1} (nil)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_UNUSED (scratch:SI)
(nil))))
../softmmu_template.h:260: confused by earlier errors, bailing out
make[1]: *** [op_helper.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0-r1/work/qemu-0.9.0/sparc-softmmu'
make: *** [subdir-sparc-softmmu] Error 2
make: *** Waiting for unfinished jobs....
<----- SNIP ----->
ar rcs libqemu.a exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o translate.o op.o fpu/softfloat-native.o helper.o helper2.o disas.o i386-dis.o
i686-pc-linux-gnu-gcc -o qemu-system-x86_64 vl.o osdep.o readline.o monitor.o pci.o console.o loader.o isa_mmio.o cutils.o block.o block-raw.o block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o block-bochs.o block-vpc.o block-vvfat.o block-qcow2.o scsi-disk.o cdrom.o lsi53c895a.o usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o ne2000.o rtl8139.o pcnet.o ide.o pckbd.o ps2.o vga.o sb16.o es1370.o fmopl.o adlib.o dma.o audio.o noaudio.o wavaudio.o sdlaudio.o ossaudio.o alsaaudio.o wavcapture.o fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o cirrus_vga.o mixeng.o apic.o parallel.o acpi.o piix_pci.o usb-uhci.o smbus_eeprom.o gdbstub.o sdl.o x_keymap.o vnc.o slirp/cksum.o slirp/if.o slirp/ip_icmp.o slirp/ip_input.o slirp/ip_output.o slirp/slirp.o slirp/mbuf.o slirp/misc.o slirp/sbuf.o slirp/socket.o slirp/tcp_input.o slirp/tcp_output.o slirp/tcp_subr.o slirp/tcp_timer.o slirp/udp.o slirp/bootp.o slirp/debug.o slirp/tftp.o libqemu.a -lm -lz -lasound -lSDL -lpthread -lutil -lrt
make[1]: Leaving directory `/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0-r1/work/qemu-0.9.0/x86_64-softmmu'
*
* ERROR: app-emulation/qemu-softmmu-0.9.0-r1 failed.
* Call stack:
* ebuild.sh, line 1701: Called dyn_compile
* ebuild.sh, line 1039: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* qemu-softmmu-0.9.0-r1.ebuild, line 99: Called die
* The specific snippet of code:
* emake || die "make failed"
* The die message:
* make failed
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/app-emulation/qemu-softmmu-0.9.0-r1/temp/build.log'.
*
|
I also tried to compile it with a modified ebuild file to only use TARGET_LIST="mips-softmmu", since I'm primarily concerned with emulating a MIPS machine and got the same error.
I'm not really sure where the x86_64 is coming from since I'm on a 32-bit Core2Duo with the following make.conf settings:
| Code: | CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
|
| Code: | # gcc-config -l
[1] i686-pc-linux-gnu-3.4.6 *
[2] i686-pc-linux-gnu-3.4.6-hardened
[3] i686-pc-linux-gnu-3.4.6-hardenednopie
[4] i686-pc-linux-gnu-3.4.6-hardenednopiessp
[5] i686-pc-linux-gnu-3.4.6-hardenednossp
[6] i686-pc-linux-gnu-4.1.2
|
Any help or suggestions would be greatly appreciated! |
|
| Back to top |
|
 |
Maf Apprentice


Joined: 15 May 2005 Posts: 277 Location: Szczecin, Poland
|
Posted: Thu Jan 03, 2008 1:52 am Post subject: |
|
|
Guys, it this really so hard to fix this shitty qemu package to work correctly with gcc4? Did anyone looked at the source? _________________ got gentoo? |
|
| Back to top |
|
 |
xPosiMattx n00b

Joined: 13 Jul 2004 Posts: 9
|
|
| Back to top |
|
 |
Maf Apprentice


Joined: 15 May 2005 Posts: 277 Location: Szczecin, Poland
|
Posted: Thu Jan 03, 2008 7:17 pm Post subject: |
|
|
This link seems to be broken, please fix it  _________________ got gentoo? |
|
| Back to top |
|
 |
xPosiMattx n00b

Joined: 13 Jul 2004 Posts: 9
|
Posted: Thu Jan 03, 2008 7:38 pm Post subject: |
|
|
| Maf wrote: |
This link seems to be broken, please fix it  |
Sorry about that, the file got moved out of the way in a wordpress update. Previous link should work now. Critiques welcome on any of those files. |
|
| Back to top |
|
 |
saber850 Tux's lil' helper


Joined: 21 Mar 2004 Posts: 103
|
Posted: Sat Jan 05, 2008 11:42 am Post subject: |
|
|
Yes, I'm also hitting this problem w/ gcc-3.4.
I had to unmask gcc-3.3 just to compile it.
Seems a bit disappointing that qemu builds w/ gcc 3.3 but not 3.4. And I agree w/ Maf regarding 4.0 support.
Otherwise QEMU is awesome! |
|
| Back to top |
|
 |
Maf Apprentice


Joined: 15 May 2005 Posts: 277 Location: Szczecin, Poland
|
Posted: Sat Jan 05, 2008 12:13 pm Post subject: |
|
|
| saber850 wrote: | | Otherwise QEMU is awesome! |
No, but it would be if it worked correctly with latest gcc  _________________ got gentoo? |
|
| Back to top |
|
 |
My_World Guru


Joined: 01 Sep 2003 Posts: 339 Location: Kalahari Desert
|
Posted: Sun Jan 13, 2008 8:27 pm Post subject: |
|
|
Love the package you put together, thanks for the effort!
 _________________ "Ubuntu" - an African word meaning "Gentoo is too hard for me". |
|
| Back to top |
|
 |
saber850 Tux's lil' helper


Joined: 21 Mar 2004 Posts: 103
|
Posted: Sun Jan 13, 2008 9:29 pm Post subject: |
|
|
FWIW, I came across a couple sites which noted that there were instances of qemu compiling w/ gcc4, but not necessarily running (correctly).
I'd post URLs, but it was too long ago (couple months). |
|
| Back to top |
|
 |
|