Bug 744368

Summary: Setting CONFIG_SITE breaks cross compilation
Product: [openSUSE] openSUSE 11.4 Reporter: Maarten ter Huurne <maarten>
Component: DevelopmentAssignee: Stanislav Brabec <sbrabec>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P4 - Low CC: pth
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.4   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Maarten ter Huurne 2012-01-31 18:55:45 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.7.2 Safari/534.34

The site-config package installs scripts in /etc/profile.d that set the CONFIG_SITE environment variable. The problem with this is that configure scripts will use the site-specific config on any build, including builds that are not intended for the local machine, such as cross compilations. This completely breaks such builds until CONFIG_SITE is undefined.

Please leave it up to the user to define CONFIG_SITE where appropriate and don't do it in /etc/profile.

Reproducible: Always

Steps to Reproduce:
1. install site-config
2. re-login to activate the /etc/profile.d changes
3. install a cross compilation toolchain
4. run some autotools-based package's configure script with the --host=<host-triplet> argument

Actual Results:  
The package's build will break. Typically with a message saying that the compiler cannot produce executables.

Expected Results:  
If CONFIG_SITE is not defined, the cross build works fine.
Comment 1 Maarten ter Huurne 2012-01-31 19:40:36 UTC
Example logging from failed configure:

configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for package version... 1.1
checking for package patch date... 20100428
checking for mipsel-linux-gcc... /home/mth/dingoo/linux/buildroot/output/staging/usr/bin/mipsel-unknown-linux-uclibc-gcc --sysroot=/home/mth/dingoo/linux/buildroot/output/staging
checking for C compiler default output... configure: error: C compiler cannot create executables
make: *** [/home/mth/dingoo/linux/buildroot/output/build/dialog-1.1-20100428/.stamp_configured] Error 77
Comment 2 Stanislav Brabec 2012-07-17 17:51:47 UTC
The heuristic did not work correctly for cross compilation. I fixed this problem in the fix of the but 736143.

If you still see this problem with the new site-config version, please reopen.

*** This bug has been marked as a duplicate of bug 736143 ***