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

Bug 617690

Summary: www-client/firefox-53.0[pgo] fails to link on GCC 6.3
Product: Gentoo Linux Reporter: Nick Sarnie <sarnex>
Component: Current packagesAssignee: 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 gentoo-dev 2017-05-07 02:01:02 UTC
Hi,

Firefox 53 with +pgo fails to link on GCC 6.3.0. The lines of interest are

../../gfx/thebes/Unified_cpp_gfx_thebes1.o: In function `gfxTextRun::SetSpaceGlyph(gfxFont*, mozilla::gfx::DrawTarget*, unsigned int, unsigned short) [clone .cold.370]':
Unified_cpp_gfx_thebes1.cpp:(.text.unlikely+0x7bc2): 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/6.3.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/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

The full build log is attached.

Thanks,
Sarnex



Reproducible: Always
Comment 1 Nick Sarnie gentoo-dev 2017-05-07 02:03:36 UTC
Created attachment 471842 [details]
build.log
Comment 2 Dmitry Derevyanko 2017-05-30 08:18:14 UTC
Created attachment 474682 [details]
bzipped build.log

Encountered same error.
Comment 3 Dmitry Derevyanko 2017-05-30 08:19:00 UTC
Created attachment 474684 [details]
emerge --info
Comment 4 Zentoo 2017-05-31 17:56:29 UTC
I got accurately the same behaviour using gcc 6.3.0 and USE=+pgo.
Comment 5 Jonathan Thibault 2017-06-07 20:30:28 UTC
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.
Comment 6 Jonathan Thibault 2017-06-14 03:54:46 UTC
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.
Comment 7 Sven B. 2017-07-10 20:29:16 UTC
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 .
Comment 8 Nick Sarnie gentoo-dev 2017-07-11 01:11:58 UTC
(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.
Comment 9 Sven B. 2017-07-11 14:16:40 UTC
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"
Comment 10 Nick Sarnie gentoo-dev 2017-07-11 23:38:06 UTC
(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"
Comment 11 Sven B. 2017-07-12 07:32:26 UTC
(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.
Comment 12 Andrew Savchenko gentoo-dev 2017-07-12 07:53:52 UTC
(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.
Comment 13 Sven B. 2017-07-12 09:22:07 UTC
(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.
Comment 14 Nick Sarnie gentoo-dev 2017-07-12 20:28:44 UTC
(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
Comment 15 Doppler 2017-07-16 00:33:30 UTC
*** Bug 625242 has been marked as a duplicate of this bug. ***
Comment 16 Nick Sarnie gentoo-dev 2017-08-03 23:25:07 UTC
Fixed on GCC 6.4
Comment 17 Nick Sarnie gentoo-dev 2017-08-04 00:24:21 UTC
(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.
Comment 18 Jory A. Pratt gentoo-dev 2017-08-07 21:30:58 UTC
*** Bug 627286 has been marked as a duplicate of this bug. ***
Comment 19 Jory A. Pratt gentoo-dev 2017-08-07 21:31:39 UTC
*** Bug 627140 has been marked as a duplicate of this bug. ***
Comment 20 Michal Špondr 2017-08-07 21:41:01 UTC
(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)
Comment 21 Sven B. 2017-08-08 08:08:06 UTC
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.
Comment 22 tt_1 2017-08-08 16:52:33 UTC
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%)"
Comment 23 Brian Evans (RETIRED) gentoo-dev 2017-08-08 17:52:22 UTC
*** Bug 627352 has been marked as a duplicate of this bug. ***
Comment 24 Armitage 2017-08-08 21:33:42 UTC
(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.
Comment 25 Armitage 2017-08-08 23:19:08 UTC
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 :).
Comment 26 Nick Sarnie gentoo-dev 2017-08-09 00:41:53 UTC
I still experience the text corruption reported earlier when using the patch from #21.
Comment 27 Armitage 2017-08-09 01:05:33 UTC
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.
Comment 28 tt_1 2017-08-09 09:40:50 UTC
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.
Comment 29 Andrew Savchenko gentoo-dev 2017-08-09 10:20:25 UTC
@Nick, @Armitage, @tt_1
With what USE flags is your firefox built? This issue may be related to USE=system-cairo.
Comment 30 tt_1 2017-08-09 10:24:49 UTC
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
Comment 31 Armitage 2017-08-09 13:51:00 UTC
(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.
Comment 32 Sven B. 2017-08-09 14:13:05 UTC
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
Comment 33 Nick Sarnie gentoo-dev 2017-08-09 22:13:09 UTC
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"
Comment 34 Jory A. Pratt gentoo-dev 2017-08-15 12:31:10 UTC
*** Bug 627820 has been marked as a duplicate of this bug. ***
Comment 35 Alec Meyers 2017-08-16 00:47:25 UTC
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
Comment 36 Nick Sarnie gentoo-dev 2017-08-16 02:18:44 UTC
(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.
Comment 37 Alec Meyers 2017-08-16 11:03:20 UTC
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="-...
Comment 38 Jory A. Pratt gentoo-dev 2017-08-16 13:07:57 UTC
*** Bug 627874 has been marked as a duplicate of this bug. ***
Comment 39 Armitage 2017-08-16 13:13:42 UTC
(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?
Comment 40 Jory A. Pratt gentoo-dev 2017-08-16 13:14:09 UTC
55.0.1 is now in the tree. If you are experiencing font corruption please open a new bug report.
Comment 41 Jory A. Pratt gentoo-dev 2017-10-06 23:54:49 UTC
*** Bug 633640 has been marked as a duplicate of this bug. ***