Skip to content

Instantly share code, notes, and snippets.

@rurumimic
Created September 10, 2023 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rurumimic/6bab373e20ad9bf2aaa00ef839a2ee6a to your computer and use it in GitHub Desktop.
Save rurumimic/6bab373e20ad9bf2aaa00ef839a2ee6a to your computer and use it in GitHub Desktop.
ʕ·ᴥ·ʔ Build EAR

Install Bear

Clone a repo

git clone https://github.com/rizsotto/Bear.git

cd Bear

mkdir build
cd build

Target Directory

sudo mkdir /opt/bear

Ubuntu dependencies

apt-get install python cmake pkg-config
apt-get install libfmt-dev libspdlog-dev nlohmann-json3-dev \
                libgrpc++-dev protobuf-compiler-grpc libssl-dev

Compiler

export CC=clang
export CXX=clang++

Configurations

cmake -DENABLE_UNIT_TESTS=OFF -DENABLE_FUNC_TESTS=OFF -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DENABLE_MULTILIB=ON -DCMAKE_INSTALL_PREFIX=/opt/bear ..

-- The C compiler identification is Clang 17.0.0
-- The CXX compiler identification is Clang 17.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Looking for nlohman_json dependency
-- Looking for nlohman_json dependency -- found
-- Looking for fmt dependency
-- Looking for fmt dependency -- found
-- Looking for spdlog dependency
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for spdlog dependency -- found
-- Looking for gRPC::grpc++ dependency
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for modules 'protobuf>=3.11;grpc++>=1.26'
--   Found protobuf, version 3.12.4
--   Found grpc++, version 1.30.2
-- Looking for gRPC::grpc++ dependency -- found
-- Looking for protoc
-- Looking for protoc -- found
-- Looking for grpc_cpp_plugin
-- Looking for grpc_cpp_plugin -- found
-- Configuring done
-- Generating done
-- Build files have been written to: ./Bear/build

Build

make all

Install

sudo make install

Binary

sudo ln -s /opt/bear/bin/bear /usr/local/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment