カテゴリ別 2003年 | 2004年 | 2005年 | 2006年 | 2007年 | 2008年
知り合いサイト: よんだもの / 暴想 / Linuxでやる夫 / 新宿Vipper / 僕だけが幸せになればいいのに。
Berkeley DB XML は、アプリケーションへの組み込みに向いている軽量データベースとして有名な Berkeley DB の姉妹品。データベース板 の XML統合スレッド で話題になっていたので使ってみようかと思ったのですが、結構ビルドが大変です。
Berkeley DB 5.1 以降、Xerces-C 2.3 以降、Pathan 1.2 以降といったライブラリが必要です。Gentoo 標準の ebuild では Xerces-C を pthread 対応でビルドしないので適当に修正したり、Pathan の ebuild を書いたりして、Berkeley DB XML が make できるところまでは行きましたが undefined reference で止まるので一時断念。作業記録を載せておきます。
$ CPPFLAGS="-I/usr/include/db4.2" ../dist/configure --enable-java --enable-tcl --with-tcl=/usr/lib \
--with-berkeleydb=/usr --with-pathan=/ --with-xerces=/usr
..snip..
$ make
..snip..
/bin/sh ./libtool --mode=link g++ -o dbxml_dump dbxml_dump.lo libdbxml-1.2.la \
/usr/lib/libdb_cxx-4.2.la //lib/libpathan.la -L/usr/lib -R/usr/lib -lxerces-c -lpthread
libtool: link: warning: library `//lib/libpathan.la' was moved.
libtool: link: warning: library `//lib/libpathan.la' was moved.
g++ -o .libs/dbxml_dump .libs/dbxml_dump.o ./.libs/libdbxml-1.2.so -L/usr/i686-pc-linux-gnu/bin \
/usr/lib/libdb_cxx-4.2.so //lib/libpathan.so /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so \
-L/usr/lib -lxerces-c -lpthread -Wl,--rpath -Wl,/usr/local/BerkeleyDBXML.1.2/lib \
-Wl,--rpath -Wl,//lib -Wl,--rpath -Wl,/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4 -Wl,--rpath -Wl,/usr/lib
./.libs/libdbxml-1.2.so: undefined reference to `__db_getlong'
./.libs/libdbxml-1.2.so: undefined reference to `__db_prheader'
./.libs/libdbxml-1.2.so: undefined reference to `__db_prfooter'
./.libs/libdbxml-1.2.so: undefined reference to `__db_prdbt'
./.libs/libdbxml-1.2.so: undefined reference to `__db_getulong'
./.libs/libdbxml-1.2.so: undefined reference to `__os_clock'
collect2: ld returned 1 exit status
make: *** [dbxml_dump] Error 1
$ objdump -x .libs/libdbxml-1.2.so | grep __db_getlong
00000000 *UND* 00000000 __db_getlong
本当は USE の threads を見ないといけないのだけど手抜き。
--- /usr/portage/dev-libs/xerces-c/xerces-c-2.6.0.ebuild 2004-10-05 00:58:16.000000000 +0900
+++ /usr/local/portage/dev-libs/xerces-c/xerces-c-2.6.0.ebuild 2004-10-17 03:50:13.000000000 +0900
@@ -21,6 +21,7 @@
src_compile() {
export XERCESCROOT=${S}
cd src/xercesc
+ ./runConfigure -plinux
econf || die
emake -j1 || die
}
ソースのバージョン表記が 1.2-2 と一般的でないのと、xerces-c のソースを必要とするのがややこしい。どうすれば綺麗に書けるんでしょ。/lib にインストールされてしまうのも直したいところ。
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:$
MY_PV="1.2-2"
MY_P=${PN}-${MY_PV}-src
DESCRIPTION="Pathan is an XPath parsing and evaluation module from Decisionsoft for use with the Xerces-C XML parser by The Apache Software Foundation."
HOMEPAGE="http://software.decisionsoft.com/"
SRC_URI="http://software.decisionsoft.com/software/pathan-1.2r2/${MY_P}.tar.gz"
LICENSE="The DecisionSoft Open Source Licence"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND=">=dev-libs/xerces-c-2.3"
S=${WORKDIR}/${PN}-1.2
XERCESC="xerces-c-src_2_6_0"
src_unpack() {
unpack ${A}
cd ${S}
unpack ${XERCESC}.tar.gz
}
src_compile() {
export XERCESCROOT="${S}/${XERCESC}"
econf --prefix=${D} || die
emake -j1 || die
unset XERCESCROOT
}
src_install () {
export XERCESCROOT="${S}/${XERCESC}"
make DESTDIR=${D} install || die
dodoc CREDITS LICENSE.TXT README
dohtml Readme.html
unset XERCESCROOT
}
最近のコメント:
RSS
![]()
This work is licensed under a
Creative Commons License
(note: text only. w/o web design, citations, (re)distributed softwares).