I noticed www-client/firefox-24.0[pgo,-debug] failed to build yesterday, with the following error: ---- make[1]: *** No rule to make target `pgo-profile-run'. Stop. ---- (Unfortunately I forgot to save the build log, and building Firefox takes a long while here that I can't provide the full log now.) (Actually it has been broken since quite a few months ago, I just didn't look into it.) I read the official PGO document ( https://developer.mozilla.org/en-US/docs/Building_with_Profile-Guided_Optimization ), and found this: ... You must have tests enabled (do not include --disable-tests in your build configuration) ... Unfortunately, I believe our firefox ebuild (actually, mozconfig-3.eclass) uses --disable-tests when debug USE flag is not enabled, and didn't actually care about pgo, which might lead to the issue, so I copied /usr/portage/eclass/mozconfig-3.eclass to my local overlay and patched it: ---- --- /usr/portage/eclass/mozconfig-3.eclass 2013-08-28 23:31:16.000000000 +0800 +++ /usr/local/portage/eclass/mozconfig-3.eclass 2013-09-25 13:13:10.980068878 +0800 @@ -63,7 +63,8 @@ mozconfig_use_enable dbus mozconfig_use_enable debug - mozconfig_use_enable debug tests + ! use debug && ! use pgo \ + && mozconfig_annotate '!debug && !pgo' --disable-tests if ! use debug ; then mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols fi ---- And firefox-24.0-r1[pgo] builds fine now.
Created attachment 359422 [details] firefox-24.0-r1 build log showing the failure
Huh, I made a mistake here. `! use pgo` should not used in `mozconfig-3.eclass` as probably not all mozilla ebuilds have the USE flag, and use() dies when it encounters a non-existent flag since EAPI 5. `! use_if_iuse pgo` (eutils.eclass) might be more appropriate.
PGO builds are not supported. You had to unmask the flag in order to use. Please provide a patch that actually fixes that problem and not a workaround
Created attachment 359580 [details, diff] mozconfig-3-pgo-fix.patch (Fixes PGO building, to be applied on mozconfig-3.eclass) Mozilla has clearly stated that PGO builds require --enable-tests ( https://developer.mozilla.org/en-US/docs/Building_with_Profile-Guided_Optimization ), and your mozconfig-3.eclass is not following the rule. I don't think there are any more appropriate fixes other than patching mozconfig-3.eclass . This patch fixes the missing pgo USE flag issue mentioned in my last comment. I did limited tests with the patch only, with firefox-24.0-r1[pgo,-debug], firefox-24.0-r1[-pgo,-debug], and thunderbird-24.0-r1. They all successfully pass the first phase of `ebuild compile` (Mozilla's configure scripts), and the options are passed correctly.