Author Topic: GCC 6.1.1 - firefox fails to compile  (Read 611 times)

0 Members and 1 Guest are viewing this topic.

Offline torvic9

  • Sr. Mitglied
  • ****
  • Posts: 253
  • Hello world!
  • Branch: stable
  • Skill: Intermediate
GCC 6.1.1 - firefox fails to compile
« on: 09. May 2016, 20:57:40 »
Since the GCC update to version 6.1.1, I can't compile firefox from source anymore.
I'm probably missing a special flag to prevent this type of errors:
Code: [Select]
Fehler: »malloc« wurde in diesem Gültigkeitsbereich nicht definiert
I tried '-fpermissive' but that doesn't help.

This has already been reported both on Arch bugzilla and upstream: https://bugs.archlinux.org/task/49243
There's also a patch file which works for firefox 46.0.1, but not for 45esr

Edit: we could also try to compile with '-fno-lifetime-dse -fno-delete-null-pointer-checks', although it's better to fix the code.

« Last Edit: 09. May 2016, 21:05:49 by torvic9 »
i3: i7-5820K | 32 GB | GeForce GTX 960, nvidia | linux44-custom
KDE: i7-920 | 12 GB | GeForce GTS 450, nouveau | linux44
Gnome: Thinkpad X200s | linux41

Offline philm

  • Core Team
  • *****
  • Posts: 10671
    • Manjaro Linux
  • Branch: Unstable
  • Desktop: XFCE
  • GPU Card: Geforce GTX 650
  • GPU driver: non-free
  • Kernel: Maintainer - so all ;)
  • Skill: Guru
Re: GCC 6.1.1 - firefox fails to compile
« Reply #1 on: 09. May 2016, 21:12:12 »
Did you already backported these fixes to the 45 series?

Offline torvic9

  • Sr. Mitglied
  • ****
  • Posts: 253
  • Hello world!
  • Branch: stable
  • Skill: Intermediate
Re: GCC 6.1.1 - firefox fails to compile
« Reply #2 on: 09. May 2016, 21:29:07 »
Did you already backported these fixes to the 45 series?
Not knowledgeable enough to do this. It should be enough to change the include lines "math.h" to "cmath", and "stdlib.h" to "cstdlib" if I understand correctly.
Even with the patch, I can't compile FF 46. Let me just try a few more gcc flags.

What's funny is that gcc changelog explicitly mentions Firefox 46: "The size of LTO object files was reduced by about 11% (measured by compiling Firefox 46.0)"
(https://gcc.gnu.org/gcc-6/changes.html)
« Last Edit: 09. May 2016, 21:40:02 by torvic9 »
i3: i7-5820K | 32 GB | GeForce GTX 960, nvidia | linux44-custom
KDE: i7-920 | 12 GB | GeForce GTS 450, nouveau | linux44
Gnome: Thinkpad X200s | linux41

Offline torvic9

  • Sr. Mitglied
  • ****
  • Posts: 253
  • Hello world!
  • Branch: stable
  • Skill: Intermediate
Re: GCC 6.1.1 - firefox fails to compile
« Reply #3 on: 09. May 2016, 22:16:45 »
Okay, the provided patch seems to be enough to compile FF 46.
I accidently still had "-fno-lifetime-dse -fno-delete-null-pointer-checks" in my mozconfig, will try without it tomorrow.
Enough for today as compiling FF takes a lot of time and it heats up my room :)

Edit: here's the patch for FF 45 ESR (I'm not a dev!)

Edit 2: patch removed. It works but doesn't fix all the issues.
« Last Edit: 09. May 2016, 22:58:15 by torvic9 »
i3: i7-5820K | 32 GB | GeForce GTX 960, nvidia | linux44-custom
KDE: i7-920 | 12 GB | GeForce GTS 450, nouveau | linux44
Gnome: Thinkpad X200s | linux41