tamatebako/tebako

`tebako setup` failure on ubuntu x86 container

Closed this issue · 3 comments

Running on Apple M1, using the x86 ubuntu container (this is 20.04-lts).

$ docker run -it ubuntu bash

Within the container, run this:

apt-get update
apt-get install -y curl git g++ gcc ruby ruby-dev pkg-config bison flex
curl https://apt.kitware.com/kitware-archive.sh | bash
apt-get install -y cmake
apt-get install -y binutils-dev libarchive-dev libevent-dev libjemalloc-dev acl-dev \
  libdouble-conversion-dev libiberty-dev liblz4-dev liblzma-dev libssl-dev \
  libboost-context-dev libboost-filesystem-dev libboost-program-options-dev \
  libboost-regex-dev libboost-system-dev libboost-thread-dev \
  libunwind-dev libdwarf-dev libelf-dev libfuse-dev libgoogle-glog-dev \
  libffi-dev libgdbm-dev libyaml-dev libncurses-dev libreadline-dev \
  libsqlite3-dev libfmt-dev

apt-get install -y make autoconf

gem install ronn
gem install bundler

git clone https://github.com/metanorma/packed-mn.git
cd packed-mn
git checkout maxirmx-tebako-packager

git clone https://github.com/tamatebako/tebako
tebako/bin/tebako setup

# Needed to compile expressir gem
export CC=clang
export CXX=clang++
bundle

make

It compiles and then fails here:

g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[9]: *** [fbthrift/thrift/compiler/CMakeFiles/compiler_generators.dir/build.make:216: fbthrift/thrift/compiler/CMakeFiles/compiler_generators.dir/generate/t_mstch_cpp2_generator.cc.o] Error 1
make[9]: *** Waiting for unfinished jobs....
[ 80%] Linking CXX static library libfolly.a
[ 80%] Built target folly
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[9]: *** [fbthrift/thrift/compiler/CMakeFiles/compiler_generators.dir/build.make:300: fbthrift/thrift/compiler/CMakeFiles/compiler_generators.dir/generate/t_mstch_rust_generator.cc.o] Error 1
make[8]: *** [CMakeFiles/Makefile2:1050: fbthrift/thrift/compiler/CMakeFiles/compiler_generators.dir/all] Error 2
make[7]: *** [Makefile:156: all] Error 2
make[6]: *** [CMakeFiles/_dwarfs.dir/build.make:86: /packed-mn-linux/tebako/deps/src/_dwarfs_wr/deps/src/_dwarfs-stamp/_dwarfs-build] Error 2
make[5]: *** [CMakeFiles/Makefile2:87: CMakeFiles/_dwarfs.dir/all] Error 2
make[4]: *** [Makefile:136: all] Error 2
make[3]: *** [CMakeFiles/_dwarfs_wr.dir/build.make:86: ../deps/src/_dwarfs_wr-stamp/_dwarfs_wr-build] Error 2
make[2]: *** [CMakeFiles/Makefile2:114: CMakeFiles/_dwarfs_wr.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:175: CMakeFiles/setup.dir/rule] Error 2
make: *** [Makefile:163: setup] Error 2
'tebako setup' build step failed

Very similar to #55

Apparently this is due to insufficient RAM. Let me retry.

I got it to work locally:

$ docker run -it --platform linux/x86_64 ubuntu bash

Within the container:

export DEBIAN_FRONTEND=noninteractive
export TZ=Etc/UTC

apt-get update

apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get install -y gcc-9 g++-9

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
update-alternatives --set gcc /usr/bin/gcc-9

apt-get install -y curl git ruby ruby-dev pkg-config bison flex make autoconf
curl https://apt.kitware.com/kitware-archive.sh | bash
apt-get install -y cmake
apt-get install -y binutils-dev libarchive-dev libevent-dev libjemalloc-dev acl-dev \
  libdouble-conversion-dev libiberty-dev liblz4-dev liblzma-dev libssl-dev \
  libboost-context-dev libboost-filesystem-dev libboost-program-options-dev \
  libboost-regex-dev libboost-system-dev libboost-thread-dev \
  libunwind-dev libdwarf-dev libelf-dev libfuse-dev libgoogle-glog-dev \
  libffi-dev libgdbm-dev libyaml-dev libncurses-dev libreadline-dev \
  libsqlite3-dev
  
apt-get install -y libfmt-dev

git clone https://github.com/tamatebako/tebako
tebako/bin/tebako setup

Addressed in faea15d.