namazu-dev(ring)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: making a static-linked namazu.cgi simultaneously



Satoru Takabayashi wrote:

>   % make
>   # make install
> 
> を実行して作った namazu コマンドを ~/public_html/namazu.cgi
> などにコピーして CGI として使用すると、libnmz.so の仕様が変
> わったときに動かなくなります。
> 
> # 開発中の libnmz.so は symbol がころころ変わる ;-)

もうtarballをリリースしていることだし、libnmz_la_LDFLAGSの
-version-infoをいじってください。そうすれば、後方互換性の
ために古いshared libraryを残すことができます。

libtool.texiのUpdating library version infomationより

Here are a set of rules to help you update your library version information: 

1.Start with version information of `0:0:0' for each libtool library. 
2.Update the version information only immediately before a public release of your software. More frequent updates are unnecessary, and only guarantee that the current interface number gets larger faster. 
3.If the library source code has changed at all since the last update, then increment revision (`c:r:a' becomes `c:r+1:a'). 
4.If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0. 
5.If any interfaces have been added since the last public release, then increment age. 
6.If any interfaces have been removed since the last public release, then set age to 0. 

current 
The most recent interface number that this library implements. 
revision 
The implementation number of the current interface. 
age
The difference between the newest and oldest interfaces that this library implements. In other words, the library implements all the interface numbers in the range from number current - age to current. 

---ここまで

> 一方、
> 
>   % make LDFLAGS=-static
> 
> と実行すれば、static に libnmz をリンクした namazu コマンド
> を作れます。

$ ./configure --disable-shared
$ make
じゃダメですか?

> p.s.
> 
>   % make CFLAGS='-O2 -pg' LDFLAGS=-static
> 
> を実行すると profiling 用の namazu コマンドを作成できます。

make時に上書きするより、

$ CFLAGS='-02 -pg' ./configure --disable-shared

の方がいいでしょう。


  A A
= . . =
   V
end
Ryuji Abe