New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap seems to fail at rust ssl compilation #4975

Closed
wisechengyi opened this Issue Oct 13, 2017 · 10 comments

Comments

Projects
None yet
4 participants
@wisechengyi
Copy link
Contributor

wisechengyi commented Oct 13, 2017

$ ./pants goals
[Waiting for run_cargo fetch --manifest-path /Users/yic/workspace/pants/src/rust/engine/Cargo.toml (pid 40765) to complete]
info: using existing install for '1.20.0-x86_64-apple-darwin'
info: override toolchain for '/Users/yic/workspace/pants' set to '1.20.0-x86_64-apple-darwin'

  1.20.0-x86_64-apple-darwin unchanged - rustc 1.20.0 (f3d6973f4 2017-08-27)

generating /Users/yic/workspace/pants/src/rust/engine/src/cffi/native_engine.c
(already up-to-date)
generating /Users/yic/workspace/pants/src/rust/engine/src/cffi/native_engine.cflags
info: using existing install for '1.20.0-x86_64-apple-darwin'
info: override toolchain for '/Users/yic/workspace/pants' set to '1.20.0-x86_64-apple-darwin'

  1.20.0-x86_64-apple-darwin unchanged - rustc 1.20.0 (f3d6973f4 2017-08-27)

generating /Users/yic/workspace/pants/src/rust/engine/src/cffi/native_engine.c
(already up-to-date)
generating /Users/yic/workspace/pants/src/rust/engine/src/cffi/native_engine.cflags
   Compiling grpcio-sys v0.1.1 (https://github.com/illicitonion/grpc-rs?rev=2acabdbff71e77a14b95b0b30c6d7de516355df7#2acabdbf)
error: failed to run custom build command for `grpcio-sys v0.1.1 (https://github.com/illicitonion/grpc-rs?rev=2acabdbff71e77a14b95b0b30c6d7de516355df7#2acabdbf)`
process didn't exit successfully: `/Users/yic/workspace/pants/src/rust/engine/target/release/build/grpcio-sys-8e3295ec4e146d45/build-script-build` (exit code: 101)
--- stdout
running: "cmake" "/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc" "-DCMAKE_INSTALL_PREFIX=/Users/yic/workspace/pants/src/rust/engine/target/release/build/grpcio-sys-83a6099ea7ef1515/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=x86_64-apple-darwin" "-DCMAKE_CXX_COMPILER=/usr/bin/clang++" "-DCMAKE_BUILD_TYPE=Release"
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/yic/workspace/pants/src/rust/engine/target/release/build/grpcio-sys-83a6099ea7ef1515/out/build
running: "cmake" "--build" "." "--target" "grpc" "--config" "Release" "--" "-j8"
[  0%] Built target base64
[  0%] Built target buf
[  0%] Built target stack
[  0%] Built target lhash
[  0%] Built target err
[  0%] Built target bytestring
[  2%] Built target crypto_base
[  5%] Built target fipsmodule
[  5%] Built target rc4
[  5%] Built target chacha
[  5%] Built target pool
[  5%] Built target conf
[  5%] Built target poly1305
[  5%] Built target curve25519
[  5%] Built target digest_extra
[  8%] Built target cipher_extra
[  8%] Built target rand_extra
[  8%] Built target bn_extra
[ 11%] Built target bio
[ 13%] Built target obj
[ 13%] Built target engine
[ 13%] Built target dh
[ 13%] Built target dsa
[ 16%] Built target asn1
[ 16%] Built target ec_extra
[ 16%] Built target rsa_extra
[ 16%] Built target ecdh
[ 16%] Built target ecdsa_extra
[ 16%] Built target cmac
[ 16%] Built target hkdf
[ 19%] Built target evp
[ 19%] Built target pem
[ 19%] Built target pkcs7
[ 22%] Built target pkcs8_lib
[ 25%] Built target zlibstatic
[ 33%] Built target gpr
[ 38%] Built target x509v3
[ 47%] Built target cares
[ 55%] Built target x509
[ 55%] Built target crypto
[ 55%] Building CXX object third_party/boringssl/ssl/CMakeFiles/ssl.dir/bio_ssl.cc.o
[ 55%] Building CXX object third_party/boringssl/ssl/CMakeFiles/ssl.dir/custom_extensions.cc.o
[ 55%] Building CXX object third_party/boringssl/ssl/CMakeFiles/ssl.dir/d1_both.cc.o
[ 55%] Building CXX object third_party/boringssl/ssl/CMakeFiles/ssl.dir/d1_lib.cc.o
[ 55%] Building CXX object third_party/boringssl/ssl/CMakeFiles/ssl.dir/d1_srtp.cc.o
[ 55%] Building CXX object third_party/boringssl/ssl/CMakeFiles/ssl.dir/d1_pkt.cc.o
[ 55%] Building CXX object third_party/boringssl/ssl/CMakeFiles/ssl.dir/dtls_method.cc.o
[ 55%] Building CXX object third_party/boringssl/ssl/CMakeFiles/ssl.dir/dtls_record.cc.o

--- stderr
CMake Warning at CMakeLists.txt:120 (message):
  gRPC_INSTALL will be forced to FALSE because gRPC_ZLIB_PROVIDER is "module"


-- git Version: v1.1.0-pre3-0fadc0db-dirty
-- Version: 1.1.0
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- failed to compile
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- failed to compile
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   grpc_csharp_ext
   zlib

This warning is for project developers.  Use -Wno-dev to suppress it.

In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/dtls_method.cc:57:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:145:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:24In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/d1_lib.cc:57:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:145:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:24: error: no type named 'unique_ptr' in namespace 'std'
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                  ~~~~~^
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:34: error: expected ';' after alias declaration
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                                 ^
                                 ;
: error: no type named 'unique_ptr' in namespace 'std'
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                  ~~~~~^
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:34: error: expected ';' after alias declaration
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                                 ^
                                 ;
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/d1_srtp.cc:117:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:145:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:24: error: no type named 'unique_ptr' in namespace 'std'
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                  ~~~~~^
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:34: error: expected ';' after alias declaration
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                                 ^
                                 ;
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/dtls_record.cc:112:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:145:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:24: error: no type named 'unique_ptr' in namespace 'std'
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                  ~~~~~^
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:34: error: expected ';' after alias declaration
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                                 ^
                                 ;
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/custom_extensions.cc:15:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:145:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:24: error: no type named 'unique_ptr' in namespace 'std'
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                  ~~~~~^
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/d1_both.cc:114:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:145:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:24: error: /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:34: error: expected ';' after alias declaration
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                                 ^
                                 ;
no type named 'unique_ptr' in namespace 'std'
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                  ~~~~~^
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:34: error: expected ';' after alias declaration
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                                 ^
                                 ;
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/dtls_method.cc:57:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:147:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/bio.h:66:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ex_data.h:114:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/stack.h:385:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/d1_srtp.cc:117:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:147:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/bio.h:66:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ex_data.h:114:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/d1_lib.cc:57:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:147:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/bio.h:66:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ex_data.h:114:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/stack.h:385:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/stack.h:385:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/d1_pkt.cc:112:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:145:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:24: error: no type named 'unique_ptr' in namespace 'std'
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                  ~~~~~^
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:34: error: expected ';' after alias declaration
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                                 ^
                                 ;
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/dtls_record.cc:112:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:147:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/bio.h:66:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ex_data.h:114:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/stack.h:385:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/custom_extensions.cc:15:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:147:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/d1_both.cc:114:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:147:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/bio.h:66:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ex_data.h:In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/bio.h:66:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ex_data.h:114:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/stack.h:385:10: 114:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/stack.h:385:10: fatal error: fatal error: 'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/d1_pkt.cc:112:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:147:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/bio.h:66:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ex_data.h:114:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/stack.h:385:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/bio_ssl.cc:10:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:145:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:24: error: no type named 'unique_ptr' in namespace 'std'
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                  ~~~~~^
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/base.h:458:34: error: expected ';' after alias declaration
using UniquePtr = std::unique_ptr<T, internal::Deleter<T>>;
                                 ^
                                 ;
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/bio_ssl.cc:10:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ssl.h:147:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/bio.h:66:
In file included from /Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/ex_data.h:114:
/Users/yic/.cache/pants/rust-toolchain/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/ssl/../include/openssl/stack.h:385:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
3 errors generated.
3 errors generated.
3 errors generated.
make[3]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/dtls_method.cc.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/dtls_record.cc.o] Error 1
3 errors generated.
3 errors generated.
3 errors generated.
make[3]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/d1_srtp.cc.o] Error 1
make[3]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/d1_lib.cc.o] Error 1
3 errors generated.
make[3]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/custom_extensions.cc.o] Error 1
3 errors generated.
make[3]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/bio_ssl.cc.o] Error 1
make[3]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/d1_pkt.cc.o] Error 1
make[3]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/d1_both.cc.o] Error 1
make[2]: *** [third_party/boringssl/ssl/CMakeFiles/ssl.dir/all] Error 2
make[1]: *** [CMakeFiles/grpc.dir/rule] Error 2
make: *** [grpc] Error 2
thread 'main' panicked at '
command did not execute successfully, got: exit code: 2

build script failed, must exit now', /Users/yic/.cache/pants/rust-toolchain/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.26/src/lib.rs:599:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.


Failed to build native engine.

cc @illicitonion, seems it is pulling from your grpc fork.

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Oct 14, 2017

@wisechengyi : Have you tried clearing ~/.cache/pants/bin/rust-toolchain?

@wisechengyi

This comment has been minimized.

Copy link
Contributor

wisechengyi commented Oct 14, 2017

@illicitonion

This comment has been minimized.

Copy link
Contributor

illicitonion commented Oct 16, 2017

This is a problem compiling boringssl - I've already sent a couple of patches upstream to get it compiling with old gcc versions.

It looks like your clang is missing support for C++11 in some way. Everything it's complaining about is not understanding C++11. I can't reproduce on my mac - can you share what version of clang and clang++ you're using?

For me:

$ cc --version
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ clang++ --version
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ xcodebuild -version
Xcode 9.0
Build version 9A235
@illicitonion

This comment has been minimized.

Copy link
Contributor

illicitonion commented Oct 16, 2017

This was a fun investigation.

Sent https://boringssl-review.googlesource.com/c/boringssl/+/21984 upstream to boringssl for their half of the fix.

Filed alexcrichton/cmake-rs#38 against cmake-rs for their half of the problem. I tried to put together a patch for grpc-rs, but the number of things I have in-flight upstreaming is making it a little fiddly. Hopefully I can make some progress with getting things upstreamed tomorrow, and just get us onto a less forked release which works.

@mateor

This comment has been minimized.

Copy link
Member

mateor commented Nov 7, 2017

I just happened across this issue when searching something else. But I also have hit multiple issues compiling the rust on OSX over my last two shifts as release author.

I have been able to get by by doing a couple local hacks

    brew install openssl@1.1
    brew install cmake && brew upgrade cmake
    CXX="/usr/bin/c++" OPENSSL_ROOT_DIR="/usr/local/opt/openssl/" ./pants foo.bar

The openssl is to make sure you have the include dir locally.
The cmake command is to upgrade to at least 3.9.5 and pick up the patch for potential missing symbols

The two flags are only needed during the engine bootstrap. The CXX is a workaround for the insufficiently explicit OS X toolchain bug, while the OPENSSL_ROOT_DIR will allow it to find the OPENSSL_INCLUDE_DIR and find the missing type_trait include.

Hopefully that gets you past the general world of issues and I did not forget some step I made along the way. I have confirmed that I still get failures if I clean the caches and reinvoke with subsets of the above steps removed

illicitonion added a commit to illicitonion/binaries that referenced this issue Nov 7, 2017

Add cmake 3.9.5
pantsbuild/pants#4975 (comment)
reports that 3.9.5 adds an important bugfix for OSX.
@illicitonion

This comment has been minimized.

Copy link
Contributor

illicitonion commented Nov 7, 2017

@mateor Sorry for the pain, you definitely shouldn't have to do those things...

cmake should be being transparently installed for you in ~/.cache/pants/bin/cmake and should be temporarily put on your $PATH by the bootstrap scripts. We currently fetch 3.9.4 but if you're saying we need to update to 3.9.5 we can definitely do that. I've sent pantsbuild/binaries#48 out to push 3.9.5 to the binaries repo.

openssl you definitely shouldn't need; grpc uses boringssl, which bundles its own copy of the relevant includes in .cache/pants/rust/cargo/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys/grpc/third_party/boringssl/include/openssl.

I can't currently reproduce these issues, and neither can our CI - can you paste some logs of things failing with the OPENSSL_ROOT_DIR, as well as OS and compiler versions you're using?

jsirois added a commit to pantsbuild/binaries that referenced this issue Nov 7, 2017

Add cmake 3.9.5 (#48)
pantsbuild/pants#4975 (comment)
reports that 3.9.5 adds an important bugfix for OSX.

illicitonion added a commit to twitter/pants that referenced this issue Nov 7, 2017

Update cmake to 3.9.5
pantsbuild#4975 (comment) reports that 3.9.5 adds an important bugfix for OSX.

illicitonion added a commit that referenced this issue Nov 7, 2017

Update cmake to 3.9.5 (#5072)
#4975 (comment) reports that 3.9.5 adds an important bugfix for OSX.
@wisechengyi

This comment has been minimized.

Copy link
Contributor

wisechengyi commented Nov 8, 2017

running into similar issue again:

$ ./pants goals
[Waiting for run_cargo fetch --manifest-path /Users/yic/workspace/pants/src/rust/engine/Cargo.toml (pid 81355) to complete]
info: using existing install for '1.20.0-x86_64-apple-darwin'
info: override toolchain for '/Users/yic/workspace/pants' set to '1.20.0-x86_64-apple-darwin'

j  1.20.0-x86_64-apple-darwin unchanged - rustc 1.20.0 (f3d6973f4 2017-08-27)

generating /Users/yic/workspace/pants/src/rust/engine/src/cffi/native_engine.c
(already up-to-date)
generating /Users/yic/workspace/pants/src/rust/engine/src/cffi/native_engine.cflags
info: using existing install for '1.20.0-x86_64-apple-darwin'
info: override toolchain for '/Users/yic/workspace/pants' set to '1.20.0-x86_64-apple-darwin'

  1.20.0-x86_64-apple-darwin unchanged - rustc 1.20.0 (f3d6973f4 2017-08-27)

generating /Users/yic/workspace/pants/src/rust/engine/src/cffi/native_engine.c
(already up-to-date)
generating /Users/yic/workspace/pants/src/rust/engine/src/cffi/native_engine.cflags
   Compiling grpcio-sys v0.1.1 (https://github.com/illicitonion/grpc-rs?rev=2acabdbff71e77a14b95b0b30c6d7de516355df7#2acabdbf)
error: could not find native static library `grpc`, perhaps an -L flag is missing?

error: Could not compile `grpcio-sys`.

To learn more, run the command again with --verbose.

Failed to build native engine.
$ pwd
/Users/yic/.cache/pants/rust/cargo/git/checkouts/grpc-rs-a357d41b20dd2a82/2acabdb/grpc-sys
$ ~/.cache/pants/rust/rustup/toolchains/1.20.0-x86_64-apple-darwin/bin/cargo build 
error: could not execute process `rustc -vV` (never executed)

Caused by:
  No such file or directory (os error 2)

illicitonion added a commit to illicitonion/pants that referenced this issue Nov 9, 2017

@illicitonion

This comment has been minimized.

Copy link
Contributor

illicitonion commented Nov 9, 2017

@mateor

This comment has been minimized.

Copy link
Member

mateor commented Nov 10, 2017

@illicitonion

This comment has been minimized.

Copy link
Contributor

illicitonion commented Nov 15, 2017

@mateor I have reproduced the issue on @wisechengyi's machine, and know how to fix it. Will get that out soon.

illicitonion added a commit to illicitonion/grpc-rs that referenced this issue Nov 21, 2017

Explicitly link against libc++ on Darwin
I have had complaints from a couple of developers that their builds are
failing on Darwin because clang is defaulting to linking against
libstdc++ on pantsbuild/pants#4975.

illicitonion added a commit to twitter/pants that referenced this issue Nov 27, 2017

illicitonion added a commit that referenced this issue Nov 28, 2017

baroquebobcat added a commit to twitter/pants that referenced this issue Dec 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment