Gentoo Archives: gentoo-user

From: Grant <emailgrant@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] firefox-9.0 won't compile
Date: Mon, 06 Feb 2012 18:09:33
Message-Id: CAN0CFw1Wht5LX+8YszChb1+njo=K=-rU2y1BoENdom-141rF8w@mail.gmail.com
In Reply to: Re: [gentoo-user] firefox-9.0 won't compile by Corentin RIVOT
1 > At first glance firefox uses the arithmetic pointer and Wno-pointer-arith
2 > lifts warnings or errors when used.
3 > This is what gcc says : error: pointer of type 'void *' used in arithmetic
4 >
5 > What it gives without this flag and Is there a particular reason for using
6 > this one ?
7
8 I'm having trouble following. I'm using:
9
10 CFLAGS="-march=native -O2 -pipe"
11
12 Should I try with different flags?
13
14 - Grant
15
16
17 >> >> Does anyone have any ideas on this?  I just completed an emerge -e
18 >> >> world so I don't think anything needs to be re-emerged.  Everything
19 >> >> compiles fine except for gcc-4.5.3-r1 (I'm on gcc-4.3.4) and
20 >> >> firefox-9.0:
21 >> >>
22 >> >>
23 >> >> /var/tmp/portage/www-client/firefox-9.0/work/mozilla-release/js/src/jsgcchunk.cpp:
24 >> >> In function 'void* MapAlignedPages(size_t, size_t)':
25 >> >>
26 >> >> /var/tmp/portage/www-client/firefox-9.0/work/mozilla-release/js/src/jsgcchunk.cpp:243:
27 >> >> error: pointer of type 'void *' used in arithmetic
28 >> >>
29 >> >> /var/tmp/portage/www-client/firefox-9.0/work/mozilla-release/js/src/jsgcchunk.cpp:243:
30 >> >> error: pointer of type 'void *' used in arithmetic
31 >> >
32 >> > That looks like a change in how the compiler treats bad code, or the
33 >> > introduction of bad code in an updated version of Firefox. The
34 >> > compiler can't sanely do pointer arithmetic without knowing the
35 >> > pointer type. Looks like the version you're compiling with throws an
36 >> > error on that.
37 >> >
38 >> > Are using anything like -Werror and/or -Wall in your CFLAGS?
39 >> >
40 >> >
41 >> >
42 >> >
43 >>
44 >> Yes, enabling --Wno-pointer-arith should help.
45 >>
46 >> Regards,
47 >> Florian Philipp

Replies

Subject Author
Re: [gentoo-user] firefox-9.0 won't compile Corentin RIVOT <nutsinutsy@×××××.com>