Summary: | www-client/firefox-53.0[pgo] fails to link on GCC 6.3 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nick Sarnie <sarnex> |
Component: | Current packages | Assignee: | Mozilla Gentoo Team <mozilla> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | alecm_88, arve.barsnes, audvare, awkravchuk, b4b1, bircoph, da_risk, de.techno, herrtimson, lock.cda, michal.spondr, nrndda, oserytsan, quezak, sevener.gentoo, vmatare+gbug |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
bzipped build.log emerge --info ff54.0.1 pgo gcc7 patch ff55 pgo gcc7 patch screenshot of fonts |
Description
Nick Sarnie
2017-05-07 02:01:02 UTC
Created attachment 471842 [details]
build.log
Created attachment 474682 [details]
bzipped build.log
Encountered same error.
Created attachment 474684 [details]
emerge --info
I got accurately the same behaviour using gcc 6.3.0 and USE=+pgo. Same error for me with firefox-52.1.0-r1. I noticed the problem with gcc-6.3.0, but the error persists reverting back to gcc-5.4.0: ../../gfx/thebes/Unified_cpp_gfx_thebes1.o: In function `gfxTextRun::SetSpaceGlyph(gfxFont*, mozilla::gfx::DrawTarget*, unsigned int, unsigned short) [clone .cold.377]': Unified_cpp_gfx_thebes1.cpp:(.text.unlikely+0x72b3): undefined reference to `gfxShapedWord* gfxFont::GetShapedWord<unsigned char>(mozilla::gfx::DrawTarget*, unsigned char const*, unsigned int, unsigned int, mozilla::unicode::Script, bool, int, unsigned int, gfxTextPerfMetrics*)' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: libxul.so: hidden symbol `_ZN7gfxFont13GetShapedWordIhEEP13gfxShapedWordPN7mozilla3gfx10DrawTargetEPKT_jjNS3_7unicode6ScriptEbijP18gfxTextPerfMetrics' isn't defined /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status This suggests the problem might not be caused by the gcc package itself but by an associated linker plugin or what not. Sadly, I don't know enough about pgo to know if/what files from other packages are involved when that linker call is made. Just built firefox-52.1.0-r1 on a ~40 day out of date machine with gcc 5.4.0, exact same CFLAGS an USE flags. Both are Xeon but the one that fails is one generation older (E5640). I could upgrade the one that works and build firefox after each package to find out what causes the failure but that would be extremely laborious. The patch mentioned in comment 21 at: https://bugzilla.mozilla.org/show_bug.cgi?id=1332788#c21 works if applied to gfx/thebes/gfxFont.cpp . (In reply to Sven B. from comment #7) > The patch mentioned in comment 21 at: > > https://bugzilla.mozilla.org/show_bug.cgi?id=1332788#c21 > > works if applied to gfx/thebes/gfxFont.cpp . I experience the font corruption described in the bug if I use that solution. Created attachment 483002 [details, diff]
ff54.0.1 pgo gcc7 patch
Hmm, I haven't experienced the font corruption issue (or any other), but was using gcc 7.1.0 instead of 6.3.0 as well as ff 54.
www-client/firefox-54.0.1::gentoo was built with the following:
USE="dbus hwaccel jemalloc pgo pulseaudio startup-notification system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite -bindist -custom-cflags -custom-optimization -debug -gmp-autoupdate -hardened -jack (-neon) -nsplugin (-selinux) (-system-cairo) -test -wifi" ABI_X86="(64)"
CFLAGS="-pipe -march=native -fstack-protector-strong"
CXXFLAGS="-pipe -march=native -fstack-protector-strong -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags"
(In reply to Sven B. from comment #9) > Created attachment 483002 [details, diff] [details, diff] > ff54.0.1 pgo gcc7 patch > > Hmm, I haven't experienced the font corruption issue (or any other), but was > using gcc 7.1.0 instead of 6.3.0 as well as ff 54. > > www-client/firefox-54.0.1::gentoo was built with the following: > USE="dbus hwaccel jemalloc pgo pulseaudio startup-notification > system-harfbuzz system-icu system-jpeg system-libevent system-libvpx > system-sqlite -bindist -custom-cflags -custom-optimization -debug > -gmp-autoupdate -hardened -jack (-neon) -nsplugin (-selinux) (-system-cairo) > -test -wifi" ABI_X86="(64)" > CFLAGS="-pipe -march=native -fstack-protector-strong" > CXXFLAGS="-pipe -march=native -fstack-protector-strong > -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" > LDFLAGS="-Wl,-O1 -Wl,--as-needed > -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags" Same issue with that patch. www-client/firefox-54.0.1::gentoo was built with the following: USE="custom-cflags custom-optimization dbus gmp-autoupdate hwaccel jemalloc pgo pulseaudio startup-notification system-libvpx -bindist -debug -hardened -jack (-neon) -nsplugin (-selinux) (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-sqlite -test -wifi" ABI_X86="(64)" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" CFLAGS="-march=native -pipe" CXXFLAGS="-march=native -pipe -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags" (In reply to Nick Sarnie from comment #10) > > Same issue with that patch. > > www-client/firefox-54.0.1::gentoo was built with the following: > USE="custom-cflags custom-optimization dbus gmp-autoupdate hwaccel jemalloc > pgo pulseaudio startup-notification system-libvpx -bindist -debug -hardened > -jack (-neon) -nsplugin (-selinux) (-system-cairo) -system-harfbuzz > -system-icu -system-jpeg -system-libevent -system-sqlite -test -wifi" > ABI_X86="(64)" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs > -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES > -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu > -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr > -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq > -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" > CFLAGS="-march=native -pipe" > CXXFLAGS="-march=native -pipe -fno-delete-null-pointer-checks > -fno-lifetime-dse -fno-schedule-insns2" > LDFLAGS="-Wl,-O1 -Wl,--as-needed > -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags" GCC 7 or GCC 6 ?; Since with GCC 7 the FF ebuild currently uses -O2 instead of -Os in the first pass; Perhaps also try with system-harfbuzz since that is also responsible for text shaping and is one of the differences between my configuration yours. (In reply to Sven B. from comment #9) > Created attachment 483002 [details, diff] [details, diff] > ff54.0.1 pgo gcc7 patch > > Hmm, I haven't experienced the font corruption issue (or any other), but was > using gcc 7.1.0 instead of 6.3.0 as well as ff 54. Do you have the font corruption with gcc-6.3.0? gcc-7 is not keyworded yet, so we have to support gcc-6. That is the main reason why I don't include that patch: fonts became broken beyond usability. (In reply to Andrew Savchenko from comment #12) > > Do you have the font corruption with gcc-6.3.0? gcc-7 is not keyworded yet, > so we have to support gcc-6. That is the main reason why I don't include > that patch: fonts became broken beyond usability. Did a rebuild with GCC 6.3.0 and fonts are indeed broken. (In reply to Sven B. from comment #11) > (In reply to Nick Sarnie from comment #10) > > > > Same issue with that patch. > > > > www-client/firefox-54.0.1::gentoo was built with the following: > > USE="custom-cflags custom-optimization dbus gmp-autoupdate hwaccel jemalloc > > pgo pulseaudio startup-notification system-libvpx -bindist -debug -hardened > > -jack (-neon) -nsplugin (-selinux) (-system-cairo) -system-harfbuzz > > -system-icu -system-jpeg -system-libevent -system-sqlite -test -wifi" > > ABI_X86="(64)" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs > > -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES > > -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu > > -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr > > -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq > > -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" > > CFLAGS="-march=native -pipe" > > CXXFLAGS="-march=native -pipe -fno-delete-null-pointer-checks > > -fno-lifetime-dse -fno-schedule-insns2" > > LDFLAGS="-Wl,-O1 -Wl,--as-needed > > -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags" > > GCC 7 or GCC 6 ?; Since with GCC 7 the FF ebuild currently uses -O2 instead > of -Os in the first pass; > > Perhaps also try with system-harfbuzz since that is also responsible for > text shaping and is one of the differences between my configuration yours. Yeah, I'm on GCC 6.3.0. It looks like it's related to GCC6 and -Os. Thanks, Sarnex *** Bug 625242 has been marked as a duplicate of this bug. *** Fixed on GCC 6.4 (In reply to Nick Sarnie from comment #16) > Fixed on GCC 6.4 Sorry, this is NOT fixed on GCC 6.4. I had the above user patch still. *** Bug 627286 has been marked as a duplicate of this bug. *** *** Bug 627140 has been marked as a duplicate of this bug. *** (In reply to Nick Sarnie from comment #14) > (In reply to Sven B. from comment #11) > > (In reply to Nick Sarnie from comment #10) > > > > > > Same issue with that patch. > > > > > > www-client/firefox-54.0.1::gentoo was built with the following: > > > USE="custom-cflags custom-optimization dbus gmp-autoupdate hwaccel jemalloc > > > pgo pulseaudio startup-notification system-libvpx -bindist -debug -hardened > > > -jack (-neon) -nsplugin (-selinux) (-system-cairo) -system-harfbuzz > > > -system-icu -system-jpeg -system-libevent -system-sqlite -test -wifi" > > > ABI_X86="(64)" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs > > > -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES > > > -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu > > > -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr > > > -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq > > > -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" > > > CFLAGS="-march=native -pipe" > > > CXXFLAGS="-march=native -pipe -fno-delete-null-pointer-checks > > > -fno-lifetime-dse -fno-schedule-insns2" > > > LDFLAGS="-Wl,-O1 -Wl,--as-needed > > > -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags" > > > > GCC 7 or GCC 6 ?; Since with GCC 7 the FF ebuild currently uses -O2 instead > > of -Os in the first pass; > > > > Perhaps also try with system-harfbuzz since that is also responsible for > > text shaping and is one of the differences between my configuration yours. > > Yeah, I'm on GCC 6.3.0. It looks like it's related to GCC6 and -Os. > > Thanks, > Sarnex I am not sure, I have the similard issue with GCC 5.4 (see bug 627286) Created attachment 488268 [details, diff]
ff55 pgo gcc7 patch
The definition of GetShapedWord was changed with ff55, it seems gcc 5.4/pgo now triggers the bug as well.
I'm hitting this with firefox-55.0 and pgo useflag, but with stable keywords. So gcc-5.4.0-r3 as compiler, not gcc-6. these are my useflags www-client/firefox-55.0::gentoo [52.3.0::gentoo] USE="custom-cflags custom-optimization dbus hwaccel pgo* system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite -bindist -debug -gmp-autoupdate -hardened -jack (-neon) -nsplugin% -pulseaudio (-selinux) -startup-notification (-system-cairo) {-test} -wifi (-gtk2%*) (-jemalloc%*) (-rust%)" *** Bug 627352 has been marked as a duplicate of this bug. *** (In reply to Sven B. from comment #21) > Created attachment 488268 [details, diff] [details, diff] > ff55 pgo gcc7 patch > > The definition of GetShapedWord was changed with ff55, it seems gcc 5.4/pgo > now triggers the bug as well. I could reproduce that bug in 2 different machines. In both machines I'm using GCC 5.4 (migrated from GCC 4.9) and I can compile <=firefox-54, but not firefox-55. I applied the patch provided in comment #21 in one of the affected machines and it worked like charm. I'll apply the same patch to the other machine and I'll let you know if it also worked. Thank you for your time. I'm happy to confirm that the patch provided in the comment #21 worked for me in the two affected machines. Thank you for your time :). I still experience the text corruption reported earlier when using the patch from #21. I can't reproduce the font corruption in any of the both machines. There's no corruption like that: https://i.abcdn.co/ff54%20gcc6.3%20patch%20test.png Looking at your emerge --info, it seems that you have an ATI. I'm using an NVIDIA with private drivers in the both machines. Could the font corruption bug be related with your graphic card or something like that? I'm also using firefox-55 compiled with GCC 5.4 (and the provided patch) and plasma5. Hope it helps. Created attachment 488384 [details]
screenshot of fonts
This is what it looks like with the patch from #617690#c21
So no font corruption. I can provide emerge --info on request.
@Nick, @Armitage, @tt_1 With what USE flags is your firefox built? This issue may be related to USE=system-cairo. Do you mean the absence of system-cairo? I don't really understand what you mean because this useflag is masked, hence deactivated. I posted my useflags in comment #22 (In reply to Andrew Savchenko from comment #29) > @Nick, @Armitage, @tt_1 > With what USE flags is your firefox built? This issue may be related to > USE=system-cairo. Hi Andrew, Those are the use flags and the cflags that I used: www-client/firefox-55.0::gentoo was built with the following: USE="dbus gmp-autoupdate hwaccel pgo startup-notification -bindist -custom-cflags -custom-optimization -debug -hardened -jack (-neon) -nsplugin -pulseaudio (-selinux) (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite -test -wifi" ABI_X86="(64)" L10N="es-ES -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" CFLAGS="-march=corei7 -pipe" CXXFLAGS="-march=corei7 -pipe" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags" Let me know if you need some extra information and I'll post it. That's out of topic, but I would like to mention it. After a few hours using the new firefox-55, I experienced a much better performance than in older versions of firefox. It could be because of 3 reasons: 1.- A really good job by the FF team. 2.- The use flag jemalloc is disabled now, and I allways compiled FF with jemalloc. A few years ago jemalloc had a better performance than glibc, but maybe it's not true today a day. I'll search for a good benchmark in order to check it out. 3.- When I had the compilation problems, my first thought was that the problem was that a few months ago I moved from GCC 4.9 to GCC 5.4, so I recompiled all the packages that FF depends on in order to be sure that all the dependencies were also compiled with GCC 5.4. While I was descriving the point 3, I had an idea which could help. @Nick have you moved your GCC version from an older version? Is your system entirely compiled with GCC 6.3? If you moved from an older GCC version, maybe you could try recompiling all the FF dependencies with the new GCC version since there could be something broken. In order to recompile all the FF dependencies you could use that command: emerge -ave firefox. It will take a while (in my case I had to recompile more than 400 packages) but it could help. Regards. Well for me: gcc-5.4 + patch = works gcc-6.4.0/6.3.0 + patch = garbled fonts (forcing -O2 doesn't change anything either so likely no -Os issue) gcc-7.1 + patch = works Hi guys, Thanks for the ideas. I don't think it's related to graphics. I am using GCC 6.4 now, and every package was built with GCC 6.3 previously, so I think it's not related to upgrading GCC either (don't think ABI/API was broken in this update). My USE flags are below. I have a feeling it's an issue with GCC 6.x only and no 5.x and 7.x. Sven and I likely have the same issue. Let me know if you have any ideas. www-client/firefox-55.0::gentoo was built with the following: USE="custom-cflags custom-optimization dbus gmp-autoupdate hwaccel pulseaudio startup-notification system-libvpx -bindist -debug -hardened -jack (-neon) -nsplugin -pgo (-selinux) (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-sqlite -test -wifi" ABI_X86="(64)" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" *** Bug 627820 has been marked as a duplicate of this bug. *** I applied the patch from here: https://bugs.gentoo.org/show_bug.cgi?id=627820#c11 and firefox-55.0 built fine for me with gcc 6.4.0 and PGO enabled. # mkdir -p /etc/portage/patches/www-client/firefox # curl https://hg.mozilla.org/mozilla-central/raw-rev/97dae871389b > /etc/portage/patches/www-client/firefox/GetShapedWord.patch # emerge firefox (In reply to Alec Meyers from comment #35) > I applied the patch from here: > > https://bugs.gentoo.org/show_bug.cgi?id=627820#c11 > > and firefox-55.0 built fine for me with gcc 6.4.0 and PGO enabled. > > # mkdir -p /etc/portage/patches/www-client/firefox > # curl https://hg.mozilla.org/mozilla-central/raw-rev/97dae871389b > > /etc/portage/patches/www-client/firefox/GetShapedWord.patch > # emerge firefox I still experience the text corruption with that patch. Maybe it's because I have +custom-cflags and +custom-optimization. I can't test it today though. I built mine with these flags and no corruption with AMDGPU. [ebuild R ] www-client/firefox-55.0::gentoo USE="dbus hwaccel pgo pulseaudio startup-notification system-harfbuzz system-icu system-jpeg system-libevent system-libvpx -bindist -custom-cflags -custom-optimization -debug -gmp-autoupdate -hardened -jack (-neon) -nsplugin (-selinux) (-system-cairo) -system-sqlite {-test} -wifi" L10N="-... *** Bug 627874 has been marked as a duplicate of this bug. *** (In reply to Alec Meyers from comment #37) > I built mine with these flags and no corruption with AMDGPU. > > [ebuild R ] www-client/firefox-55.0::gentoo USE="dbus hwaccel pgo > pulseaudio startup-notification system-harfbuzz system-icu system-jpeg > system-libevent system-libvpx -bindist -custom-cflags -custom-optimization > -debug -gmp-autoupdate -hardened -jack (-neon) -nsplugin (-selinux) > (-system-cairo) -system-sqlite {-test} -wifi" L10N="-... What about your GCC version? Is it a GCC 6.x? 55.0.1 is now in the tree. If you are experiencing font corruption please open a new bug report. *** Bug 633640 has been marked as a duplicate of this bug. *** |