HEADS UP: shared library bump, symbol2007年05月10日 11時53分02秒

FreeBSD current-mailing list に HEADS UP: shared library bump, symbol との内容が投稿された。

Sometime this coming weekend (May 11-13), I'll be committing the following patch:
http://people.freebsd.org/~deischen/symver/bump_symver.diffs.050207
次の週末に、以下のパッチがコミットされる。

What does this do?

o All library versions that haven't already been bumped and that are not new to 7.0 will be bumped.

7.0 でバージョンが上げられていない全てのライブラリのバージョンが上げられる。

o Symbol versioning will be enabled by default. This means that for those libraries which are symbol versioned (libc, libelf, libpthread, librt, libthr, libthr_db, and msun) we will have to support all public interfaces as our ABI from this point forward. Compatibility is now maintained in the library itself, not in a separate compat library and by bumping shared library versions. You can disable symbol versioning by setting NO_SYMVER.
シンボルにバージョンが付けられる。これ二より、全ての公開 ABI は後方互換となる。今までは、別に compat_lib を提供していたが、これからは各ライブラリ内で提供される。

o The default threading library is changed from libpthread to libthr. libthr remains installed as libthr, libpthread is installed as libkse, and libpthread will link to libthr by default. Compiling with -pthread will continue to work as before. You can override the default library by setting DEFAULT_THREAD_LIBRARY=libpthread or libc_r before a buildworld/installworld.
       /lib/libthr.so.3
       /usr/lib/libpthread.a -> libthr.a
       /usr/lib/libpthread.so -> libthr.so
       /usr/lib/libpthread_p.a -> libthr_p.a
       /usr/lib/libthr.a
       /usr/lib/libthr.so -> /lib/libthr.so.3
       /usr/lib/libthr_p.a
       /usr/lib/libkse.a
       /usr/lib/libkse.so -> libkse.so.3
       /usr/lib/libkse.so.3
       /usr/lib/libkse_p.a
デフォルトのスレッドライブラリが、libpthread から libthr に変更される。libthr は libthr のまま。libpthread は libkse と変更される。libpthread は libthr のリンクへと変更される。この設定は DEFAULT_THREAD_LIBRARY を設定することで、書き換える事ができる。

How does this affect ports?

Kris ran a package build with this patch, and there were a few problems, mostly because x11-toolkits/xview/patch-lib+libxview+textsw+txt_again.c patches xview to use __svfscanf() which is an internal libc function (it should probably use vfscanf). A few ports broke because they required xview. Some ports did not break, but they used some symbols exported from libc that are private and not part of the ABI. These ports are not clean with respect to our ABI and should be changed if possible.

全ての ports を作り直したところ、__scfscanf などの libc の内部関数を直接呼んでいるものが、失敗していた。これらは、修正されるべき問題だ。

Some of my notes on symbol versioning are here:

http://people.freebsd.org/~deischen/symver/library_versioning.txt

and better technical references are Ulrich Drepper's notes or Sun's document:

http://people.redhat.com/~drepper/symbol-versioning
http://www.sun.com/software/solaris/programs/abi/documentation/solaris-abi.pdf
シンボルのバージョン付けに関してはこちらから詳しい資料が手に入る。