Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445128 - mail-client/{firefox,thunderbird}-10.0.1{0,1} - gcc 4.7.x / POSIX compliance
Summary: mail-client/{firefox,thunderbird}-10.0.1{0,1} - gcc 4.7.x / POSIX compliance
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-11-28 23:09 UTC by Daniel Santos
Modified: 2012-12-11 21:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix (thunderbird-gcc4.7_posix.patch,1.79 KB, text/plain)
2012-11-28 23:09 UTC, Daniel Santos
Details
composite patch from upstream (thunderbird-gcc4.7_posix.patch,1.95 KB, patch)
2012-11-28 23:42 UTC, Daniel Santos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Santos 2012-11-28 23:09:44 UTC
Created attachment 330864 [details]
fix

Sources under comm-esr10/mozilla/ipc/chromium/src/base are expecting some includes that they shouldn't, should be including <unistd.h>, causes build breakage on gcc 4.7.x, where the inclusion of unistd.h in some other headers is fixed. (C specifications says that compiler/libc may include other headers, but that you shouldn't depend upon those -- don't remember the exact section of spec)

/tmp/portage/mail-client/thunderbird-10.0.10/work/comm-esr10/mozilla/ipc/chromium/src/base/file_util.cc: In function 'bool file_util::TruncateFile(FILE*)':
/tmp/portage/mail-client/thunderbird-10.0.10/work/comm-esr10/mozilla/ipc/chromium/src/base/file_util.cc:228:35: error: 'ftruncate' was not declared in this scope
make[6]: *** [file_util.o] Error 1
Comment 1 Daniel Santos 2012-11-28 23:14:06 UTC
Related upstream bug (attached patch in link below doesn't fix all of it however):

https://bugzilla.mozilla.org/show_bug.cgi?id=706724
Comment 2 Daniel Santos 2012-11-28 23:16:13 UTC
Oh, actually the patch below is a more portable fix for file_util.cc:

https://bugzilla.mozilla.org/attachment.cgi?id=580642
Comment 3 Daniel Santos 2012-11-28 23:42:04 UTC
Created attachment 330868 [details, diff]
composite patch from upstream

OK, here we go. There is a separate bug report that addresses the other three files, so here are both of the upstream bugs: 

https://bugzilla.mozilla.org/show_bug.cgi?id=706724
https://bugzilla.mozilla.org/show_bug.cgi?id=725655

I've grabbed the patches from upstream and combined them.  It would be good to cherry-pick these into 10.0.10-r1 or some such.
Comment 4 Daniel Santos 2012-11-28 23:49:00 UTC
hmm, same problem with firefox-10.0.10.  Note that these are the versions which are stable on amd64 (I haven't tried the ~amd64 versions currently in the tree)
Comment 5 Daniel Santos 2012-11-29 00:00:35 UTC
Sorry for the multiple comments.  But I've confirmed that this problem also exists in firefox & thunderbird versions 10.0.11.  Thus, probably good to backport patch to all four (unless 10.0.11 is going stable very soon).
Comment 6 Jory A. Pratt gentoo-dev 2012-11-29 01:03:19 UTC
version 17 is next esr release, it will be stable long before gcc-4.7 is marked stable.
Comment 7 Daniel Santos 2012-11-29 19:24:47 UTC
Well, incidentally, I've had very few problems building my system with gcc 4.7.  I guess my philosophies don't match up with Gentoo's very closely.  I feel that when a fix for "unsupported" interoperability (in this case, gcc 4.7) is easy and somebody wants to do it, that it's worth it integrate the fixes, but not to try to fix all such scenarios (obviously, that will never end) and implement some type of cut-off when complexity of such a fix rises to a certain level. *sigh* Oh well
Comment 8 Ian Stakenvicius (RETIRED) gentoo-dev 2012-11-29 21:47:28 UTC
it's just a bit of a lost cause, because #1 we apply stuffs after upstream at least ACKs on it, and #2 FF17 is imminent (and for that matter is already "old news" upstream).

We're trying to prep FF17 et. al. so that it can be ready and stabilized asap, to get not only this but all the other goodies too.

If FF17 was months away, then certainly this effort would be considered.
Comment 9 Daniel Santos 2012-12-11 21:25:43 UTC
(In reply to comment #8)
ahh, that makes sense.  I guess I walk into this by mixing stable & unstable flags, but after working on some code who's performance was critical and closely examining the output of various versions of gcc, I really wanted to rebuild my system with gcc 4.7 (lots of goodies), so it's my fault, even though I blame you. ;)

On a side note, of the 1500-ish packages I have installed, only about 5 or 6 of them had gcc 4.7-related build breakages (including firefox & thunderbird) a few of which were fixed with the unstable keyword. But I've sworn off ever running a fully unstable system again, I did it for four years that that's enough for me :)

thanks for the reply!