также см. старую страницу scribe_first_overview
Заворачиваем Scribe в deb-пакет, на ubuntu 12.04 precise
scribe на github’е https://github.com/facebook/scribe
компиляция scribe на ubuntu 12.04 http://ycavatars.blogspot.com/2012/05/build-scribe-on-ubuntu-1204.html
На https://github.com/facebook/scribe/downloads дают архив с версией 2.2, но она не собирается, поэтому будем брать свежие исходники прямо из git’а.
> mkdir building_scribe
> cd building_scribe
> pwd
/home/lena-san/building_scribe
> git clone https://github.com/facebook/scribe.git
> ls
scribe
Если оставить как есть – в perl-пакете получаеются кривые пути (/usr/usr
), как вариант – можно в configure сразу же исправить PERL_PREFIX="/usr/local"
на PERL_PREFIX="/"
> pwd
/home/lena-san/building_scribe
> mv scribe scribe-2.2.1
> cd scribe-2.2.1
> pwd
/home/lena-san/building_scribe/scribe-2.2.1
> ./bootstrap.sh
> dh_make --single --createorig
> ls debian
changelog copyright emacsen-remove.ex manpage.1.ex menu.ex preinst.ex README.source scribe.default.ex watch.ex
compat docs emacsen-startup.ex manpage.sgml.ex postinst.ex prerm.ex rules scribe.doc-base.EX
control emacsen-install.ex init.d.ex manpage.xml.ex postrm.ex README.Debian scribe.cron.d.ex source
> echo '\n\noverride_dh_auto_configure:\n\tdh_auto_configure -- --with-thriftpath=/usr --with-fb303path=/usr CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DBOOST_FILESYSTEM_VERSION=2" LIBS="-lboost_system -lboost_filesystem"\n' >> debian/rules
> perl -pi -e 's/^(Build-Depends:.*)$/$1, libevent-dev, libboost1.46-dev, libboost-system1.46-dev, libboost-filesystem1.46-dev, thrift-compiler, libthrift-dev, fb303, python-dev, fb303/' debian/control
> dpkg-buildpackage -S -us -uc
> ls ..
scribe-2.2.1 scribe_2.2.1-1.debian.tar.gz scribe_2.2.1-1.dsc scribe_2.2.1-1_source.changes scribe_2.2.1.orig.tar.gz
> cd ..
> pwd
/home/lena-san/building_scribe
> ~/bin/pbuilder-precise build scribe_2.2.1-1.dsc
> ls ~/pbuilder/result/scribe_2.2.1*
/home/lena-san/pbuilder/result/scribe_2.2.1-1_amd64.changes
/home/lena-san/pbuilder/result/scribe_2.2.1-1_amd64.deb
/home/lena-san/pbuilder/result/scribe_2.2.1-1.debian.tar.gz
/home/lena-san/pbuilder/result/scribe_2.2.1-1.dsc
/home/lena-san/pbuilder/result/scribe_2.2.1.orig.tar.gz
Может понадобиться установить $PYTHONPATH
:
export PYTHONPATH='/usr/lib/python2.7/site-packages'
версия boost::filesystem
error: ‘class boost::filesystem3::directory_entry’ has no member named ‘filename’
Некоторые советуют брать более раннюю версию libboost: http://groups.google.com/group/scribe-server/browse_thread/thread/016083b3519a0485/d4f815576abfbb1a
I've success builded Scribe after I got this problem too. The core
problem is Boost changes it's filesystem module version from v2 to v3.
Before v1.46, it set filesystem2 by default, v1.46 is using
filesystem3 by default. Current Scribe only work with filesystem2. So
make sure you have only one Boost lib in your environment, remove
another like v1.33 install by yum, v1.46 in /usr/local/lib, cause
Scribe's build script will add some default path into gcc's libpath,
maybe you Scribe using wrong Boost lib.
My environment are:
CentOS 5.5
Boost 1.45.0
Thrift 0.5.0
fb303 r1084109
Scribe 2.2
Но лучше явно указать нужную версию: CPPFLAGS="-DBOOST_FILESYSTEM_VERSION=2"