Sunday, January 28, 2007

Compiling Firefox

After a week of struggle, I finally gave up on compiling the Firefox 2 source tree with Visual C++ 2005 Express Edition. I used to use VC6 to compile the source, but since I now have a Core 2 Duo machine on hand, I wanted to see the differences on using SSE2 etc optimization options. But unfortunately, 2005EE is not the official tools for Firefox 2 and I can't get it to compile.

So yesterday I turned to try the Firefox trunk source, which is the Firefox 3. There were some compiling issues to solve (e.g. can't use the official branding option as the resource manager can't compile the icon). Eventually, I got the source compiled! But then the big problem came: the browser would crash just after rendering a page.

At first I thought it has to do with the compiler options (need to admit that I was quite aggressive on using O2, arch:SSE2 etc options :P). But after 10+ hours of tweaking and re-compiling, the problem still won't go away.

This morning, I noticed that the browser crash has something to do with the gkgfxthebes.dll library. Since Thebes is the C++ wrapper for Cairo, I tried to tweak the options for the default toolkits. And suddenly the browser worked without problem. But then, when I tried to remove the tweaking and re-compile, the browser still works! So I guess the crash was caused by programming bugs and someone just fixed them last night... orz

Anyway, will now try various optimization parameters...


PS. Currently I am using this .mozconfig. Can really feel the rendering speed improved when using SSE2.

. $topsrcdir/browser/config/mozconfig

ac_add_options --enable-optimize="-O2 -arch:SSE2 -EHsc -GLT"

ac_add_options --disable-debug
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --disable-tests
mk_add_options MOZ_CO_PROJECT=browser

ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-xpconnect-idispatch
ac_add_options --disable-accessibility

Hyderabad Day 14 (Jan 28, 2007)

今朝起身之後見冇咩好做,於是出去附近行下。之前一直都係向「出城」方向行,今日試下向另一個方向走。

沿馬路行左十幾分鐘,一路行一路食塵同廢氣,所見只係一d舊樓同小雜貨店,都冇咩特別。之後見到有條好似係街市既橫街,於是就入去睇下。


首先係有d唔知係咪宗教野既廣播


條街都(相對地)有唔少野賣。有菜喇


有雞喇。唔知點解要用火燒下d皮呢?去毛?




仲有魚同羊肉添




本來都想買d野番去烹下,但係現場實在太多蒼蠅係到飛來飛去,攪到我都冇咩胃口(其實係懶得烹至真:P)。

亂行一輪之後就沿條馬路另一邊打回道府。奇怪地呢邊馬路有唔少野睇。

Chinese Fast Food Centre……個名係咪好 grand 呢。其實只係……


呢檔有條好大既魚,仲要係識郁既添。個小朋友係到不停向條魚撥水玩。



好多西瓜呀!


巴士站一角。


係印度街上唔少得既牛牛


運貨中



*          *          *         


夜晚本來想搵阿 resident manager 幫手叫 Pizza Hut,但佢原來出左城。佢個工人好好心咁摷左張 flyer 出黎。可惜個電話唔通… 可能張野太舊喇,間鋪已經搬鬼左。之後佢又好熱情咁話不如幫我係附近叫雞……飯外賣。我見黎左咁耐都未試過食痾……死就死喇!個飯廿分鐘後送到,睇落都ok。125盧比,係呢到黎講都唔算平。



Wednesday, January 24, 2007

Hyderabad Day 10 (Jan 24, 2007)

搖呀搖,搖呀搖。

印度人有個習慣同我地好唔同,就係當佢地表示 ok 或者明白時,佢地係用搖頭表示,而唔係我地慣常既點頭。我成日同佢地講野,我一路講佢地就一路搖,攪到我第一個反應係「你唔係咁都唔明呀?!」……成日都要再諗諗先知佢地係表示明白…… orz

*      *      *      


我係印度既其中一樣工作就係解釋香港方面 prepare 左既一 d 文件。但係我一條友要對十幾廿個印度同事,一日至少都要講幾個鐘。我個位通常都好似睇街症咁,會有人排隊等問野。今日發現把聲開始沙…… 兼講野有 d 印度口音……

*      *      *      


今日個 apartment 黎多左個印度住客,不過佢話只係住一晚炸喎。

*      *      *      


阿發哥:我仲未搵到你想買個隻油。不過係番工途中見到呢個街招,唔知你o岩唔o岩洗。有冇需要我幫你 make 個 appointment?

Sunday, January 21, 2007

Hyderabad Day 6 (Jan 20 , 2007)

今朝晨早流流八點幾就醒鬼左…唔通係陌生環境之下d腎上線素標升,個人唔洗訓咁多?

起身第一件事係check下部 notebook 個 Platform SDK 裝完未。事關難得有部 core 2 duo 係手,想試下用 Visual Studio Express 2005黎compile Firefox…可惜攪左個幾鐘頭都唔掂。睇黎要用d唔 official support 既方法 compile Firefox 都有d難度。

係第一晚由 Hyderabad 機場坐車去我住果到時,路經一個商場叫 Hyderabad Central。d印度同事話係呢到黎講呢個算係大商場。於事乎決定今日由鄉下出城去睇睇。

近十點時走出 apartment complex。先行幾步路,去Satyam前拍個照。跟住就開始搵部auto出城。


搵到第一部auto,但係個後生仔司機唔多曉我講咩…算!繼續一路行一路搵車。

行多十幾廿米,截到第二部車。呢個司機肯去 Hyderabad Central,但唔肯用咪錶。一開口就話要一百盧比(大概廿蚊港幣)。我心諗,其實我都唔知落錶去通常係幾錢,但睇你多數都係「掠」我,於事殺佢價:五十啦。佢當然唔肯。講左一輪都唔肯減,於是我唔鬼理佢。有的是時間,繼續行。佢好攪笑,開住部車係我側邊係咁叫「hundred! hundred!」

係呢個時候,有第三部車剷過黎(佢真係剷,唔係講笑)想搶生意。第二部車個司機即刻轉口話八十盧比。我諗呢過時候佢出價都唔會太離譜掛(其實攪咁耐只係差個五蚊港幣 orz)。於是乎上車出發。事後回程時證實,用咪錶的話,八十盧比係差唔多。不過呢個係後話。

一早預左程車唔慌舒服,事關d路好爛。但原來最難頂係d廢氣。條馬路又多車,d氣油又唔慌係高質同無鉛。所以撘完程車之後,成身衫褲由咖喱味變左做廢氣味……


十點半左右到達 Hyderabad Central,不過未開門。唯有沿住條街亂行一陣。行行下見到有座唔知係咪醫院既物體,就走入去兜個圈。見好多人係草地上面坐/訓,唔知係等睇病定係等探病?順帶一提,之前係香港打疫苗時,個醫生話如果大吉利是我要係印度入醫院,記住要去 Apollo Hospital 喎。




兜完個圈出番黎,沿原路番到去商場時,發現已經開左門。

入到去,發覺個格局似百貨公司多d,而個面積仲細過裕華。不過係呢到黎講個環境算係企理,似足西式店鋪。

行左一輪之後有d肚餓,於是跑落去地下間 Pizza Hut 食 lunch。黎左差唔多一個禮拜,終於第一餐唔洗食咖喱或者辣野。叫左客蒜蓉包,細chicken supreme pizza,加支水。埋單 220 盧比(大概四十幾港幣)。


之後係隔離個超市到買左d微波爐餐,就離開個商場,開始我個漫長既歸家之路。

係商場門口有好多auto。今次懶醒,搵個司機肯用咪錶既先上,諗住實掂,點知仲大鍋!

首先,開左車先發現個司機好似完全唔識路,連 Hi-tec City 同 Kondapur 係邊都唔知。Hyderabad 之所以叫印度第二個矽谷,就係因為 Hi-tec City 入面 d 外國 IT 公司,基本上 local 人冇可能唔識。所以我覺得佢係玩野兜路。而 Kondapur 係我住果區,離 Hi-tec City 幾分鐘車程(呢到d街係冇門牌既。所以只可以用地標做目的地……呢樣野係 resident manager 話我知既)。

頭十分鐘車程,佢不停係到講「traffic jam!」跟住又摷張警察證出黎,我唔知佢係想話自己係 part-time 警察定係俾人炒之前係做警察(我希望係後者……)行左十幾分鐘,佢竟然可以兜番去我上車個商場對面!我於是大聲同佢講「Kondapur!」

跟住,個司機每逢見到隔離條行車線有 auto,就大叫「Hi-Tec City! Kondapur!」問路。一塞車,佢就直情係馬路中心熄匙,然落車行過隔離線問路。

玩左大半個鐘,終於都番到我住果到。個咪錶 show 八十三個幾,於是乎俾左八十五蚊個司機。點知佢話之前塞車,叫我俾多d。正常情況之下,我呢類「多一事不如少一事」既人多數會就咁「科水」就算數。但之前俾佢玩左咁耐,條氣實左唔多順。於是乎我同佢就企係到開始講數。

講左幾分鐘,跟住有個「食蕉」哥哥走過黎一齊講,但都係講唔掂。之後「食蕉」哥哥又拉左個路過既住客加入。過左幾分鐘,又有個好好人既妹妹仔走過黎一齊講,之後佢仲搵左佢阿哥join。係呢個時候阿「食蕉」哥哥索性坐上部auto果司機位睇我地繼續講。

係我地成村人講多幾分鐘,d英文同印度話亂飛一輪之後,我個 resident manager 路過加入。我之前話佢有d大佬feel,係唔同d。佢只係用左分幾鐘,用印度話狂轟個司機一輪,個司機就死死氣轉身開車走。而我係散埸同多謝成村人之後亦都上樓抖下。

之後其實發覺我係黎印度之前都冇咩做過 research。於是上台灣個背包攻略 site 睇睇,先發現原來有少有用野。例如飲食指南觀光指南等等。個印度 forum仲有唔少人分享經驗添。其中我強烈推介印度騙術大觀…睇完真係學唔到野都俾佢笑死!

PS. 夜晚個餐係 resident manager 個度食。甜品係一樣叫 Kheer 既野。阿 RM 話呢樣係印度傳統甜品,通常係印度婚禮都有得食。佢仲話呢個甜品好有營養,如果我食足一個月,包我會有佢咁大隻喎…… orz

Monday, January 15, 2007

Hyderabad Day 1

今日又再次証實左我成日話自己「係邊都訓得著」既一番話並唔係吹水既。今朝一覺訓到天光, 要手機 alarm 響先醒,仲好訓過係屋企。

照例起身沖涼,沖沖下先發現死火!事關個電熱水爐唔多掂,沖到半路居然冇熱水。仲要唔知係咪朝早多人用電,試過有兩下停電十幾秒。最後唯有做一樣我好耐冇做既野:沖凍水涼!得個廿度到炸,陰公!

之後係屋入面行黎行去,等印度同事黎接我。俾我發現左間屋一樣得意野… 不過呢d小事遲d有時間先講。

上午set 機,見下其他同事,開下會咁,好快就過。午餐跟同事去 canteen,佢請。食印度野(廢話)。我跟佢一樣食 veg。有簿餅,用咖喱薯仔同唔知咖喱咩送… ok lar。 30 盧比(大概6蚊港紙)想點?

下午答左幾個印度同事問題,同香港開下 phone conference,覆下mail,忙下忙下又放工喇。個印度同事又好好人咁車我去買糧水。番到住個到竟然條匙開唔到度門!攪左一輪都開唔到,抱住幾升水跑落樓問 secure 哥哥,又聽唔明我講咩。最後 call 屋主。好彩佢原來就住係樓下。佢一上黎,兩三下手勢就開左度門。原來度門要一路轉匙一路拉住某到先開到……

最後要介紹既係聽過好多次,但係我從未試過既 —— 印度即食麵!! 咁又攪掂夜晚個餐喇。




PS. 唔洗驚,d 壹週係響香港機場買既