Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

can not buid bistro #12

Closed
shaohongxu opened this issue May 11, 2017 · 2 comments
Closed

can not buid bistro #12

shaohongxu opened this issue May 11, 2017 · 2 comments

Comments

@shaohongxu
Copy link

I have some progress on building Bistro. I can run travis_docker_build.sh to build but the following error blocked the building process. I found the TMultiplexedProtocol.cpp is an apache thrift file and it is not contained in fbthrift project. And I still can not find a successful build in Travis.

Would you like to tell me how to fix the problem so I can move forward. many thanks!

make[4]: *** No rule to make target 'protocol/TMultiplexedProtocol.cpp', needeby 'protocol/TMultiplexedProtocol.lo'. Stop.
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/home/fbthrift/thrift/lib/cpp'
Makefile:1287: recipe for target 'all-recursive' failed
make[3]: Leaving directory '/home/fbthrift/thrift/lib/cpp'
make[3]: *** [all-recursive] Error 1
Makefile:416: recipe for target 'all-recursive' failed
make[2]: Leaving directory '/home/fbthrift/thrift/lib'
make[2]: *** [all-recursive] Error 1
Makefile:498: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/home/fbthrift/thrift'
make[1]: *** [all-recursive] Error 1

@ghost
Copy link

ghost commented May 15, 2017

This docker build worked for me:

cd bistro
export os_image=ubuntu:16.04
export gcc_version=5
make_parallelism=2 ./build/fbcode_builder/travis_docker_build.sh

It creates a docker image, as you can see:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
05a86e19c6cc 2 minutes ago 2.8 GB
Reference: https://docs.docker.com/engine/reference/commandline/build/

Non-docker build
Also this non-docker build might make gdb easier (at least for me). It installs fbthrift, etc. to /usr/local. It is extracted from docker build above; you might need to adjust PYTHONPATH near the end:

#!/bin/bash
# Install packages and initial git clone and build of dependencies.
# This install deps to /usr/local.
# Debian (ubuntu:16.04)

sudo apt-get update

sudo apt-get install -yq autoconf-archive bison build-essential cmake curl flex git gperf joe libboost-all-dev libcap-dev libdouble-conversion-dev libevent-dev libgflags-dev libgoogle-glog-dev libkrb5-dev libnuma-dev libsasl2-dev libsnappy-dev libsqlite3-dev libssl-dev libtool netcat-openbsd pkg-config unzip wget gcc-5 g++-5

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 40 --slave /usr/bin/g++ g++ /usr/bin/g++-5

sudo update-alternatives --config gcc

### Diagnostics ###

# Builder DockerFBCodeBuilder(gcc_version='5', facebook/bistro:local_repo_dir='/home/jhwang/src/bistro/build/fbcode_builder/../..', projects_dir=u'/home', facebook/zstd:git_hash=ShellQuoted(u'$(git describe --abbrev=0 --tags)'), prefix=u'/home/install', os_image='ubuntu:16.04', user=u'nobody', docker_context_dir=u'/tmp/docker-context-DhadcF', wangle/wangle:cmake_defines={u'BUILD_TESTS': u'OFF'}, make_parallelism=2, no1msd/mstch:git_hash=ShellQuoted(u'$(git describe --abbrev=0 --tags)'))
hostname
cat /etc/issue
g++ --version || echo g++ not installed

basedir=$HOME/src

### Check out facebook/folly, workdir folly ###

cd "$basedir"
git clone https://github.com/facebook/folly
cd folly/folly

### Build and install folly/folly ###

autoreconf -ivf
LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="$CFLAGS -I/usr/local/include" CPPFLAGS="$CPPFLAGS -I/usr/local/include" PY_PREFIX=/usr/local ./configure --prefix=/usr/local
make -j 2
sudo make install

### Check out facebook/wangle, workdir wangle ###

cd "$basedir"
git clone https://github.com/facebook/wangle
cd wangle/wangle
[ -f build ] || mkdir build
cd build

### Build and install wangle/wangle ###

cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON -DBUILD_TESTS=OFF ..
make -j 2
sudo make install

### Check out facebook/proxygen, workdir proxygen ###

cd "$basedir"
git clone https://github.com/facebook/proxygen
cd proxygen/proxygen

### Build and install proxygen/proxygen ###

autoreconf -ivf
LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="$CFLAGS -I/usr/local/include" CPPFLAGS="$CPPFLAGS -I/usr/local/include" PY_PREFIX=/usr/local ./configure --prefix=/usr/local
make -j 2
sudo make install

### Check out facebook/zstd, workdir . ###

cd "$basedir"
git clone https://github.com/facebook/zstd
cd zstd
git checkout $(git describe --abbrev=0 --tags)

### Build and install zstd ###

make -j 2 PREFIX=/usr/local
sudo make install PREFIX=/usr/local

### Check out no1msd/mstch, workdir . ###

cd "$basedir"
git clone https://github.com/no1msd/mstch
cd mstch
git checkout $(git describe --abbrev=0 --tags)
[ -f build ] || mkdir build
cd build

### Build and install no1msd/mstch ###

cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON ..
make -j 2
sudo make install

### Check out facebook/fbthrift, workdir thrift ###

cd "$basedir"
git clone https://github.com/facebook/fbthrift
cd fbthrift/thrift

### Build and install fbthrift/thrift ###

autoreconf -ivf
LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="$CFLAGS -I/usr/local/include" CPPFLAGS="$CPPFLAGS -I/usr/local/include" PY_PREFIX=/usr/local ./configure --prefix=/usr/local
make -j 2
sudo make install

### Build Bistro ###

cd "$basedir"
git clone https://github.com/facebook/bistro.git
cd bistro/bistro
PYTHONPATH="$PYTHONPATH:/usr/local/lib/python2.7/site-packages" ./cmake/run-cmake.sh Debug -DCMAKE_INSTALL_PREFIX=/usr/local
cd cmake/Debug
make -j 2

### Run bistro tests ###

ctest

@snarkmaster
Copy link
Contributor

Thanks for sharing your experience. The builds of some of Bistro's dependencies (especially facebook/fbthrift) got broken several times over the last couple of weeks. I apologize for this. I think we fixed all the known issues at this point.

As far as the Docker-free build, the reason we have not yet provided this sort of script is that it is actually fairly tricky to make it robust to updates, rebuilds, varying versions of dependencies, etc. Docker lets the build start from a known-good state every time.

That said, if you have a clean Debian-like system, and you want to install Bistro, it's perfectly reasonable to run the commands from the appropriately generated Dockerfile. That should work.

Please feel free to reopen if you have any other questions or concerns!

facebook-github-bot pushed a commit that referenced this issue Sep 26, 2020
Summary:
Pull Request resolved: facebookexperimental/rust-shed#12

The OpenSSL version on Mac doesn't work well with EdenSCM and Mononoke integration, just use the one from getdeps/brew.

Also remove the now redundant "DEVELOPER_DIR" since the modern XCode version works.

Pull Request resolved: facebook/sapling#63

Reviewed By: StanislavGlebik

Differential Revision: D23927022

Pulled By: lukaspiatkowski

fbshipit-source-id: 6b6b3baa33d49b567b9aa6178cbd20b7ae9edc89
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants