facebook / wangle

Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
Apache License 2.0
3.04k stars 535 forks source link

Build failure on Arch #167

Open jghodd opened 4 years ago

jghodd commented 4 years ago

==> Starting build()... -- The CXX compiler identification is GNU 9.2.0 -- The C compiler identification is GNU 9.2.0 -- Check for working CXX compiler: /bin/c++ -- Check for working CXX compiler: /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: /bin/cc -- Check for working C compiler: /bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Found folly: /usr -- Found fizz: /usr -- Found Boost: /lib64/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: system thread filesystem regex context program_options -- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1d")
-- Found glog: /usr/lib/libglog.so
-- Found gflags from package config -- gflags_CONFIG=/lib64/cmake/gflags/gflags-config.cmake -- Found libevent: /usr/lib/libevent.so -- Found double_conversion: /usr/lib/libdouble-conversion.so
-- Found Threads: TRUE
-- Found librt: /usr/lib/librt.so
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success -- Looking for SSL_SESSION_dup in ssl -- Looking for SSL_SESSION_dup in ssl - found -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found gmock via config, defines=, include=/usr/include, libs=GTest::gmock_main;GTest::gmock;GTest::gtest CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: /data/aurbuild/yaourt-tmp-root/aur-wangle/src/wangle-2019.10.14.00/wangle/Boost_INCLUDE_DIR used as include directory in directory /data/aurbuild/yaourt-tmp-root/aur-wangle/src/wangle-2019.10.14.00/wangle

-- Configuring incomplete, errors occurred! See also "/data/aurbuild/yaourt-tmp-root/aur-wangle/src/wangle-2019.10.14.00/wangle/build/CMakeFiles/CMakeOutput.log". See also "/data/aurbuild/yaourt-tmp-root/aur-wangle/src/wangle-2019.10.14.00/wangle/build/CMakeFiles/CMakeError.log". ==> ERROR: A failure occurred in build(). Aborting...

jghodd commented 4 years ago

OK. Found the fix. It's actually a boost/cmake version issue. Add the following flag to the cmake command:

-DBoost_NO_BOOST_CMAKE=ON

So...

    cmake -S . -B build \
          -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
          -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
          -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \
          -DCMAKE_INSTALL_PREFIX=/usr \
          -DBoost_NO_BOOST_CMAKE=ON \
          -DCMAKE_BUILD_TYPE=Release

Edit: apparently this isn't a full fix. I'm still getting boost-related linker errors and a build failure on FilePollerTest:

/bin/ld: /usr/lib/libfolly.a(TestUtil.cpp.o): in function bool boost::regex_match<char const*, std::allocator<boost::sub_match<char const*> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*, char const*, boost::match_results<char const*, std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)': (.text._ZN5boost11regex_matchIPKcSaINS_9sub_matchIS2_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SA_RNS_13match_resultsISA_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsE[_ZN5boost11regex_matchIPKcSaINS_9sub_matchIS2_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SA_RNS_13match_resultsISA_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsE]+0x8f): undefined reference toboost::re_detail_106900::perl_matcher<char const, std::allocator<boost::sub_match<char const> >, boost::regex_traits<char, boost::cpp_regex_traits > >::match()' /bin/ld: /usr/lib/libfolly.a(TestUtil.cpp.o): in function boost::re_detail_106900::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(char const*, char const*, boost::match_results<char const*, std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)': (.text._ZN5boost16re_detail_10690012perl_matcherIPKcSaINS_9sub_matchIS3_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC2ES3_S3_RNS_13match_resultsIS3_S6_EERKNS_11basic_regexIcSA_EENS_15regex_constants12_match_flagsES3_[_ZN5boost16re_detail_10690012perl_matcherIPKcSaINS_9sub_matchIS3_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC5ES3_S3_RNS_13match_resultsIS3_S6_EERKNS_11basic_regexIcSA_EENS_15regex_constants12_match_flagsES3_]+0xfe): undefined reference toboost::re_detail_106900::perl_matcher<char const, std::allocator<boost::sub_match<char const> >, boost::regex_traits<char, boost::cpp_regex_traits > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits > > const&, boost::regex_constants::_match_flags)' collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/FilePollerTest.dir/build.make:133: bin/FilePollerTest] Error 1 make[1]: [CMakeFiles/Makefile2:91: CMakeFiles/FilePollerTest.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...

Any ETA on when wangle will be fixed to work with the latest version of boost?