Friday, January 25, 2013

Don't throw tomatoes ... but there's an Intel version

UPDATE: to whomever posted this to root86, do us all a favour and either link this post or the IntelBuild wiki page. It's uncool to offer an unsupported product without comment and not allow people to read about the support level first. I really don't want to get people complaining down the road if this port goes off the rails. Fix your link, please.

Remember in 1997 how Bill Gates appeared at Macworld with Steve-O and got booed because the enemy was now within the gates? Well, this is like that.

At least one of you has discovered the work of our newest contributor Claudio, who contributed patches in issue 204 for enabling TenFourFox 17 to build on Intel 10.4. This is a common question I get ("why is TenFourFox not universal? why doesn't it work on my MacBook?"), so Claudio has graciously consented to handling the Intel fork for the moment. Beforehand, however, let's get a few things straight:

  • PowerPC remains the primary architecture of development for TenFourFox. The Intel version is a sideline maintained by an interested contributor. This is, as Apple says about AppleTV, a "hobby." The Intel version will never delay the PowerPC version, which is the primary focus of development, nor will unnecessary limitations required for an Intel build be applied to a PowerPC build (we have enough of our own limitations to worry about), nor will it be offered on the main page for the foreseeable future.
  • If you own an Intel Mac running 10.4 or 10.5, your best option is still to upgrade to at least 10.6 and run real honest-to-JWZ Firefox. This is only for those people who for some reason can't or won't upgrade, and understand the risks of staying with 10.4 or 10.5 (which are much higher in practice than the risks to Power Mac users with the same versions).
  • I don't build the Intel version (I have a single solitary 10.6 Intel Mac); Claudio builds it himself. I haven't even tried running it yet, but the patches look good.
  • The Intel version, as well as trying to run the PowerPC version under Rosetta, is unsupported. Let me say that again. The Intel version, as well as trying to run the PowerPC version under Rosetta, is unsupported. Do not report bugs to Tenderapp. You may report them to the Google Code project (as you may for unstable releases), but bugs reported to the Google Code project are under the same limitations: you must test them under Firefox on a Tier-1 architecture before you make any report to demonstrate the bug is not Mozilla's or the bug will be marked invalid. And, even if you do report it, the Intel fork is not release quality. It's an experiment. Bugs, even major ones, may not be repaired quickly or at all, and releases may not be timely. If you want a real release quality Firefox on Intel, do yourself a favour and upgrade to 10.6.
  • The Intel version may cease development at any time. Right now it works with 17. We have not tried getting 19 to compile, though it probably will, but you shouldn't assume that nor that there will be even another ESR release of the browser. There. Is. No. Support.

The long and short: don't make me or Claudio regret offering this, okay? If you are expecting the same level of quality or service you get from Firefox or from mainline PowerPC TenFourFox, do not download this browser.

Having scared the entitled cheapskates off to OmniWeb, those of you in this very, very, very small demographic can get the download link and a refresher course on the very many limitations attached to it from the "official" Intel build Wiki page.

Back on regular development, 19 has had a lot of display and graphics issues, as expected. The good news is most of these will be corrected. More on that as the final release approaches.

Sunday, January 13, 2013

TenFourFox 19 beta: Judgment Day

COMING TO A POWER MAC NEAR YOU
RATED PG-19 FOR A PRETTY GOOD PORT OF 19 BETA

Yes, it's Judgment Day, and we've been judged absolutely righteous. Mozillanet has exterminated all 10.4 and 10.5 computers from the earth web, but the resistance has sent their computers forward in time with the use of advanced compiler technology to save 21st-century humanity from Intel-based hunter killers and Tim Cook drones. Excuse me, there's a police officer at the front door who bears a strange resemblance to Robert Patrick. I'll be back.

And I'm out of desperate Terminator jokes, so here's TenFourFox 19. Our personal "judgment day" was the end of 10.5 support in Firefox, officially in 16 (but 10.5 code was kept by arrangement in 17 so we could reenable it in the ESR), and the need to upgrade our compiler toolchain to a later gcc/bintools due to unacceptable hacks needed to get gcc 4.0.1 to work. Our compiler adventures were already excessively documented in this august publication, and the rest of the work was upgrading our build system to handle the new compiler and build independent binaries, and lastly finding and restoring the code Mozilla deleted or changed for the new 10.6 baseline. So now you have it in front of you to try.

This port was the opportunity to pay off much of our accumulated technical debt. The compiler upgrade alone allows us access to better PowerPC code generation and optimizations, and it also allowed me to jettison many of the gcc 4.0.1 compiler hacks that hampered portability. Because of improvements in the standard libraries also available in gcc 4.6.3, we now carry our own copies of libgcc and libstdc++ instead of using the system ones and the internal js, firefox, XUL and dylibs are all linked against it to make a self-contained package. Tobias already worked out most of this for AuroraFox, which uses a later gcc as well, although it required some tweaking for current MacPorts and 10.4. However, binaries are not significantly larger since the new linker we are using is also more efficient. My original fears about memory bloat do not appear to have been realized, either, so we are probably still okay with a 512MB RAM supported minimum. (Users at this minimum should test and report in.) Builders should note that our HowToBuildNow document now has a new section for our 19+ releases.

The new hotness has been pretty thoroughly tested on both G4 arches and G5 on 10.4, but I don't have any G3 systems running 10.4 currently, and I don't run 10.5. Leopard users and G3 users, I am particularly interested in feedback.

The biggest change between 17 and 19 is the introduction of what Mozilla refers to as "display-list based invalidation," or DLBI. Introduced first in 18, it is a deceptively simple optimization that forces the layout engine to be more exacting about what it needs to have redrawn in an effort to reduce pushing unnecessary pixels around. DLBI does not make things faster, per se (and there are some edge cases where it will make performance worse), but it does make things smoother. As an example, compare my favourite even-handed American politics site, RealClear Politics, in 17.0.2 and 19b1. After you've vomited reading articles opposed to your personal views, at the top right is a marquee with arrows to go right and left. Try scrolling through them. It's not necessarily faster, but it looks a lot nicer. Another site that shows better animation is one that had me chagrined in 17, local radio station KFI AM 640. On some sites, this almost completely erases the performance loss from the layers change introduced way back between Fx3.6 and Fx4. Because we are nearly entirely rendered in software, anything that involves pushing less pixels means better performance and better animation. DLBI is that.

A large change like DLBI also means massive regression risk. In 18, Mozilla fixed quite a few of these and I expect many more. If you find a rendering difference between 19 and 17.0.2 on a site, it is imperative you do a test on a Tier 1 official Firefox build (with hardware acceleration off) to see if it occurs there too. If it does, report it to Mozilla; it's not our bug. I am sure we will have lots of regressions unrelated to this, so I really want people to not clog up the worklist with upstream problems. Remember, please do not file issues on unstable builds on Tenderapp to avoid confusing regular end users on the stable branch. And before you ask, it is not possible to backport DLBI to 17. Sorry.

19's most ballyhooed change, however, is disabled in our build: the JavaScript PDF viewer. PDF.js actually has been part of Firefox for some time, but this is the first time it is being user-exposed by default. However, it's a poorer renderer than Preview.app or (natch) Adobe Acrobat, it's a much slower renderer (its speed is at best tolerable on this quad G5), and there's some argument from security guyz on whether it's even a safer renderer. PDF rendering is going to be the next frontier for Power Mac porting, and I'm looking at updating Vindaloo to see if this can be a future means to safely handle PDF files on PowerPC, but that's another story (and it won't be integrated with the browser in any case). You can go into about:config and turn the JavaScript PDF viewer back on, and some of you already have, but I have no plans to ship that as default until the speed improves.

18 and 19 also offer rudimentary WebRTC. I need to explore this more to see if it's feasible to use on Power Macs, but given that our AltiVec WebM is really only an option for high-end G4s and G5s and we don't have any AltiVec code of any sort in WebRTC, I don't have a lot of confidence that it's going to be worth porting. Right now, it is turned off at the compiler level.

Locally, we also have some improvements of our own specific to PowerPC OS X. In addition to the same faster font enumeration code added to 17.0.2, our version of 19 also offers AltiVec-accelerated blurring and shadowing thanks to Tobias' work in issue 189. This further improves display and scrolling performance especially on pages that blur or box-shadow the entire background, requiring the CPU to do a lot more compositing work. Don't worry, G3 owners; you may not have AltiVec, but you do have a better C-language version handling the blurring/shadows for you too.

For QTE users, the QTE didn't seem to work right with 19 aurora, but seems to be okay with 19 beta (though with some errors in the console). I'm tracking this closely for now.

The biggest announcement of all, however, is that Firefox 19 is now being offered to Android handset owners with ARMv6 CPUs as "slow" as 600MHz with as "little" as 512MB of RAM. Read that carefully. Does that remind you of any particular systems on some other RISC-based platform abandoned by its manufacturer? The fact that Mozilla is now concentrating on lower-spec devices (not just for Boot2Gecko but for flagship Firefox Android) means that they will be continuing to audit for and seek performance wins in Gecko, and a lot of this will be in cross-platform code that will in turn improve performance in desktop Firefox and in TenFourFox. And that, as they say, is a Good Sign.

The T-1000 has turned itself into my cat and is busily reprogramming my security system, so you'd better get the build from the Downloads tab (and read the Release Notes) while you still can. Hasta la vista, baby.

Sunday, January 6, 2013

17.0.2 RC available and that Turkdistrust thing

The build process for 17.0.2 was an unmitigated disaster all the way around, including a serious bug I introduced in one of the local patches and then a flubbed copy around 1am this morning which I discovered later had tanked the G5 and 7450 builds. Usually I have the RCs out on the Saturday prior to the Tuesday release day, but it just didn't work out that way this time around. Anyway, you can now get them from the Downloads tab and check out the release notes. This will go out on time Monday evening as usual.

This version fixes Safari bookmark importing (a Mozilla bug not uplifted to ESR), tracked as issue 194, and also revamps font scanning (issue 195). Previously, users with large numbers of fonts could have a pause of 10-20 seconds or more when the browser's character map cache was invalidated and a page with non-Latin characters was being processed (it was almost instant after the cache was filled, fortunately, but the cache is routinely invalidated in case new fonts have been loaded). Mozilla's old ATS code was actually pulling a whole font table off disk every time just to see if that table even existed (and then throwing it away!); they've moved on to CoreText-only support now that they only support 10.6 and ATS is deprecated, so they never fixed the inefficiency. So, this version loads the font table directory only and caches it, so that queries hit the directory cached in memory and this change speeds up font enumeration by about four times. Large font systems will still have a delay, but it will be much less. There is also a wallpaper fix in for malware URL validation, another Mozilla bug (tracked as issue 197).

Among the security updates in this release, it is worth mentioning the Turktrust intermediate certificate issue, which is also fixed for Classilla users as part of 9.3.2 which I released today. Intermediate and subordinate certificates have been at the heart of some of our worst SSL certificate debacles in recent memory because they explicitly delegate signing authority from a root CA to a third party that may be entirely untrustworthy. Worse, you will never be warned certificates signed by such an intermediate were not issued by a root because their trust chain directly connects them to the root from which the intermediate comes. After the DigiNotar and Comodo disasters, we've already made it clear what to do with certificate authorities who maintain inadequate security and let attackers freely generate these malicious subordinates: kill them with fire, castrate them, and subject them to Vogon poetry (oh yes, and forever tar those intermediates and the ultimately tainted root certificates as untrusted). However, Turktrust is different: the intermediate certificates seem to have been released out of what looks like sheer incompetency, and one of those intermediates was already used to construct a man-in-the-middle certificate for Google for an internal firewall in a Turkish governmental agency.

The argument is whether this merits the same kind of punishment that technical and security failure does, and my assertion is, unequivocally, yes. Administrative incompetence has the same damaging outcome as technical incompetence, viz., the further erosion of trust in the security of SSL and the risk of impersonation, and CAs with faulty internal practice should be just as subject to browser revocation and removal of their root as those who screw up technically. There can be no room for error when people's banking, money, identity and livelihoods are at stake, and the only way to make CAs participate in quality improvement is to make the penalty of failure severe, particularly if the CA already does not have a QI process (in fairness to Turktrust, they did self report the issue when it was internally discovered). Unfortunately, this won't happen that time either. Google, Mozilla and Microsoft have only rejected the particular root used to sign the intermediates, though Google also removed Turktrust from their EV certificates as an additional punishment, but as far as I'm concerned they should be completely excised. To maintain parity with Firefox, however, I have grudgingly decided to keep their other roots in for the moment while discussion about the larger problem of rogue intermediates goes on in the background.

Once 19 migrates to beta, I will apply the 19 changesets there and there will be a 19 beta. There will also need to be a new QTE based on a different jetpack due to internal changes between 17 and 19, though I will try to keep one QTE that works on both versions if possible. Hopefully I should release 19b1 sometime next week.

Thursday, December 27, 2012

Holiday brewskis for 10.4

Merry two-days-after-Christmas and Happy Holidays. If you were a good little boy-or-girl-or-thing, I hope Santa-Father Christmas-the folks-the person you are blackmailing brought you many nice things. If you were not a good little boy-or-girl-or-thing, bituminous is lovely in the fireplace.

The compiler upgrade is all but complete, and there will be build system changes to match starting with 19. I am strongly considering a formal beta for 19 to make sure we catch all of the widget changes and find any 10.4-specific bugs, as well as the standard 19 unstable release.

I have been made aware by its creator, Misty DeMeo, of "Tigerbrew," a Homebrew port to PowerPC Tiger (our favourite operating system). For those unfamiliar, Homebrew is one of the newest and increasingly popular package managers for Mac OS X (even Mozilla has started using it), but it has historically required 10.5 and I have heard of issues with it on Power Macs, both problems of which hopefully Tigerbrew will mitigate as it matures. While we are ordinarily a MacPorts shop and our workflow mostly revolves around it, Homebrew definitely has some nice features and a Tiger version only increases our choices for maintaining our software (besides, of course, good old standards like Fink, which David Fang still maintains TenFourFox as a package for). You can read more about it at its Github, or, to jump in the water, ruby -e "$(curl -fsSkL raw.github.com/mistydemeo/tigerbrew/go)"

Also, just for your amusement (please don't comment on the bug, this is just for chuckles), enjoy this bug report that we all sympathize with.

Thursday, December 20, 2012

SDLMAME builders and other ldx3 users: switch to ld64

I note in this forum thread that the indefatigable bunch making SDLMAME builds for PowerPC are also using Tobias' ported Xcode 3 linker (a/k/a ldx3) with gcc 4.0.1, the one we originally offered starting with TenFourFox 5 and still use on the TenFourFox 17 stable branch (the last branch that will use it). It appears they were bitten by the same linker issue we were, based on the crash dump and the size of the binary.

Unfortunately, their forum has a very byzantine way of creating accounts due to spammers, so I'll post it here and hope they and any other users of ldx3 notice: since we're moving to gcc 4.6.3 for 19, we don't need nor will we update ldx3 anymore because a proper 64-bit ld with Tobias' island fix is part of the standard MacPorts gcc46 package "for free." But you can still get that ld separately for other purposes; just port install ld64 to install it by itself (and you can just symlink it to ldx3 if you want to keep your build system the same way), which will work just fine with Apple gcc 4.0.1. We will keep that port up to date so you can keep using it.

Fink and Homebrew users, just apply the patch to Apple's ld 97.17 sources.

PowerPC builders gotta stick together, you know?

Monday, December 17, 2012

タイガーで絵文字を楽しみましょう!Taigaa de emoji o tanoshimimashô! Let's enjoy emoji on Tiger!

Hora, hora! Mochiron, Taigaa de, emoji o shiyô suru koto ga dekimasu ... oh wait, sorry! Let's try that again in English.

Emoji are hot (possibly even, ATSUI? ha ha!) on iOS and Apple introduced an emoji font, complete with little colour smilies, for 10.7. Firefox even supports this font, sort of (there are some bugs in this support and in fact I had to back this out partially because of the secret flawed CoreText in 10.4 which interferes with Mozilla's Cairo-based emoji rendering).

Naturally the good versions of OS X, which is everything before Lion, don't have direct emoji support, let alone those fun little colour icons. However, if you're willing to accept a monochrome non-animated substitute, you can get emoji on your Power Mac, because emoji are really just Unicode characters at their most basic and if you could find a font that had the emoji in the right place in the character map, it would "just work."

Fortunately, there is such a font, and that font is Symbola. It works just fine with OS X, and with TTConverter will probably even work for OS 9 and Classilla. Warning before you install: when you try to do so, Font Book will freak out (correctly), saying the font is missing OpenType information. While it appears to work fine without it on 10.4, installing this font is of course at your own risk. Just unzip the file you get, double click to open it in Font Book for installation, and after installing it (and saying "yes, I don't care if my computer blows up") quit and restart TenFourFox to ensure it recognizes the new font.

Now you can see my cat, instead of a "no character here" box: 😺

Issues 194 and 195 are now fixed, though I'm thinking of even faster ways to enumerate fonts, but this still should cut down on lag with people who have a lot of fonts even in this state. And, since we've just added another font, that should help that much more. Yatta!

Saturday, December 15, 2012

gcc update succeeded! (plus: four heads are better than one)

Our failure upgrading to gcc 4.6.3 in the prior post turned out to be a canary in the coal mine (though in retrospect issue 169 was the first manifestation of the underlying problem) because soon after, Tobias started finding problems in some of his test builds for AuroraFox, and SeaMonkeyPPC wouldn't run at all either. Tobias was able to show that Apple ld had generated a bad branch in the Mozilla megalibrary XUL (which has been an intrinsic part of Firefox and all of our PPC community derivatives including AuroraFox, Tenfourbird and SeaMonkeyPPC since Mozilla 5), and my analysis showed it to be completely out of range. Ben's and my thought was to slim down XUL, but Tobias was able to find the bug in Apple ld to properly handle such large branches, hikerxbiker was able to prove it worked against SeaMonkeyPPC, and this post is, voila, coming to you from a debug build of 19.0a2 on the G5. So TenFourFox lives once more. Tobias has upstreamed this linker fix to MacPorts; our Fink users should make sure they make a similar fix themselves.

This is why it's wonderful to have a community working on continuing the PowerPC OS X Mozilla ports. As an example of what happens when there isn't a community, it looks like the OS/2 port of Firefox, one of the longer running Tier-3 community builds, is running out of gas; they're still stuck on ESR 10 and the lone guy still cranking them out, Dave Yeo, doesn't have a lot of resources to turn to when things go wrong. They're already somewhat compromised in that WOFF downloadable fonts don't work right, so they're not fully Acid3-compliant as it is. I think this is going to happen to a lot of the smaller Tier-3 ports: ourselves and Landry Breuil on the OpenBSD side are about the only ones supporting big-endian hardware (WebKit even took big endian support out of YARR, the regexp library our JavaScript compiler uses, which we had to put back in), we don't see anything much going on with Solaris on SPARC these days, and I'm not sure what the state of Firefox is on the PPC Linuces since a lot of those users have migrated to WebKit-based browsers. It is entirely possible that the OS/2 port will end with Firefox ESR 10. And as an admirer of OS/2 back in the day, that's very sad to see happen.

Fortunately, that won't happen to us, at least not yet. Most of the 10.5 compatibility code has been restored successfully (and backported to 10.4, of course), and I have not found any major bugs in this version except for a strange problem with favicons I'm not able to fully track down yet. Now that we're running on a current compiler for a change, I was able to jettison all the ugly fixes I had to make for gcc 4.0.1 and make our changesets smaller and easier to maintain. When 19 goes into beta I'm going to pull it again and possibly generate some opt builds for people to play with, starting our new unstable branch off right. I'm also going to begin work on our PowerPC IonMonkey port and let's hope we get it done before Mozilla sends JaegerMonkey to that great tracing compiler in the sky. Remember: no plugin support exists at all in 18+.

For the stable branch, we will issue a fix for issue 194, which is a Mozilla bug actually but that doesn't appear is being backported to ESR17, and I'm looking into issue 195 where the check for dud fonts introduced with issue 171 can slow down the browser when it gets run unnecessarily, though this probably won't be fixed in time for 17.0.2, our "Best Commodore 64 Monitor Ever" release.