Skip to content
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

Compilation failure, OS X #193

Closed
blt opened this issue Jan 16, 2017 · 7 comments
Closed

Compilation failure, OS X #193

blt opened this issue Jan 16, 2017 · 7 comments

Comments

@blt
Copy link
Collaborator

blt commented Jan 16, 2017

Kushal Pisavadia has reported on twitter that he's having trouble compiling cernan. Twitter's too wee to get much information so I'm creating this tracking issue to solicit detailed compilation failures.

@KushalP
Copy link

KushalP commented Jan 16, 2017

For the sake of completeness, the Twitter thread that @blt refers to above is here: https://twitter.com/KushalP/status/820995772825174022

The below is split into the build failure I get with the ring dependency and details about my environment.

Build Failure

ᐅ cargo run -- -v --config examples/configs/quickstart.toml
   Compiling unicode-width v0.1.3
   Compiling byteorder v0.5.3
   Compiling log v0.3.6
   Compiling unicode-segmentation v0.1.2
   Compiling pkg-config v0.3.8
   Compiling mime v0.2.2
   Compiling bitflags v0.7.0
   Compiling byteorder v1.0.0
   Compiling xml-rs v0.1.26
   Compiling dtoa v0.2.2
   Compiling httparse v1.2.0
   Compiling rustc-serialize v0.3.21
   Compiling winapi-build v0.1.1
   Compiling winapi v0.2.8
   Compiling regex-syntax v0.3.9
   Compiling utf8-ranges v0.1.3
   Compiling typeable v0.1.2
   Compiling ring v0.4.3
   Compiling unicode-normalization v0.1.2
   Compiling openssl-sys v0.7.17
   Compiling fern v0.3.5
   Compiling protobuf v1.0.24
   Compiling md5 v0.2.1
   Compiling unicode-xid v0.0.3
   Compiling traitobject v0.0.1
   Compiling hpack v0.2.0
   Compiling lazy_static v0.2.2
   Compiling vec_map v0.6.0
   Compiling seahash v3.0.5
   Compiling ansi_term v0.9.0
   Compiling solicit v0.4.4
   Compiling num-traits v0.1.36
   Compiling num-integer v0.1.32
   Compiling gcc v0.3.38
   Compiling syntex_pos v0.50.0
   Compiling syntex_pos v0.45.0
   Compiling lua v0.0.9
   Compiling openssl v0.7.14
   Compiling glob v0.2.11
   Compiling itoa v0.1.1
   Compiling matches v0.1.4
   Compiling unicode-bidi v0.2.3
   Compiling kernel32-sys v0.2.2
   Compiling libc v0.2.17
   Compiling idna v0.1.0
   Compiling serde v0.8.19
   Compiling memchr v0.1.11
   Compiling term_size v0.2.1
   Compiling aho-corasick v0.5.3
   Compiling time v0.1.35
   Compiling url v1.2.3
   Compiling num_cpus v1.2.0
   Compiling miniz-sys v0.1.7
   Compiling strsim v0.5.2
   Compiling clap v2.19.0
   Compiling bitflags v0.1.1
   Compiling openssl-sys-extras v0.7.14
   Compiling semver v0.1.20
   Compiling rustc_version v0.1.7
   Compiling unicase v1.4.0
   Compiling flate2 v0.2.14
   Compiling serde_json v0.8.3
   Compiling language-tags v0.2.2
   Compiling toml v0.2.1
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for `ring v0.4.3`
process didn't exit successfully: `/Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/build-script-build` (exit code: 101)
--- stdout
LANG: en_GB.UTF-8
DEP_OPENSSL_INCLUDE: /opt/boxen/homebrew/opt/openssl/include
OPENSSL_INCLUDE_DIR: /opt/boxen/homebrew/opt/openssl/include
_: /opt/boxen/homebrew/bin/cargo
HOME: /Users/kushalpisavadia
CARGO_CFG_TARGET_OS: macos
CARGO_FEATURE_USE_HEAP: 1
RUSTDOC: rustdoc
TARGET: x86_64-apple-darwin
CARGO_CFG_TARGET_ARCH: x86_64
RUSTC: rustc
HOST: x86_64-apple-darwin
CARGO_PKG_DESCRIPTION: Safe, fast, small crypto using Rust.
CARGO_PKG_AUTHORS: Brian Smith <brian@briansmith.org>
CARGO_CFG_TARGET_ENV:
CARGO_CFG_TARGET_FAMILY: unix
CARGO_PKG_HOMEPAGE:
CARGO_FEATURE_DEV_URANDOM_FALLBACK: 1
CARGO_PKG_VERSION_MINOR: 4
CARGO_CFG_UNIX:
DYLD_LIBRARY_PATH: /Users/kushalpisavadia/Projects/cernan/target/debug/deps
CARGO_PKG_NAME: ring
CARGO_FEATURE_DEFAULT: 1
OUT_DIR: /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out
NUM_JOBS: 4
CARGO_CFG_TARGET_POINTER_WIDTH: 64
CARGO_MANIFEST_DIR: /Users/kushalpisavadia/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.4.3
CARGO_PKG_VERSION_PATCH: 3
DEBUG: true
CARGO_CFG_DEBUG_ASSERTIONS:
CARGO_PKG_VERSION_MAJOR: 0
CARGO_CFG_TARGET_ENDIAN: little
CARGO_PKG_VERSION_PRE:
CARGO_PKG_VERSION: 0.4.3
OPT_LEVEL: 0
PROFILE: debug
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/lib
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/aes
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/aes/asm
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/bn
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/bn/asm
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/chacha/asm
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/cipher
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/curve25519
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/curve25519/asm
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/ec
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/ec/asm
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/modes
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/modes/asm
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/poly1305
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/poly1305/asm
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/rand
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/rsa
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/sha/asm
mkdir -p /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/test
cc -I/opt/boxen/homebrew/include -std=c1x -Wbad-function-cast -Wmissing-field-initializers -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes  -fpic -fdata-sections -ffunction-sections -gfull -pedantic -pedantic-errors -Wall -Werror -Wextra -Wcast-align -Wcast-qual -Wenum-compare -Wfloat-equal -Wformat=2 -Winline -Winvalid-pch -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-compare -Wundef -Wuninitialized -Wwrite-strings  -fstack-protector -MMD -Iinclude -D_XOPEN_SOURCE=700 -DBORINGSSL_IMPLEMENTATION -fno-strict-aliasing -fvisibility=hidden -Wno-cast-align   -march=x86-64  -m64  -c -o /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/aes/aes.o crypto/aes/aes.c
cc -I/opt/boxen/homebrew/include -std=c1x -Wbad-function-cast -Wmissing-field-initializers -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes  -fpic -fdata-sections -ffunction-sections -gfull -pedantic -pedantic-errors -Wall -Werror -Wextra -Wcast-align -Wcast-qual -Wenum-compare -Wfloat-equal -Wformat=2 -Winline -Winvalid-pch -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-compare -Wundef -Wuninitialized -Wwrite-strings  -fstack-protector -MMD -Iinclude -D_XOPEN_SOURCE=700 -DBORINGSSL_IMPLEMENTATION -fno-strict-aliasing -fvisibility=hidden -Wno-cast-align   -march=x86-64  -m64  -c -o /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/bn/add.o crypto/bn/add.c
cc -I/opt/boxen/homebrew/include -std=c1x -Wbad-function-cast -Wmissing-field-initializers -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes  -fpic -fdata-sections -ffunction-sections -gfull -pedantic -pedantic-errors -Wall -Werror -Wextra -Wcast-align -Wcast-qual -Wenum-compare -Wfloat-equal -Wformat=2 -Winline -Winvalid-pch -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-compare -Wundef -Wuninitialized -Wwrite-strings  -fstack-protector -MMD -Iinclude -D_XOPEN_SOURCE=700 -DBORINGSSL_IMPLEMENTATION -fno-strict-aliasing -fvisibility=hidden -Wno-cast-align   -march=x86-64  -m64  -c -o /Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/bn/bn.o crypto/bn/bn.c

--- stderr
crypto/aes/aes.c:575:6: error: no previous prototype for function 'GFp_AES_encrypt' [-Werror,-Wmissing-prototypes]
void GFp_AES_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) {
     ^
crypto/aes/aes.c:587:5: error: no previous prototype for function 'GFp_AES_set_encrypt_key' [-Werror,-Wmissing-prototypes]
int GFp_AES_set_encrypt_key(const uint8_t *key, unsigned bits,
    ^
2 errors generated.
make: *** [/Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/aes/aes.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from crypto/bn/add.c:62:
In file included from include/openssl/mem.h:60:
include/openssl/base.h:109:9: error: 'OPENSSL_VERSION_NUMBER' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_VERSION_NUMBER 0x10002000
        ^
/opt/boxen/homebrew/include/openssl/opensslv.h:33:10: note: previous definition is here
# define OPENSSL_VERSION_NUMBER  0x100020afL
         ^
In file included from crypto/bn/add.c:62:
In file included from include/openssl/mem.h:60:
include/openssl/base.h:114:9: error: 'OPENSSL_EXPORT' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_EXPORT
        ^
/opt/boxen/homebrew/include/openssl/e_os2.h:276:11: note: previous definition is here
#  define OPENSSL_EXPORT extern
          ^
In file included from crypto/bn/add.c:62:
include/openssl/mem.h:77:9: error: 'OPENSSL_malloc' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_malloc malloc
        ^
/opt/boxen/homebrew/include/openssl/crypto.h:381:10: note: previous definition is here
# define OPENSSL_malloc(num)     CRYPTO_malloc((int)num,__FILE__,__LINE__)
         ^
In file included from crypto/bn/add.c:62:
include/openssl/mem.h:78:9: error: 'OPENSSL_realloc' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_realloc realloc
        ^
/opt/boxen/homebrew/include/openssl/crypto.h:383:10: note: previous definition is here
# define OPENSSL_realloc(addr,num) \
         ^
In file included from crypto/bn/add.c:62:
include/openssl/mem.h:79:9: error: 'OPENSSL_free' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_free free
        ^
/opt/boxen/homebrew/include/openssl/crypto.h:390:10: note: previous definition is here
# define OPENSSL_free(addr)      CRYPTO_free(addr)
         ^
In file included from crypto/bn/add.c:64:
crypto/bn/internal.h:145:9: error: 'BN_ULLONG' macro redefined [-Werror,-Wmacro-redefined]
#define BN_ULLONG       uint128_t
        ^
/opt/boxen/homebrew/include/openssl/bn.h:182:11: note: previous definition is here
#  define BN_ULLONG       unsigned long long
          ^
In file included from crypto/bn/add.c:64:
crypto/bn/internal.h:151:9: error: 'BN_MASK2' macro redefined [-Werror,-Wmacro-redefined]
#define BN_MASK2        (0xffffffffffffffffUL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:190:11: note: previous definition is here
#  define BN_MASK2        (0xffffffffffffffffL)
          ^
In file included from crypto/bn/add.c:64:
crypto/bn/internal.h:152:9: error: 'BN_MASK2l' macro redefined [-Werror,-Wmacro-redefined]
#define BN_MASK2l       (0xffffffffUL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:191:11: note: previous definition is here
#  define BN_MASK2l       (0xffffffffL)
          ^
In file included from crypto/bn/add.c:64:
crypto/bn/internal.h:153:9: error: 'BN_MASK2h' macro redefined [-Werror,-Wmacro-redefined]
#define BN_MASK2h       (0xffffffff00000000UL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:192:11: note: previous definition is here
#  define BN_MASK2h       (0xffffffff00000000L)
          ^
In file included from crypto/bn/add.c:64:
crypto/bn/internal.h:154:9: error: 'BN_MASK2h1' macro redefined [-Werror,-Wmacro-redefined]
#define BN_MASK2h1      (0xffffffff80000000UL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:193:11: note: previous definition is here
#  define BN_MASK2h1      (0xffffffff80000000L)
          ^
In file included from crypto/bn/add.c:64:
crypto/bn/internal.h:157:9: error: 'BN_TBIT' macro redefined [-Werror,-Wmacro-redefined]
#define BN_TBIT         (0x8000000000000000UL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:194:11: note: previous definition is here
#  define BN_TBIT         (0x8000000000000000L)
          ^
crypto/bn/add.c:85:9: error: implicit declaration of function 'GFp_BN_ucmp' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (GFp_BN_ucmp(a, b) < 0) {
        ^
crypto/bn/add.c:86:12: error: implicit declaration of function 'GFp_BN_usub_unchecked' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      if (!GFp_BN_usub_unchecked(r, b, a)) {
           ^
crypto/bn/add.c:99:9: error: implicit declaration of function 'GFp_BN_uadd' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  ret = GFp_BN_uadd(r, a, b);
        ^
crypto/bn/add.c:99:9: note: did you mean 'GFp_BN_add'?
crypto/bn/add.c:67:5: note: 'GFp_BN_add' declared here
int GFp_BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) {
    ^
crypto/bn/add.c:67:5: error: no previous prototype for function 'GFp_BN_add' [-Werror,-Wmissing-prototypes]
int GFp_BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) {
    ^
crypto/bn/add.c:118:7: error: implicit declaration of function 'GFp_bn_wexpand' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  if (GFp_bn_wexpand(r, max + 1) == NULL) {
      ^
crypto/bn/add.c:118:34: error: comparison between pointer and integer ('int' and 'void *') [-Werror]
  if (GFp_bn_wexpand(r, max + 1) == NULL) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
crypto/bn/add.c:104:5: error: no previous prototype for function 'GFp_BN_uadd' [-Werror,-Wmissing-prototypes]
int GFp_BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) {
    ^
crypto/bn/add.c:200:30: error: comparison between pointer and integer ('int' and 'void *') [-Werror]
  if (GFp_bn_wexpand(r, max) == NULL) {
      ~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [/Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/bn/add.o] Error 1
In file included from crypto/bn/bn.c:63:
In file included from include/openssl/mem.h:60:
include/openssl/base.h:109:9: error: 'OPENSSL_VERSION_NUMBER' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_VERSION_NUMBER 0x10002000
        ^
/opt/boxen/homebrew/include/openssl/opensslv.h:33:10: note: previous definition is here
# define OPENSSL_VERSION_NUMBER  0x100020afL
         ^
In file included from crypto/bn/bn.c:63:
In file included from include/openssl/mem.h:60:
include/openssl/base.h:114:9: error: 'OPENSSL_EXPORT' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_EXPORT
        ^
/opt/boxen/homebrew/include/openssl/e_os2.h:276:11: note: previous definition is here
#  define OPENSSL_EXPORT extern
          ^
In file included from crypto/bn/bn.c:63:
include/openssl/mem.h:77:9: error: 'OPENSSL_malloc' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_malloc malloc
        ^
/opt/boxen/homebrew/include/openssl/crypto.h:381:10: note: previous definition is here
# define OPENSSL_malloc(num)     CRYPTO_malloc((int)num,__FILE__,__LINE__)
         ^
In file included from crypto/bn/bn.c:63:
include/openssl/mem.h:78:9: error: 'OPENSSL_realloc' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_realloc realloc
        ^
/opt/boxen/homebrew/include/openssl/crypto.h:383:10: note: previous definition is here
# define OPENSSL_realloc(addr,num) \
         ^
In file included from crypto/bn/bn.c:63:
include/openssl/mem.h:79:9: error: 'OPENSSL_free' macro redefined [-Werror,-Wmacro-redefined]
#define OPENSSL_free free
        ^
/opt/boxen/homebrew/include/openssl/crypto.h:390:10: note: previous definition is here
# define OPENSSL_free(addr)      CRYPTO_free(addr)
         ^
In file included from crypto/bn/bn.c:65:
crypto/bn/internal.h:145:9: error: 'BN_ULLONG' macro redefined [-Werror,-Wmacro-redefined]
#define BN_ULLONG       uint128_t
        ^
/opt/boxen/homebrew/include/openssl/bn.h:182:11: note: previous definition is here
#  define BN_ULLONG       unsigned long long
          ^
In file included from crypto/bn/bn.c:65:
crypto/bn/internal.h:151:9: error: 'BN_MASK2' macro redefined [-Werror,-Wmacro-redefined]
#define BN_MASK2        (0xffffffffffffffffUL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:190:11: note: previous definition is here
#  define BN_MASK2        (0xffffffffffffffffL)
          ^
In file included from crypto/bn/bn.c:65:
crypto/bn/internal.h:152:9: error: 'BN_MASK2l' macro redefined [-Werror,-Wmacro-redefined]
#define BN_MASK2l       (0xffffffffUL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:191:11: note: previous definition is here
#  define BN_MASK2l       (0xffffffffL)
          ^
In file included from crypto/bn/bn.c:65:
crypto/bn/internal.h:153:9: error: 'BN_MASK2h' macro redefined [-Werror,-Wmacro-redefined]
#define BN_MASK2h       (0xffffffff00000000UL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:192:11: note: previous definition is here
#  define BN_MASK2h       (0xffffffff00000000L)
          ^
In file included from crypto/bn/bn.c:65:
crypto/bn/internal.h:154:9: error: 'BN_MASK2h1' macro redefined [-Werror,-Wmacro-redefined]
#define BN_MASK2h1      (0xffffffff80000000UL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:193:11: note: previous definition is here
#  define BN_MASK2h1      (0xffffffff80000000L)
          ^
In file included from crypto/bn/bn.c:65:
crypto/bn/internal.h:157:9: error: 'BN_TBIT' macro redefined [-Werror,-Wmacro-redefined]
#define BN_TBIT         (0x8000000000000000UL)
        ^
/opt/boxen/homebrew/include/openssl/bn.h:194:11: note: previous definition is here
#  define BN_TBIT         (0x8000000000000000L)
          ^
crypto/bn/bn.c:72:5: error: implicit declaration of function 'OPENSSL_PUT_ERROR' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    OPENSSL_PUT_ERROR(BN, ERR_R_MALLOC_FAILURE);
    ^
crypto/bn/bn.c:72:23: error: use of undeclared identifier 'BN'
    OPENSSL_PUT_ERROR(BN, ERR_R_MALLOC_FAILURE);
                      ^
crypto/bn/bn.c:68:9: error: no previous prototype for function 'GFp_BN_new' [-Werror,-Wmissing-prototypes]
BIGNUM *GFp_BN_new(void) {
        ^
crypto/bn/bn.c:82:6: error: no previous prototype for function 'GFp_BN_init' [-Werror,-Wmissing-prototypes]
void GFp_BN_init(BIGNUM *bn) {
     ^
crypto/bn/bn.c:86:6: error: no previous prototype for function 'GFp_BN_free' [-Werror,-Wmissing-prototypes]
void GFp_BN_free(BIGNUM *bn) {
     ^
crypto/bn/bn.c:107:7: error: implicit declaration of function 'GFp_bn_wexpand' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  if (GFp_bn_wexpand(dest, src->top) == NULL) {
      ^
crypto/bn/bn.c:107:38: error: comparison between pointer and integer ('int' and 'void *') [-Werror]
  if (GFp_bn_wexpand(dest, src->top) == NULL) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
crypto/bn/bn.c:102:9: error: no previous prototype for function 'GFp_BN_copy' [-Werror,-Wmissing-prototypes]
BIGNUM *GFp_BN_copy(BIGNUM *dest, const BIGNUM *src) {
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [/Users/kushalpisavadia/Projects/cernan/target/debug/build/ring-540e5df33a7f7e62/out/obj/crypto/bn/bn.o] Error 1
thread 'main' panicked at 'make execution failed', /Users/kushalpisavadia/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.4.3/build.rs:211
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Environment Information

Homebrew

ᐅ brew config
HOMEBREW_VERSION: 1.1.7
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 9cce3414fbd39d146d97911dbb3bf07fffaa1080
Last commit: 7 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: b3a4e1fdd2ab928347968a79d21ca71cbc2667cb
Core tap last commit: 5 hours ago
HOMEBREW_PREFIX: /opt/boxen/homebrew
HOMEBREW_REPOSITORY: /opt/boxen/homebrew
HOMEBREW_CELLAR: /opt/boxen/homebrew/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.11.0 => /opt/boxen/homebrew/bin/git
Perl: /usr/bin/perl
Python: /opt/boxen/homebrew/bin/python => /opt/boxen/homebrew/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /opt/boxen/rbenv/shims/ruby => /opt/rubies/2.3.1/bin/ruby
Java: 1.8.0_92, 1.7.0_71
macOS: 10.12.2-x86_64
Xcode: 8.2.1
CLT: N/A
X11: N/A

OpenSSL

ᐅ brew info openssl
openssl: stable 1.0.2j [keg-only]
SSL/TLS cryptography library
https://openssl.org/
/opt/boxen/homebrew/Cellar/openssl/1.0.2j (1,696 files, 12M) *
  Built from source on 2016-10-10 at 11:19:16
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl.rb
==> Dependencies
Build: makedepend ✔

Rust

ᐅ brew info rust
rust: stable 1.14.0, HEAD
Safe, concurrent, practical language
https://www.rust-lang.org/
Conflicts with: multirust
/opt/boxen/homebrew/Cellar/rust/1.14.0 (24,937 files, 241.7M) *
  Built from source on 2017-01-16 at 17:28:07
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/rust.rb
==> Dependencies
Build: cmake ✔
Required: pkg-config ✔, openssl ✔, libssh2 ✔
Optional: llvm ✔
==> Requirements
Build: git ✔

Additional environment variables

Taken from: https://github.com/postmates/cernan/wiki/Quickstart#building-cernan

DEP_OPENSSL_INCLUDE=/opt/boxen/homebrew/opt/openssl/include
OPENSSL_INCLUDE_DIR=/opt/boxen/homebrew/opt/openssl/include

@blt
Copy link
Collaborator Author

blt commented Jan 16, 2017

Boy, I really don't have a good idea. I'm on basically the same system and the above works for me and those are the instructions that made it into the wiki.

The ring dep is coming in through rusuto. There's already a ticket to enable feature flags #177 for lua. One cheating way to "fix" this is to put rusuto behind a similar flag, removing the dep.

@blt
Copy link
Collaborator Author

blt commented Jan 16, 2017

@KushalP I've created a branch and a PR here that updates ring to the latest version. Can you try rebuilding that branch please?

@KushalP
Copy link

KushalP commented Jan 16, 2017

Upgrading the dependencies appears to throw the same error. I'm going to pick apart my environment, includes, compiler, etc. tomorrow when I get some time.

@blt
Copy link
Collaborator Author

blt commented Jan 17, 2017

@KushalP bummer. :<

I'll try and set up a blank OS X and see if I can't reproduce.

@gliush
Copy link
Contributor

gliush commented Jan 17, 2017

I had different problem with ssl:

cargo:warning=src/openssl_shim.c:1:10: fatal error: 'openssl/hmac.h' file not found
cargo:warning=#include <openssl/hmac.h>
cargo:warning=         ^
cargo:warning=1 error generated.

And I fixed it with:

$ export C_INCLUDE_PATH=/usr/local/opt/openssl/include

Could you try if it helps?

@blt
Copy link
Collaborator Author

blt commented Aug 20, 2017

I believe this is now fixed, at least in so far as OpenSSL on OSX is always painful.

@blt blt closed this as completed Aug 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants