facebook / folly

An open-source C++ library developed and used at Facebook.
https://groups.google.com/forum/?fromgroups#!forum/facebook-folly
Apache License 2.0
28.14k stars 5.54k forks source link

i'm build folly but cannot find FBBuildOptions #1563

Open oska874 opened 3 years ago

oska874 commented 3 years ago

When I build lastest folly, I face the error below, how to get FBBuildOptions and fb_activate_static_library_option ?

$ ./folly/build/build-debs-ubuntu-18.04.sh
+ set -e
+ BUILD_DIR=_build
+ BOOST_VERSION=1.65.1
+ LIBEVENT_VERSION=2.0-5
+ SSL_VERSION=1.0.0
+ VERSION_FILE_PATH=folly/VERSION
+ sed s/:/./ folly/VERSION
+ VERSION=57.0
+ ITERATION=1
+ mktemp -d
+ DESTDIR=/tmp/tmp.HdVkIBnpFP
+ DEBUGDIR=/tmp/tmp.HdVkIBnpFP/usr/lib/debug
+ PKGDIR=/tmp
+ DESC=Folly is an open-source C++ library developed and used at Facebook
  as a foundation for our infrastructure.
+ URL=https://github.com/facebook/folly
+ LICENSE=Apache License v2.0
+ MAINTAINER=Folly Eng
+ command -v fpm
/usr/local/bin/fpm
+ [ -d /tmp/tmp.HdVkIBnpFP ]
+ command -v cmake
/usr/bin/cmake
+ rm -rf _build
+ mkdir _build
+ cd _build
+ cmake ..
-- The CXX compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:73 (include):
  include could not find load file:

    FBBuildOptions

CMake Error at CMakeLists.txt:74 (fb_activate_static_library_option):
  Unknown CMake command "fb_activate_static_library_option".

-- Configuring incomplete, errors occurred!
See also "/home/zhang/workspace/folly/_build/CMakeFiles/CMakeOutput.log".
Jaimies commented 3 years ago

Did you run the following, before executing build-deps? I used to have a few build errors, too, but installing the required dependencies solved them.

sudo apt-get install \
    g++ \
    cmake \
    libboost-all-dev \
    libevent-dev \
    libdouble-conversion-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libiberty-dev \
    liblz4-dev \
    liblzma-dev \
    libsnappy-dev \
    make \
    zlib1g-dev \
    binutils-dev \
    libjemalloc-dev \
    libssl-dev \
    pkg-config \
    libunwind-dev
irvingzhang0512 commented 3 years ago

I met the same problem because I remove build folder........ In folly, build folder is not designed for cmake build....

beryll1um commented 2 years ago

Same problem on Arch Linux distribution:

-- The CXX compiler identification is GNU 11.1.0
-- The C compiler identification is GNU 11.1.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:73 (include):
  include could not find requested file:

    FBBuildOptions

CMake Error at CMakeLists.txt:74 (fb_activate_static_library_option):
  Unknown CMake command "fb_activate_static_library_option".

-- Configuring incomplete, errors occurred!
See also "/home/vitalii/dev/github.com/folly/_build/CMakeFiles/CMakeOutput.log".

Also not found FBBuildOptions symbol in the project. Exception is the include in root CMakeLists.txt.

Trying to build CMake in according with guide (README.md).