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

Bug 321335

Summary: qt4-build.eclass: CC, CXX, LINK variables has to be explicitly defined for all config.tests/*/*.test
Product: Gentoo Linux Reporter: Andrey <ahipp0>
Component: EclassesAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: proposed fix
fix empty sed arguments list

Description Andrey 2010-05-24 17:46:37 UTC
qt4-build.eclass as of revision 1.69 seds only config.tests/unix/compile.test to set correct CC, CXX, LINK variables:
sed -e "s:\(\$MAKE\):\1 CC=$(tc-getCC) CXX=$(tc-getCXX) LD=$(tc-getCXX) LINK=$(tc-getCXX):" \
		-i config.tests/unix/compile.test || die "sed test compilers failed"

Though others like config.tests/unix/ptrsize.test should also be seded.


Reproducible: Always

Steps to Reproduce:
1. Setup cross-compilation or prefix environment
2. Try to emerge, say, qt-core
Actual Results:  
Test fails to pass with errors like
error: CPU you selected does not support x86-64 instruction set
or many other depending on the environment.

Expected Results:  
Correct compiler is used and tests produce real results instead of false negative ones.
Comment 1 Andrey 2010-05-24 17:49:36 UTC
Created attachment 232759 [details, diff]
proposed fix
Comment 2 Dror Levin (RETIRED) gentoo-dev 2010-05-24 22:03:32 UTC
I rebuilt all modules with your patch applied and it seems to work fine. Thanks a lot! Fixed :)
Comment 3 Andrey 2010-05-25 05:13:13 UTC
(In reply to comment #2)
> I rebuilt all modules with your patch applied and it seems to work fine. Thanks
> a lot! Fixed :)
Thank you! :)
Comment 4 James Cloos 2010-05-30 07:56:06 UTC
As of the 05/26 version of the eclass, the find|xargs breaks the split qt-4.5.3 ebuilds; that version of qt does not have the string MAKE in its *.test files.

The find needs to avoid giving sed(1) an emply list of files to edit, either by not grep(1)ing any out of the list, or by passing something like /dev/null as an additional input file.
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2010-05-30 09:04:08 UTC
I would appreciate it if you have a quick patch for this since I don't use 4.5.X anymore to do local test

Cheers
Comment 6 Andrey 2010-05-30 09:27:45 UTC
Created attachment 233487 [details, diff]
fix empty sed arguments list

Fixes issue, pointed by James Cloos.
Patch against version 1.73 of qt4-build.eclass.
The patch isn't tested, because I don't have qt-4.5*.

By the way, passing /dev/null to sed won't work, because
sed: couldn't edit /dev/null: not a regular file
Comment 7 Dror Levin (RETIRED) gentoo-dev 2010-05-30 10:31:28 UTC
Now the eclass only seds if version is at least 4.6, which means that 4.5 is left alone. Thanks for reporting, please reopen if other problems appear.