Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 159943

Summary: app-emulation/qemu-user-0.8.2 fails w/ gcc-4
Product: Gentoo Linux Reporter: Henrique Dias <hdias>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED INVALID    
Severity: major    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Henrique Dias 2007-01-04 04:12:30 UTC
I try emerge qemu with EXTRA_ECONF variable:

# EXTRA_ECONF="--cc=gcc-3.4.6" emerge app-emulation/qemu

but, I get the following error:

!!! ERROR: app-emulation/qemu-user-0.8.2 failed.
Call stack:
  ebuild.sh, line 1562:   Called dyn_setup
  ebuild.sh, line 665:   Called pkg_setup
  qemu-user-0.8.2.ebuild, line 37:   Called die

!!! Qemu must build with GCC 3
!!! If you need support, post the topmost build error, and the call stack
if relevant.

Is possible remove "pkg_setup" from app-emulation/qemu-user ebuild and add a USE flag "gcc3" or "gcc4" to app-emulation/qemu, app-emulation/qemu-user and app-emulation/qemu-softmmu ebuilds.

With this option the users will be able to choose betewen gcc3" or "gcc4"
compiler.

If I compile from the sources I can choose the cc compiler whith "--cc" option.

$ wget http://www.qemu.org/qemu-0.8.2.tar.gz
$ tar xvfz qemu-0.8.2.tar.gz
$ cd qemu-0.8.2
$ gcc-config -l
$ ./configure --cc=gcc-3.4.6
$ make
$ su
# make install

Tanks in advanced,

Henrique Dias
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-01-04 09:37:29 UTC
> !!! Qemu must build with GCC 3

You haven't read the message, have you?
Comment 2 Henrique Dias 2007-01-04 14:17:49 UTC
(In reply to comment #1)
> > !!! Qemu must build with GCC 3
> 
> You haven't read the message, have you?
> 

I know.
But in my Gentoo I have gcc4. To emerge qemu I also installed the gcc3.
To select the compiler I use the EXTRA_ECONF variable:
EXTRA_ECONF="--cc=gcc-3.4.6" emerge app-emulation/qemu
But not work, because it selects the gcc4!
The EXTRA_ECONF is to force the use of gcc3.
To make this work you need change the ebuild file.
If you compile from the sources is possible force the use of gcc3.

Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-01-04 14:19:39 UTC
EXTRA_ECONF plain *won't* work for selecting a compiler, no clue whatsoever where did you get the idea that it would.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-01-04 14:20:14 UTC
 gcc-config -h
Comment 5 Henrique Dias 2007-01-04 14:50:09 UTC
(In reply to comment #4)
>  gcc-config -h
> 

http://forums.gentoo.org/viewtopic-t-520162-highlight-extraeconf.html

Not work with qemu, but if you add the ${EXTRA_ECONF} to the ebuild files work.

Example for app-emulation/qemu-user. Look at ./configure
...
src_compile() {
	#Let the application set its cflags
	unset CFLAGS

	# Switch off hardened tech
	filter-flags -fpie -fstack-protector

	myconf="--disable-gcc-check"
	set_target_list
#		--interp-prefix=${RUNTIME_PATH}/qemu-%M
	./configure \
		--prefix=/usr \
		--target-list="${TARGET_LIST}" \
		--enable-slirp \
		--kernel-path=${KV_DIR} \
		${myconf} \
                ${EXTRA_ECONF} \
		|| die "could not configure"

	emake || die "make failed"
}
...
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-01-04 15:19:36 UTC
Stop reopening this bug, we won't be adding any EXTRA_ECONF to the ebuild, as said, switch your compiler _properly_
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-01-04 15:19:48 UTC
Closed.