Loud ramblings of a Software Artisan

Monday 23 October 2006

Why you can't run MacOS X on a standard PC

A question I hear often is "why can't I run MacOS X on a PC?" "But Darwin is Open Source, people can make it run on a standard PC?", etc.

It won't! Read about binary protection or how Apple do build into the system a protection system for key binaries of the system.

You don't get that with Free Software.

+1: Informative

Thursday 14 September 2006

gcc 4.0 on MacOS X 10.3?

Dear Lazyweb,

I need something more recent and less broken than gcc-3.3 on MacOS X 10.3.9[1]. Apple is (un-)kind enough to no provide updated compiler. Their latest development tools always need the latest OS. I don't care of the bells and whistles, all I need is a C++ compiler (with Objective-C++ support).

So let's start being hardcore.

From the DevToolsAugust2006 release, I downloaded gcc-5363 that contains gcc-4.0.1. It did build fine (almost). I actually need to re-run the install using sudo prior really installing. See the README.Apple.

Then I grabbed gcc_select-58 to select gcc-4 as a default. Worked fine.

But I'm missing the libstdc++. That is where I'm lost. There is libstdcxx-11 and libstdcxx_SUPanWheat-10. Both fail as they insist on configuring for Darwin 8 (10.4). WTF? I found no way to override that.

Anybody has a clue?

Update 09/15: I found out how to build it, but I just discovered that I needed a new linker because once again Apple decided to change the command-line options of the linker, like they changed XCode at each and every release. Off course the linker does not build on a stock 10.3.9 as it miss some headers. *sigh*


[1] no, don't tell me to install 10.4 it is not an option

Sunday 2 October 2005

Welcome Open Office, seriously.

Welcome Open Office, seriously. Welcome to what? Welcome to the world of native applications on MacOS X. I'm glad to see that you saw the light, that you realised that for your users, you had to get rid of X11 on MacOS X, because they deserve it.

When I started the AbiWord port on MacOS X back in 2001 (I bought that PowerBook G3/400 for that sole purpose), it was because I believed that the GTK based port of AbiWord runing on X11 wouldn't be a gift to our users. The experience showed that integration is really important. Freedesktop.org has been created in order to allow desktop interoperability between KDE and GNOME (and other X based free desktop software), because developer realised that runing an application designed for one desktop one another desktop was a much better user experience if it did integrate properly. That is also that same reason why some distributions insist on having a UI theme that is the same on both GTK and Qt, to make this difference even less obvious, to blends the frontiers.

I'm proud to see Sun finally realising that we all were in the right. And that announcement of abandoning X11 and going on with Cocoa is the right thing to do. Good luck for that, but at least you have some people paidmotivated to do it, unlike AbiWord. And do yourself a favor, don't use Java.

Update (2005/10/03): apparently I was mistaken. The Mac port is not sponsored by anyone. Even more "good luck".

Tuesday 20 September 2005

Apple closing XML file format?

Tim Bray point out that Apple release the documentation for developer around iWork, their office software suite including Keynote 2, the presentation software and Pages, the DTP/word processing software.

The documentation states:

This document does not describe the complete XML schema for either Pages 1.x or Keynote 2.x. The complete XML schema for both applications is not available and will not be made public.

Wow. I love so much openness. Keynote 1.0 had an open format, but not Keynote 2.0. OK it is XML so more readable than binary files, but it is still lot of work to reverse engineer.

That remind me when I requested Apple the AppleWorks file format documentation. The reason why they didn't want to provide it is "we don't want people to write buggy documents that would crash our software", which is the opposite from Macromedia about flash b.s. (read on, I got it as a comment).

Now people brought the debate in the mailing list. Apple product manager reply is awesome:

We're not trying to sell iWork to CIOs and government agencies that are pursuing long-term document archival strategies a la Office XML. We're selling it to consumers and creative professionals who want Apple's legendary ease-of-use and innovation.

So because you are not a fortune 500 or a government you are not allowed to recover your data later? So much for the lost manuscript of some famous (to be) author (Jules Verne for example whose manuscript written in the 19th centure was found and publish in the mid 90's of the 20th century), etc.

Sorry Apple, but you are making yourself ridiculous. Even more than Microsoft, because in that case you don't have a de-facto monopoly associated to a vendor lock in.

Wednesday 14 September 2005

Hidden API for MacOS X

As I mentionned before, Apple released WebKit as an open source project. WebKit is much more than WebCore, as it also contains all the MacOS X specific rendering code for the HTML engine that is KHTML. I was enjoying to have a look at the code as it would should me how to achieve a fast text renderer on MacOS X like I need for AbiWord (currently, AbiWord text renderer is really buggy on MacOS X).

So I took a deep breath and dug into the code. I'm getting depressed.

First it looks like there is not one true way to render text as they have 2 methods to draw text with 2 different cases that they determine with shouldUseATSU() based on the content of the text run. From what I can say (comments are really sparse), it depends of the Unicode chars to be rendered. But they have a switch back when alwaysUseATSU is set to YES that makes ATSU being used all the time. I wonder if Safari doesn't set it all the time using the "private API". But why? Is using CoreGraphics directly way faster but much more limited? That what I'll try to figure out.

At one point I thought about using CoreGraphics, but in 10.2, the API do not allow to draw non ASCII char, or you have to get CGGlyph, which seems to be uneasy, and the font selection does not seems to be doable from a Cocoa NSFont as there is not method to get a CGFontRef from a NSFont. All the searches on google point to an undocumented method from NSFont, but as always, avoid that is it might break in future releases.

So I had a look at WebKit, and they use WKGetCGFontFromNSFont. Perfect. I look closely and realise that this function is in a damn libWebKitSystemInterface.a binary ! Yes. No API for a much needed feature, and when Apple's open source code actually need it, it is in a damn closed binary library...

Now getting the metrics fast. Same thing. Private function in the binary library.

Why can't Apple release this APIs ? Question about how to do that has been asked for years on various mailing list with Apple engineer always responding the same B.S.. With this they demonstrate that these APIs are usefull, so why do they have to be kept secret? I can't use a binary library like that for AbiWord.

I filed bug 4257530 for that, without any hope.

And years ago, there was an attempt of a lawsuit to Microsoft for the use of unpublished Windows APIs to stiffle the one bit of competition they can't stand for...

Wednesday 7 September 2005

The AbiWord font bug

I have been working on bug 6616 today, bug that involve a problem with font metrics. Here is the visual problem:

You see that Times is drawn under the font baseline, on the descent line. I have checked the code, and the metrics returned, everything seems to be normal, as prove the line that are drawn. Weird.

Positive side #1: I found a huge bug that does not seems to have had a huge consequence: AbiWord graphics code draw strings with the Y origin on top of the bounding box, while Cocoa does it on the baseline. Update Sept 12th, 2005: No, this bug above is not a bug. I just misread the documentation

Positive side #2: I started to look at WebKit source code. Exactly what I wanted, I should have looked at it sooner: they have a complete text rendered, and since it is fast, it is worth looking at. But looking at hit gives me some head aches. Wow it is really damn complicated (the code is nice and readable however). Something that upset me is the hack involving "Times" and "Times New Roman" fonts with this comment (WebTextRenderer.m):

// Special case hack to use "Times New Roman" in place of "Times".  "Times RO" is a common font
// whose family name is "Times".  It overrides the normal "Times" family font.  It also
// appears to have a corrupt regular variant.

Does that mean that Times is corrupted?

Saturday 18 June 2005

Liar, Liar

What ? Steve Jobs claims that the Pentium is faster after claiming that the PowerPC was faster ?

The link says it all

Wednesday 15 June 2005

Annoying XCode

XCode is really annoying me. I think I'll switch back to autoconf for building AbiWord on MacOS X. At least I will have the flexibility I need.

Friday 10 June 2005


I feel like completely demotivated by Apple and MacOS X. First they make barely possible to support older OS release with newer hardware. Then I realize that lot of core APIs are only available in newer OS release, like CoreGraphics. I'm not talking about new features, but APIs of existing things.

But then some people, including some Apple engineers, come and say "why do you want to support AbiWord on 10.2 while the current version is 10.4 ?".

  • First I don't have 10.4 because I don't have that much money to throw into an OS upgrade. And despite having had that machine in February, I haven't had any discount offer to upgrade. Not really incentive.
  • Second, I'm not alone, there are a lot of people that still use 10.2 or even before. I'd love to support 10.1, but technically it is not possible. 10.2 however is OK, API-wise. Then come the problem of building for 10.2. We have older fink, that work for the dependencies, but when you try to use the SDK for 10.2 as XCode allow, then you are out of luck as it fails (see bug 8971).
  • Third, I don't want to sponsor the upgrade push made by Apple towards MacOS X.

Some Anynoymous Coward also proposed the "compatibility lab" from Apple. Sure thing, if he want to pay for the access and the trip, because the closest location is Cupertino, California, and one need be ADC Select of ADC Premier member to access, or to get an asset from someone else (see info page). Remember, AbiWord is run by volunteers. But that is slightly overkill as all I need is a machine to load 10.2. Someone else suggested PearPC, I must say I tried that, but it was no fast on my PIII 1GHz.

Perhaps should I just follow Ulrich Drepper advice and focus on Linux (and GNOME) instead of trying to satisfy a minority. Yes, for me MacOS X become a minority. Its users seems to not care at all about Free Software, and its developers are not into the philosophy as we haven't had any developer on AbiWord beside FJF and I (and I must note one simple patch I got once from someone else). With Apple not helping, because they consider you have to pay big bucks to be a developer, as the ADC Online does provide virtually nothing, it is not encouraging.

So now what shall I do ? Continue the 2 Mac centric project I'm working on: AbiWord and Gtk for MacOS X ? Pass on and focus on other GNOME centric code ? I don't know. Perhaps I'm just having a moment of grumpiness. I was happy to see Apple releasing WebCore, but the more I think, the more I suspect it to be a smoke screen to appease developers, as nothing towards providing help to support open source project has been done, at least in the case of AbiWord, and given the state of OpenOffice, they probably don't care (but since Sun is behind I can eventually get the reason).

I see some objections like "Apple ported FireFox to Intel". Sure thing, they needed a demo and a major application for that purpose, so they couldn't have a better candidate than a big open source application that runs on Mac. They could have selection AbiWord, but it is not that popular, and in fact I don't care. It is all smoke and mirrors.

And like my rant is not finished, there are some people that ask me to drop my work on the port of Gtk on MacOS X because they want to do it. I'm just about to commit what I have done in GNOME CVS for sharing... that's what I prefer.

No AbiWord 2.3.1 for MacOS X

Due to a bad change in the cross-platform code, there won't be a 2.3.1 build for MacOS X of AbiWord. 2.3.1 is schedule for today.

Nothing to see, move along.

PS: Apple, you are really nice with your developers, not allowing them to use an older OS release on more recent hardware. I can't install 10.2 to debug AbiWord on 10.2 because it does not work on MacMini.

Thursday 9 June 2005

Intel & Apple ?

Robert X Cringely speculate in his latest column about a possible Apple / Intel merger. He actually has good arguments even if everything looks like pure speculation. If that file, we can still try to sell GNOME and other free operating systems as a replacement for Intel strategy.

Worth reading even to have a good laugh.

(I planned to post this before Slashdot did, but the post went to oblivion as I probably close the tab before saving)

Tuesday 7 June 2005

Apple vs KHTML, last words

Apple did what I wouldn't believe: opening WebKit, not just the source. They is even a bug reporter based on Bugzilla, and they provide the source of the WebKit, the part that was not open sourced before.

Thank you Apple!

Source: David Hyatt

Monday 6 June 2005

The dark side ?

I think I'm having a good laugh. I don't know if it is because they had the gun pointed to the head or just that everybody, including me, said it wouldn't happen, but Apple decided to switch to Intel processors. They'll deliver SDK to developers starting today (but USD$999), and plan to finish transition by the end of 2007. The other funny thing is that they'll provide Intel C/C++ compiler (what about Objective-C) perhaps to avoid having Microsoft using the GNU C Compiler and have people make fun of them with that :-) Let's hope they didn't drop GCC at the same time.

So what about free software with that ? It is clear that open source project can show reactivity by providing Intel builds of their software as soon as they can, unlike proprietary vendors that may take some time (remember how long it took for Adobe to provide Photoshop native on PPC ?).

How long before Linux run on this hardware ? I suspect you'll be able to have Intel based hardware with a decent firmware, but don't expect it to be cheap. And don't expect to be able to run MacOS X on the same PC as you can run Windows. I myself am happy to have made the choice of GNU/Linux and GNOME.

Tuesday 17 May 2005

AbiWord 2.3.0

AbiWord 2.3.0 has been released a last week. It is the first development version for our upcoming 2.4.0 release.

There won't be a MacOS X build for that release. Wait for 2.3.1 as we have been lagging behind a bit.

Friday 13 May 2005

Jabber and MacOS X

As I told in an earlier post, MacOS X 10.4 aka Tiger feature Jabber compatibilty in iChat. I found the Jabber FAQ on MacOS X Tiger for those who want to make the switch. I'd really love to see the Mac users switcher over to Jabber.

Note that you don't need MacOS X 10.4 to connect to Jabber. There are a lot of Jabber client on Mac.