Warning: file_exists(): open_basedir restriction in effect. File(/srv/http/vhosts/aur.archlinux.org/public/web/locale//en/LC_MESSAGES/aurweb.mo) is not within the allowed path(s): (/srv/http/vhosts/aur-dev.archlinux.org/:/etc/aurweb/) in /srv/http/vhosts/aur-dev.archlinux.org/public/web/lib/streams.php on line 90
AUR (en) - fbthrift

Notice: Undefined variable: name in /srv/http/vhosts/aur-dev.archlinux.org/public/web/lib/pkgfuncs.inc.php on line 248

Package Details: fbthrift 0.31.0-1

Git Clone URL: https://aur-dev.archlinux.org/fbthrift.git (read-only)
Package Base: fbthrift
Description: Facebook's branch of Apache Thrift, including a new C++ server
Upstream URL: https://github.com/facebook/fbthrift
Licenses: Apache
Conflicts: thrift
Provides: thrift
Submitter: dseg
Maintainer: dseg (renanbs)
Last Packager: dseg
Votes: 3
Popularity: 0.003887
First Submitted: 2015-03-24 06:40
Last Updated: 2015-12-27 21:52

Latest Comments

joker512 commented on 2017-01-19 16:05

Error during installation:
...
checking for folly/folly-config.h in /usr... yes
checking whether compiling and linking against folly works... no
configure: Unable to find the folly library.
configure: error: Please install the folly library

folly is installed. I tried all: fb-folly, folly and folly-git. I found a bit more information in config.log:
...
/usr/lib/libfolly.so:·undefined·reference·to·`boost::re_detail_106300::cpp_regex_traits_implementation<char>::transform(char·const*,·char·const*)·const'
/usr/lib/libfolly.so:·undefined·reference·to·`boost::re_detail_106300::cpp_regex_traits_implementation<char>::transform_primary(char·const*,·char·const*)·const'
collect2:·error:·ld·returned·1·exit·status
configure:19042:·$?·=·1
...

It looks like something is incompatible between folly and boost...

dseg commented on 2015-12-27 21:52

Updated to 0.31.0

dseg commented on 2015-12-22 22:56

@renarbs
Thank you very much for the patch!

Well, I have some problem with my ArchLinux build pc so it will takes few days to fix the problem and applying your patch, how about co-maintain this package?

renanbs commented on 2015-12-21 23:49

Actually I made it compile using a tip from an issue on fbthrift: https://github.com/facebook/fbthrift/issues/134

Using version 0.31 I created this patch:
--- GeneratedCodeHelper.h 2015-08-24 17:47:32.000000000 -0300
+++ GeneratedCodeHelper-patched.h 2015-12-21 21:05:49.000000000 -0200
@@ -921,7 +921,7 @@
void process_pmap(
Processor* proc,
const typename GeneratedAsyncProcessor::ProcessMap<
- typename GeneratedAsyncProcessor::ProcessFunc<
+ GeneratedAsyncProcessor::ProcessFunc<
Processor, ProtocolReader>>& pmap,
std::unique_ptr<ResponseChannel::Request> req,
std::unique_ptr<folly::IOBuf> buf,

and changed the PKGBUILD to this:
# Maintainer: Daichi Shinozaki <dsdseg@gmail.com>
pkgname=fbthrift
pkgver=0.31.0
pkgrel=1
pkgdesc="Facebook's branch of Apache Thrift, including a new C++ server"
arch=('i686' 'x86_64')
url="https://github.com/facebook/fbthrift"
license=('Apache')
depends=('folly' 'krb5' 'numactl' 'python2')
conflicts=('thrift')
provides=('thrift')
makedepends=('scons')
options=('!emptydirs' 'staticlibs')
source=("https://github.com/facebook/$pkgname/archive/v${pkgver}.tar.gz"
'BinaryProtocol.h.patch'
'CompactProtocol.h.patch'
'Serializer.h.patch'
'Krb5CredentialsCacheManager.cpp.patch'
'Makefile.am.patch'
'ax_check_folly.m4.patch'
'GeneratedCodeHelper.h.patch'
)
md5sums=('80d180ea65b03c7f68834159ab45a7ae'
'5a410a5ffdd4813f9844c06b37cdd048'
'067b4fc38a9e73cc06bd8d29eeb95c4f'
'ae028ff57127ee3f3c44b5b592b09199'
'bda963346b5171e59bacc0034868fa63'
'23625f87b9b2ef4087f4206c5bbe67a6'
'317dcba3617fe197533cd53b624cef35'
'd9490bce5dca950a5d48798a6fcc1d1c'
)

prepare() {
cd "$pkgname-$pkgver/thrift"
patch -p2 --verbose < $srcdir/BinaryProtocol.h.patch
patch -p2 --verbose < $srcdir/CompactProtocol.h.patch
patch -p2 --verbose < $srcdir/Serializer.h.patch
patch -p2 --verbose < $srcdir/Krb5CredentialsCacheManager.cpp.patch
cd "compiler"
patch -p0 --verbose < $srcdir/Makefile.am.patch
cd ..
cd m4
patch -p0 --verbose < $srcdir/ax_check_folly.m4.patch
cd ..
cd lib/cpp2
patch -p0 --verbose < $srcdir/GeneratedCodeHelper.h.patch
cd ../..

sed -ie '1 s/python/python2/' ./compiler/py/main.py
# ArchLinux system has both libboost_python.so and libboost3_python.so.
# Use python2 for build, so prevent libboost3_python.so to be chosen
sed -i -e 's/libboost_python\*.so\*/libboost_python.so\*/' ./m4/ax_boost_python.m4
autoreconf -ivf
}

build() {
cd "$pkgname-$pkgver/thrift"
PYTHON=/usr/bin/python2 ./configure --prefix=/usr
sed --in-place -e 's/python\( -mthrift_compiler.main\)/python2 \1/g' ./lib/cpp2/Makefile
make
}

#check() {
# cd "$pkgname-$pkgver/$pkgname"
# make check
#}

package() {
cd "$pkgname-$pkgver/thrift"
make \
PY_INSTALL_HOME="$pkgdir/usr" \
PY_INSTALL_ARGS="--root '${pkgdir}' --prefix=/usr" \
DESTDIR="$pkgdir" \
install
}

Can you update this package? :-)

renanbs commented on 2015-11-27 20:00

diff --git a/thrift/m4/ax_check_folly.m4 b/thrift/m4/ax_check_folly.m4
index d2cf1fb..621a052 100644
--- a/thrift/m4/ax_check_folly.m4
+++ b/thrift/m4/ax_check_folly.m4
@@ -36,7 +36,7 @@ AC_DEFUN([AX_CHECK_FOLLY], [

succeeded=no
if test "x$want_folly" = "xyes"; then
- FOLLY_LIBS="-lfolly"
+ FOLLY_LIBS="-lfolly -latomic"
for folly_dir in $folly_searchdirs; do
AC_MSG_CHECKING([for folly/folly-config.h in $folly_dir])
if test -f "$folly_dir/include/folly/folly-config.h"; then

With this change, it is possible run configure with the latest version, but not compile it:

Making all in cpp2
make[3]: Entering directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
PYTHONPATH=../../.python-local/lib/python /usr/bin/python2 -mthrift_compiler.main --gen cpp2 Sasl.thrift
/usr/bin/python2: dynamic module does not define init function (initfrontend)
Makefile:1986: recipe for target 'gen-cpp2/Sasl_types.h' failed
make[3]: *** [gen-cpp2/Sasl_types.h] Error 1
make[3]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib/cpp2'
Makefile:445: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift/lib'
Makefile:527: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/renan/aur/fbthrift/fbthrift/thrift'
Makefile:459: recipe for target 'all' failed
make: *** [all] Error 2

dseg commented on 2015-10-13 10:38

@gokcen
Thank you very much!
I've updated the PKGBUILD.

By the way, fbthrift 0.27.0 could not build with recent versions of folly (>=0.49.0),
you must downgrade the folly installation to 0.48.0 or earlier.

gokcen commented on 2015-10-11 21:17

This fixes the issue:

diff --git a/thrift/compiler/generate/t_rb_generator.cc b/thrift/compiler/generate/t_rb_generator.cc
index aa0bfbc..84ff9f9 100644
--- a/thrift/compiler/generate/t_rb_generator.cc
+++ b/thrift/compiler/generate/t_rb_generator.cc
@@ -312,7 +312,11 @@ void t_rb_generator::generate_enum(t_enum* tenum) {
//Populate the hash
int32_t value = (*c_iter)->get_value();

- first ? first = false : f_types_ << ", ";
+ if (first)
+ first = false;
+ else
+ f_types_ << ", ";
+
f_types_ << value << " => \"" << capitalize((*c_iter)->get_name()) << "\"";

}
@@ -323,7 +327,11 @@ void t_rb_generator::generate_enum(t_enum* tenum) {
first = true;
for (c_iter = constants.begin(); c_iter != constants.end(); ++c_iter) {
// Populate the set
- first ? first = false: f_types_ << ", ";
+ if (first)
+ first = false;
+ else
+ f_types_ << ", ";
+
f_types_ << capitalize((*c_iter)->get_name());
}
f_types_ << "]).freeze" << endl;

dseg commented on 2015-10-09 16:39

@dalu
I think this is upstream issue, I've tried to build more recent version (v0.26 to 0.31) but all failed.
I need some more time to investigate it.

dalu commented on 2015-09-30 09:49

In file included from /usr/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from /usr/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/c++config.h:482,
from /usr/include/c++/5.2.0/string:38,
from generate/t_erl_generator.cc:20:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
generate/t_rb_generator.cc: In member function ‘virtual void t_rb_generator::generate_enum(t_enum*)’:
generate/t_rb_generator.cc:315:11: error: operands to ?: have different types ‘bool’ and ‘std::basic_ostream<char>’
first ? first = false : f_types_ << ", ";
^
generate/t_rb_generator.cc:326:11: error: operands to ?: have different types ‘bool’ and ‘std::basic_ostream<char>’
first ? first = false: f_types_ << ", ";
^
In file included from /usr/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from /usr/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/c++config.h:482,
from /usr/include/c++/5.2.0/string:38,
from generate/t_cocoa_generator.cc:20:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
In file included from /usr/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from /usr/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/c++config.h:482,
from /usr/include/c++/5.2.0/string:38,
from generate/t_st_generator.cc:20:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
depbase=`echo generate/t_ocaml_generator.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I../.. -pthread -I/usr/include -I/usr/include -D_FORTIFY_SOURCE=2 -std=gnu++0x -MT generate/t_ocaml_generator.o -MD -MP -MF $depbase.Tpo -c -o generate/t_ocaml_generator.o generate/t_ocaml_generator.cc &&\
mv -f $depbase.Tpo $depbase.Po
In file included from /usr/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
from /usr/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/c++config.h:482,
from /usr/include/c++/5.2.0/string:38,
from generate/t_ocaml_generator.cc:20:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
Makefile:749: recipe for target 'generate/t_rb_generator.o' failed
make[4]: *** [generate/t_rb_generator.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/tmp/yaourt-tmp-darko/aur-fbthrift/src/fbthrift-0.25.0/thrift/compiler'
Makefile:806: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/tmp/yaourt-tmp-darko/aur-fbthrift/src/fbthrift-0.25.0/thrift/compiler'
Makefile:560: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/tmp/yaourt-tmp-darko/aur-fbthrift/src/fbthrift-0.25.0/thrift/compiler'
Makefile:526: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/yaourt-tmp-darko/aur-fbthrift/src/fbthrift-0.25.0/thrift'
Makefile:458: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build fbthrift.
==> Restart building fbthrift ? [y/N]