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

Bug 396133

Summary: www-client/chromium-16.0.912.63 build failure with USE=kerberos and certain CFLAGS
Product: Gentoo Linux Reporter: DJ Dunn <djdunn.safety>
Component: Current packagesAssignee: Mike Gilbert <floppym>
Status: RESOLVED DUPLICATE    
Severity: normal CC: aladjev.andrew, chromium
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=431606
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Tail of build log

Description DJ Dunn 2011-12-26 21:29:28 UTC
Ok when I compile cups with useflag kerberos, and compile chromium with useflag cups it fails because cups adds extra cflags.

here is the tail of the last 100 lines of my build.log
http://paste.pocoo.org/show/526133/

here is my normal cflags. tested with -O2 -pipe, the errors still exist, before someone goes off about insane use flags

CFLAGS="-O2 -mcx16 -msahf -mpopcnt --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -m128bit-long-double -m3dnow -mmmx -msse -msse2 -msse3 -mabm -msse4a -march=amdfam10 -mtune=amdfam10 -march=native -mtune=native -mfpmath=sse -pipe"


Reproducible: Always

Steps to Reproduce:
1.compile cups with useflag kerberos
2. compile chromium with useflags cups
3. build fail
Actual Results:  
The build fails
Comment 1 Mike Gilbert gentoo-dev 2011-12-26 21:49:32 UTC
I worked with the reporter in #gentoo on this.

There are 2 problems:

1. krb5-config --cflags returns the CFLAGS it was compiled with, rather than those necessary for building against the kerberos libraries. This propagates to cups-config --cflags.

DJ Dunn: Which kerberos package are you using (mit-krb5 or heimdal)?


2. cups_config_wrapper.py in chromium does some mangling of the cups-config output, producing a bad linker command line. I plan to file an upstream chromium bug once I understand this better.
Comment 2 Mike Gilbert gentoo-dev 2011-12-26 21:53:52 UTC
Created attachment 297045 [details]
Tail of build log

Attaching log so we don't lose it due to pastebin purging.
Comment 3 DJ Dunn 2011-12-26 22:01:38 UTC
mit-krb5
Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-01-06 17:50:21 UTC
(In reply to comment #1)
> 2. cups_config_wrapper.py in chromium does some mangling of the cups-config
> output, producing a bad linker command line. I plan to file an upstream
> chromium bug once I understand this better.

I think it's cups_config_helper.py . Are you sure that without it the linker command line would be correct?

Anyway, I think it's not a bug. The "insane" CFLAGS were recorded by either cups or kerberos, and recompiling those packages should fix it.

Ideally this should somehow still work, but that'd require baking understanding of '--param foo=bar' space-separated option into many places. I don't think that's realistic, but of course feel free to bug affected projects (chromium, kerberos, cups, gcc).
Comment 5 Mike Gilbert gentoo-dev 2012-01-06 22:30:03 UTC
Reopening and assigning to me; I still intend to investigate an actual solution, but just haven't gotten to it.
Comment 6 Laurent Bachelier 2012-01-25 02:50:26 UTC
I have the same issue (same build log), however I have:

krb5-config --libs krb5 returns:
-L/usr/lib64 -Wl,-O1 -Wl,--as-needed -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl

cups-config --libs  returns:
-lcups -L/usr/lib64 -march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -O2 -pipe -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE -Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl -lgnutls -L/usr/lib64 -lgcrypt -lgpg-error -lz -lpthread -lm -lcrypt


I you are wondering where are those --param coming from: it's the result of -mnative, but I did replace -mnative by it's result with this trick: http://en.gentoo-wiki.com/wiki/Safe_Cflags#-march.3Dnative
My CFLAGS are "-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -O2 -pipe".

Now, should cups-config not return those cflags?
But anyway, the chromium build system should not replace those spaces blindly, yet I can't find where it does.


According to the source code of cups_config_helper.py, cups-config should not contain those cflags, and it's not fixed.
https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/163704

Their wrapper does *try* to remove the cflags but it fails with --param flags.
Comment 7 Laurent Bachelier 2012-01-25 02:52:52 UTC
There's already a bug report for CUPS: #378081
Comment 8 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-01-25 07:54:22 UTC

*** This bug has been marked as a duplicate of bug 378081 ***
Comment 9 Sid 2012-02-04 16:21:40 UTC
wow, this may be a cups bug and not chromium bug, but i wouldn't find it if not for this entry) thanks.
Comment 10 Laurent Bachelier 2012-02-04 20:12:53 UTC
My workaround is to compile cups without the --param flags, using package.env

https://github.com/laurentb/public-dotfiles/blob/master/gentoo/portage/package.env
https://github.com/laurentb/public-dotfiles/blob/master/gentoo/portage/env/shortflags
Comment 11 Mike Gilbert gentoo-dev 2012-08-17 02:20:36 UTC
*** Bug 431606 has been marked as a duplicate of this bug. ***