Saturday, July 09, 2005

這個週末真可憐

昨晚又吐得一大胡塗
今天人超不舒服的
一點食慾都沒有
新竹的東西真的有夠難吃的
清淡的虱目魚粥竟然煮得像油膩的皮蛋瘦肉粥
失敗失敗
待會要去游泳了
真棒說
希望等一下不要喝到水
反胃又吐的話
會被小紅褲子罵唷
嗯 BSB的Beautiful Women動感十足 不錯聽說


真的很不喜歡待在電腦前
上班8個小時
連續5天都在上班
週末本來就應該把電腦丟一旁的
不過下禮拜要報告東西
不得已呀
還是乖乖地 K 她一下吧
嘻嘻...

Well, I wanna Quit...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
不行這樣下去了
這樣下去對大家都不好
知道嗎
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
所以我決定了
QUIT THE WINE
喝多了 人會不舒服
最重要的是呀
身材會走樣唷 我覺得
哈哈
對不起老印啦...

Over

Sunday, June 26, 2005

褲子穿不下了...

好可憐唷
我的褲子都穿不下了...
最近不知道為什麼身材變了個樣
不像從前
害得我以前買的褲子都穿不下了

大概是在去玩帛琉之後
那種感覺特別明顯


以前的褲子穿在我身上
會掉下來
變垮褲

呵呵呵
要再買新的唷
嗯...顏色要變一下說.....

Friday, April 29, 2005

The last day of April...

很久沒在這留下任何文章記錄了
看來這應該是這個月的唯一的文章

平日下班後, 除了上網東看西看外, 幾乎不想待在電腦前面, 即使是我最喜歡的 iBook
在公司當整天的窗邊族, 生活實在是非常乏味

什麼是最近做過最有意義的事?
之後的生活是否一樣重覆已往的日子?

...2個只有自己才知道答案的問題...

再過 8 個小時, 就是大學班遊的時候, 終於可以離開這個陌生的城市一陣子

5月中, 出國玩, 期待中...

Enjoy them and Good Luck....

Thursday, March 17, 2005

Yes, The ethereal works in my iBook

Yes, I finally had successfully made the ethereal work now. The Mac OS X in my iBook came with no X11 to me, and now I had the GUI ethereal inside. There are usually two ways to achieve it. The first one is to get the binary file, it means installing the binary file in the Fink package. The second one is to get the source code and compile it and usually comes with lots of troubles and problems to be solved by self.

To deal with X11 in Mac OS X, the fink package is a nice and convenient solution to it. But the flaw is what it gives is more than what you want and lacking of the experience of understanding and interacting with lower layers in Unix-like environment. To get the source code and to compile it is the way the geeks likes to go ahead. But it is fulled with lots of stones waiting to be moved away, such as lacking of some library when configuring another library.

I am so happy to finish it in this two weeks. In the meantime, I almost wanted to give up compiling the GUI ethereal code sometimes. Over here, I post the problems happened to me and my solutions to them.

First of all, download the ethereal source code from the official website, and then to compile it. If without X11 environment, it would complain a lot. My experience is to follow the complaint, and then the solution will be solved, but usually more complaints and problems occur. I think that's OK. Nothing worthy to worry, because starting from scratch always needs more efforts.

pkg-config must be install, because most configure files check the needed packages through it. Such as,

pkg-config --libs gtk+-2.0
pkg-config --clfags gtk+-2.0

pkg-config --list-all

will show the packages installed and pkg-config usually checks the directory /usr/local/lib/pkgconfig, and this directory path is depended during the installing option. Or set PKG_CONFIG_PATH also works.

export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig"

Gtk+2.4
____GLib-2.6.3
________GNU gettext library
____atk
____pango
____fontconfig
________freetype2 library
________expat library
________ft2build.h
____TIFF library (libtiff)
____JPEG library (libjpeg)
____PNG library (libpng)
____xrender (libXrender)
____libX11 (<--I'm not sure if need it or not)
________libXrender
________xproto
________xextensions
________xtrans
________xau

XFree86-4.4.0-src-[1..7].tgz or the same as X11R6.8.2-src.tar.gz is installed.

The libraries hierarchy is simply like above. After installing the libraries, I had some problem like below.

$ otool -L `which gtk-demo.old`
usr/local/bin/gtk-demo.old:
...
/usr/local/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.1.0)
...

$ otool -L `which xlogo`
usr/X11R6/bin/xlogo:
...
/usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0)
...

$ gtk-demo.old
_X11TransOpen: Unable to find transport for local

Gtk-WARNING **: cannot open display


Recompiling Xrender xft pango Xcursor xfixes by linking to /usr/X11R6/lib/libX11.6.dylib

Finally, it appears.

ethereal

otool -L is the ldd program in Darwin.

find . -newer older ! -newer newer,
I used to find some files created between older and newer.

Sunday, March 13, 2005

ethereal part 2

checking Pango flags... -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -L/usr/local/lib -lpangoxft-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv
configure: error:
*** Can't link to Pango. Pango is required to build
*** GTK+. For more information see http://www.pango.org

Writing a pango.modules file to use when running examples before installing Pango.
dyld: /Users/apple/Desktop/Source/gtk/pango-1.8.1/pango/.libs/pango-querymodules version mismatch for library: /usr/X11R6//lib/libfreetype.6.dylib (compatibility version of user: 10.0.0 greater than library's version: 6.3.0)
make[2]: *** [pango.modules] Error 133
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

$otool -L /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib:
/usr/X11R6/lib/libfreetype.6.dylib (compatibility version 6.3.0, current version 6.3.0)
...

$ otool -L ./objs/.libs/libfreetype.dylib
./objs/.libs/libfreetype.dylib:
/usr/local/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.7.0)
...

http://forums.macosxhints.com/archive/index.php/t-27078.html

checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding GTK+ or finding the wrong
*** version of GTK+. If it is not finding GTK+, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location Also, make sure you have run ldconfig if that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying LD_LIBRARY_PATH

$ ls -l /usr/X11R6/lib/libfreetype.*
/usr/X11R6/lib/libfreetype.6.3.7.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.dylib -> libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.a
/usr/X11R6/lib/libfreetype.dylib -> libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.la

$ ls -l /usr/local/lib/libfreetype.*
/usr/local/lib/libfreetype.6.3.7.dylib
/usr/local/lib/libfreetype.6.dylib -> libfreetype.6.3.7.dylib
/usr/local/lib/libfreetype.a
/usr/local/lib/libfreetype.dylib -> libfreetype.6.3.7.dylib
/usr/local/lib/libfreetype.la

$ otool -L /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib:
/usr/X11R6/lib/libfreetype.6.dylib (compatibility version 6.3.0, current version 6.3.0)
...

$ otool -L /usr/local/lib/libfreetype.6.dylib
/usr/local/lib/libfreetype.6.dylib:
/usr/local/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.7.0)
...

# ln -sf /usr/local/lib/libfreetype.6.3.7.dylib /usr/X11R6/lib/libfreetype.6.dylib

$ ls -l /usr/X11R6/lib/libfreetype.*
/usr/X11R6/lib/libfreetype.6.3.7.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.dylib -> /usr/local/lib/libfreetype.6.3.7.dylib

/usr/X11R6/lib/libfreetype.a
/usr/X11R6/lib/libfreetype.dylib -> libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.la

(ethereal:7236): Gtk-WARNING **: cannot open display:

Wednesday, March 02, 2005

The GUI ethereal implement on My iBook

Download ethereal-0.10.9 from the ethereal official website.
Configure it, then get the error messages like below,

Error Message:
checking for pkg-config... no
checking for GTK+ - version >= 2.0.0... no
*** A new enough version of pkg-config was not found.
*** See http://pkgconfig.sourceforge.net
checking for pkg-config... (cached) no
checking for GLIB - version >= 2.0.0... no
*** A new enough version of pkg-config was not found.
*** See http://www.freedesktop.org/software/pkgconfig/
configure: error: GLib2 distribution not found.


I come to download the thing, called pkg-config
Configure and make successfully.
(Remember to su to be root, and pkt-config is located at /usr/local/bin,
so maybe the path should be added into the environment vairable PATH)

/usr/local/bin/pkg-config

Go back to download GLib2, and GTK+ 2.4 by the way
Configure them, and also get the similar error messages

GLib Error output:
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
configure: error:
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

Gtk+ Error Output:
checking for glib-2.0 >= 2.6.0 atk >= 1.0.1 pango >= 1.8.0... Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found

configure: error: Library requirements (glib-2.0 >= 2.6.0 atk >= 1.0.1 pango >= 1.8.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.


...I almost lose my control.

To get the gettext library, then configure, make, and install.
After installing gettext library, the GLib library also can configure, make and install easily.


But for the gtk+, it is NOT a easy work, because it still needs atk and pango softwares.
I think my goal is to build the ethereal, which just need the GLib library enoughly.
So, I finally give up trying to install gtk+.
Back to the ethereal, it is very fine to configure, but I spend lots of time waiting for its compiling.//<--Just the tethereal command-line program can be produced, not GUI ethereal program.

<--------Goback to deal with Gtk+------------>

pango Error Message:
checking for fontconfig >= 1.0.1... Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
configure: WARNING: No fontconfig found, skipping tests for FreeType and Xft
configure: error: *** Didn't find any of FreeType, X11, or Win32.
*** Must have at least one backend to build Pango.

fontconfig Error Message:
checking for freetype-config... no
configure: error: You must have freetype installed; see http://www.freetype.org/

fontconfig Error Message #2:
checking expat.h usability... no
checking expat.h presence... no
checking for expat.h... no
checking xmlparse.h usability... no
checking xmlparse.h presence... no
checking for xmlparse.h... no
configure: error: Cannot find usable expat library. This could mean that your version is too old.


Find expat library to solve the above problem.

fontconfig error message #3:
Christine:~/Desktop/Source/gtk/fontconfig-2.2.99 apple$ make
make all-recursive
Making all in fontconfig
make[2]: Nothing to be done for `all'.
Making all in fc-case
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I.. -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -g -O2 -MT fc-case.o -MD -MP -MF ".deps/fc-case.Tpo" -c -o fc-case.o `test -f 'fc-case.c' || echo './'`fc-case.c; then mv -f ".deps/fc-case.Tpo" ".deps/fc-case.Po"; else rm -f ".deps/fc-case.Tpo"; exit 1; fi
In file included from ../src/fcint.h:39,
from fc-case.c:25:
../fontconfig/fcfreetype.h:27:22: ft2build.h: No such file or directory
../fontconfig/fcfreetype.h:28:10: #include expects "FILENAME" or
In file included from ../src/fcint.h:39,
from fc-case.c:25:
../fontconfig/fcfreetype.h:33: error: parse error before "FcFreeTypeCharIndex"
../fontconfig/fcfreetype.h:33: error: parse error before "face"
../fontconfig/fcfreetype.h:33: warning: type defaults to `int' in declaration of `FcFreeTypeCharIndex'
../fontconfig/fcfreetype.h:33: warning: function declaration isn't a prototype
../fontconfig/fcfreetype.h:33: warning: data definition has no type or storage class
../fontconfig/fcfreetype.h:36: error: parse error before "face"
../fontconfig/fcfreetype.h:36: warning: function declaration isn't a prototype
../fontconfig/fcfreetype.h:39: error: parse error before "face"
../fontconfig/fcfreetype.h:39: warning: function declaration isn't a prototype
../fontconfig/fcfreetype.h:42: error: parse error before "FT_Face"
../fontconfig/fcfreetype.h:42: warning: function declaration isn't a prototype
../fontconfig/fcfreetype.h:45: warning: type defaults to `int' in declaration of `FT_Face'
../fontconfig/fcfreetype.h:45: error: parse error before "f"
../fontconfig/fcfreetype.h:45: warning: function declaration isn't a prototype
In file included from fc-case.c:25:
../src/fcint.h:596: error: parse error before "encoding"
../src/fcint.h:596: warning: function declaration isn't a prototype
make[2]: *** [fc-case.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


The error above is about find no ft2build.h to lead to have no declaration of some types.

freetype2, well, It seems there are some problems of install after compiling successfully.
My experience is
build/unix/configure --prefix=`freetype-config --prefix`
then make install, it becomes ok.

GTK+ error message:
checking for TIFFReadScanline in -ltiff... no
checking for TIFFWriteScanline in -ltiff... no
checking for TIFFFlushData in -ltiff34... no
configure: WARNING: *** TIFF loader will not be built (TIFF library not found) ***
configure: error:
*** Checks for TIFF loader failed. You can build without it by passing
*** --without-libtiff to configure but some programs using GTK+ may
*** not work properly


To get libtiff. Everything of it works ok.

GTK+ error message AGAIN:
checking for jpeg_destroy_decompress in -ljpeg... no
configure: WARNING: *** JPEG loader will not be built (JPEG library not found) ***
configure: error:
*** Checks for JPEG loader failed. You can build without it by passing
*** --without-libjpeg to configure but some programs using GTK+ may
*** not work properly


Get libjpeg from http://www.ijg.org/files/jpegsrc.v6b.tar.gz (not from ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/jpegsr6.zip, it seemed an error in configure file), then configure, but there are still some BIG problems over here.
First, the default configure doesn't produce any dynamic libraries.
Some arguments must be added after configure, such as
./configure --enable-static --enable-shared --host=powerpc-apple-darwin7.8.0
but, after the configure setup above, there is a problem that libtool doesn't exist.
Check the README or INSTALL file to see the reason.
My soultion is copy the libtool from other directoy, such as gtk+/libtool.
Then make and make install successfully.

$ find . -iname "libjpeg.*"
./.libs/libjpeg.62.0.0.dylib
./.libs/libjpeg.62.dylib
./.libs/libjpeg.dylib
./.libs/libjpeg.la
./.libs/libjpeg.lai
./libjpeg.a
./libjpeg.doc
./libjpeg.la



checking for TIFFReadScanline in -ltiff... yes
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking for jpeglib.h... yes
checking for jpeg_simple_progression in -ljpeg... yes
checking for libpng12... no
checking for png_read_info in -lpng... no
configure: WARNING: *** PNG loader will not be built (PNG library not found) ***
configure: WARNING: *** PNG loader will not be built (PNG header file not found) ***
configure: error:
*** Checks for PNG loader failed. You can build without it by passing
*** --without-libpng to configure but many programs using GTK+ will
*** not work properly. The PNG loader is also needed if you are compiling
*** from CVS.


To get libpng, then copy makefile.darwin from scripts/, then make and make install.

GTK+ error messg again:
configure: error: Xft Pango backend is required for x11 target


pkg-config to check all the pc files. (Add sepcific the path of pc to PCK_CONFIG_PATH if needed)
My soultion is modify the makefile, around line #40,
There is a description:
#am__append_2 = pangoxft.pc
Remember to enable this line. It will copy pangoxft.pc to /usr/X11R6/lib/pkgconfig/

checking for X... no
configure: error: X development libraries not found

checking for xrender >= 0.8.2... Package xrender was not found in the pkg-config search path.
Perhaps you should add the directory containing `xrender.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xrender' found
checking for xrender >= 0... Package xrender was not found in the pkg-config search path.
Perhaps you should add the directory containing `xrender.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xrender' found
checking for X... no
checking X11/extensions/Xrender.h usability... no
checking X11/extensions/Xrender.h presence... no
checking for X11/extensions/Xrender.h... no
configure: error: Xrender.h not found.


Get libXrender, then configue...get Error Message:
checking for x11... Package x11 was not found in the pkg-config search path.
Perhaps you should add the directory containing `x11.pc'
to the PKG_CONFIG_PATH environment variable
No package 'x11' found
checking for X... no
configure: error: X is required, but it was either disabled or not found.


Get libX11, then configure...get Error Message:
checking for xproto... Package xproto was not found in the pkg-config search path.
Perhaps you should add the directory containing `xproto.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xproto' found

configure: error: Library requirements (xproto) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.


Get xproto and configure successfully. Something strange is "make install" directly instead of make.

configure libX11, get Error Report:
checking for xextensions xtrans xau... Package xextensions was not found in the pkg-config search path.
Perhaps you should add the directory containing `xextensions.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xextensions' found

configure: error: Library requirements (xextensions xtrans xau) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.


Gett xextensions, and configure successfully.

checking for xextensions xtrans xau... Package xtrans was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtrans.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtrans' found

configure: error: Library requirements (xextensions xtrans xau) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.


I CANNOT find any resource of xtrans, so finally I get the sources from cvs.
Configure xtrans and make install (no make progress).

There is still error message, but I didn't record it. That is about no libXau.
So I get libXau to configure and make, then make install.

Finally, I can configure the libX11 successfully.

It's not ending, there is something waiting to be done.

---
In the meantime, I compile the Nmap-3.81 source code successfully,
but I don't install it into the proper directory.
I just use it in the local directory.
---

Tuesday, March 01, 2005

Think from Automatik

Automatik 是德文機器錶的意思, 德國做的產品都很有質感, 而且給人值得信賴的感覺

錶的價值不能夠單用金錢就可以橫量的, 特別是她代表著上一代所傳承下來的精神象徵, 比如在 Watchbus中的一篇文章:父親的錶

此外一顆名貴的錶也會因為她的主人超乎常人的精神, 而更彰顯出其更不平凡的價值所在, 同樣也是在Watchbus中的一篇文章:腕錶人物:Ernesto Che Guevara 切·格瓦拉

我曾經在民雄的一間錶店, 與店老闆聊了幾回, 也親眼見到 雙P龍頭 的 PP, 據他說那顆 PP 已經有 50 年歷史了, 到現在還是可以正常動作, 我看著那顆錶, 上面充滿了時間所留下痕跡, 就如同他所言, 這顆錶放在街上, 別人也不會知道這就是有名的 PP 呀!同樣地也是在老闆的熱忱下, 見識到 玫瑰金色的 PP 5053 新錶, 她就躺在頗典型的長條錶盒裡, 見到溫暖的玫瑰金色, 頓時覺得好感動...

我不是個專業的, 也不是愛錶成痴的錶迷, 但我願意購買一支出自名家的機械錶, 因為我相信她值得我這麼做, 我也相信我值得擁有她...

Saturday, February 26, 2005

Akawada is good to drink.

嗯, 中文叫做"赤玉紅酒", 真的很好喝...

自從研究所開始喝 Single Malt Whisky 後
再也沒碰過這麼好喝的酒了

檯面上這麼多家紅酒, 白酒, 葡萄酒, 但從來不知道好喝的定義在哪
赤玉紅酒應該可以當作是一種標準
下次再找比赤玉更好喝的紅酒囉

赤玉紅酒長怎樣呢, 酒瓶上有個黃底大太陽的標誌, That's it.

Well, back to add something...
上次春酒帶了瓶 1500ml 的威雀去, (順帶一提那罐 NT.888)
副總竟然指著瓶上的威雀說"這是什麼怪鳥啊"
被打敗了...

Matiss 是研究所學弟推薦的, 算是個人的入門酒啦...

Friday, February 25, 2005

Think the way of Web Server going

Today, I heard it from Daniel, I believed that's the RIGHT answer...

The problems met in the future will NOT be the same as this one I met today.
So where does the answer come from?

Ask myself, What is a web sever? How does she serve, if just a client is considered? And then continue to think of more clients.

Yes, I think that way of thinking is the exactly right answer.

Tuesday, February 15, 2005

燈管也是有壽命的...

人生所謂何事, 為了短短的燈管, 不惜犧牲自己的眼睛...
想想近視愈深, 閃光愈重, 所浪費的, 所失去的, 更甚之...
寫到這裡, 不自覺的把背光開亮一點, 對自己好一點...

最近在用 perl 轉 程式碼 ...
比較輕鬆多了, 不過前置作業很累, 準備動作做完後, 就會輕鬆很多...
同事們真是令人欽佩, 這麼短的時間就把東西做出來了...
相較之下, 我就遜色許多了, 或許選擇的工具不太順手吧
regex 的功力還不到冢呢, 還得一邊寫碼一邊看 Document...sigh...

有好也有壞
好處在於可以趁機學學(摸摸) perl + regex, 這是對我有益(非利)的部分
此外, 碼寫完後, 如果要做一次修改的話, 就會比較快
只要碼再跑過一次就行了 (<--想太多, 只是把結果理想化而已) 但, 就壞在需要時間去寫碼, 特別對我這個新手而言...就輸在這啦... 這有像供給與需求的關係 如果用人工的方法就可以完成, 何必花腦花時間去寫碼呢 但如果非人力所能及, 那麼花點時間去寫碼應該是值得的吧 重點在於"如何取捨" 這也關係到"能力"的問題吧, Well, 寫個碼去把結果跑出來 開玩笑, 能力不夠, 短時間想要解決, 只會搞得二頭空... 要懂得自己的能耐... 最近買了台 iBook, 感覺像挖到寶似地...