Skip to content

does not compile #1

@Cyrix126

Description

@Cyrix126

cargo build fail to compile, here's the output



The following warnings were emitted during compilation:

warning: src/openssl_shim.c: In function ‘SSL_CTX_set_ecdh_auto_shim’:
warning: src/openssl_shim.c:121:41: warning: unused parameter ‘ctx’ [-Wunused-parameter]
warning:   121 | int SSL_CTX_set_ecdh_auto_shim(SSL_CTX *ctx, int onoff) {
warning:       |                                ~~~~~~~~~^~~
warning: src/openssl_shim.c: In function ‘DH_new_from_params’:
warning: src/openssl_shim.c:132:7: error: invalid use of incomplete typedef ‘DH’ {aka ‘struct dh_st’}
warning:   132 |     dh->p = p;
warning:       |       ^~
warning: src/openssl_shim.c:133:7: error: invalid use of incomplete typedef ‘DH’ {aka ‘struct dh_st’}
warning:   133 |     dh->g = g;
warning:       |       ^~
warning: src/openssl_shim.c:134:7: error: invalid use of incomplete typedef ‘DH’ {aka ‘struct dh_st’}
warning:   134 |     dh->q = q;
warning:       |       ^~
warning: src/openssl_shim.c: In function ‘X509_get_extensions_shim’:
warning: src/openssl_shim.c:143:13: error: invalid use of incomplete typedef ‘X509’ {aka ‘struct x509_st’}
warning:   143 |     return x->cert_info ? x->cert_info->extensions : NULL;
warning:       |             ^~
warning: src/openssl_shim.c:143:28: error: invalid use of incomplete typedef ‘X509’ {aka ‘struct x509_st’}
warning:   143 |     return x->cert_info ? x->cert_info->extensions : NULL;
warning:       |                            ^~
warning: src/openssl_shim.c:144:1: warning: control reaches end of non-void function [-Wreturn-type]
warning:   144 | }
warning:       | ^

error: failed to run custom build command for `openssl-sys-extras v0.7.14`

Caused by:
  process didn't exit successfully: `~/code/transfer-rs/target/debug/build/openssl-sys-extras-e95b6f6617f62051/build-script-build` (exit status: 101)
  --- stdout
  TARGET = Some("aarch64-unknown-linux-gnu")
  OPT_LEVEL = Some("0")
  TARGET = Some("aarch64-unknown-linux-gnu")
  HOST = Some("aarch64-unknown-linux-gnu")
  TARGET = Some("aarch64-unknown-linux-gnu")
  TARGET = Some("aarch64-unknown-linux-gnu")
  HOST = Some("aarch64-unknown-linux-gnu")
  CC_aarch64-unknown-linux-gnu = None
  CC_aarch64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  HOST = Some("aarch64-unknown-linux-gnu")
  TARGET = Some("aarch64-unknown-linux-gnu")
  HOST = Some("aarch64-unknown-linux-gnu")
  CFLAGS_aarch64-unknown-linux-gnu = None
  CFLAGS_aarch64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  DEBUG = Some("true")
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-I" "/usr/include" "-Wall" "-Wextra" "-o" "~/code/transfer-rs/target/debug/build/openssl-sys-extras-2c5164fe4320e1a5/out/src/openssl_shim.o" "-c" "src/openssl_shim.c"
  cargo:warning=src/openssl_shim.c: In function ‘SSL_CTX_set_ecdh_auto_shim’:
  cargo:warning=src/openssl_shim.c:121:41: warning: unused parameter ‘ctx’ [-Wunused-parameter]
  cargo:warning=  121 | int SSL_CTX_set_ecdh_auto_shim(SSL_CTX *ctx, int onoff) {
  cargo:warning=      |                                ~~~~~~~~~^~~
  cargo:warning=src/openssl_shim.c: In function ‘DH_new_from_params’:
  cargo:warning=src/openssl_shim.c:132:7: error: invalid use of incomplete typedef ‘DH’ {aka ‘struct dh_st’}
  cargo:warning=  132 |     dh->p = p;
  cargo:warning=      |       ^~
  cargo:warning=src/openssl_shim.c:133:7: error: invalid use of incomplete typedef ‘DH’ {aka ‘struct dh_st’}
  cargo:warning=  133 |     dh->g = g;
  cargo:warning=      |       ^~
  cargo:warning=src/openssl_shim.c:134:7: error: invalid use of incomplete typedef ‘DH’ {aka ‘struct dh_st’}
  cargo:warning=  134 |     dh->q = q;
  cargo:warning=      |       ^~
  cargo:warning=src/openssl_shim.c: In function ‘X509_get_extensions_shim’:
  cargo:warning=src/openssl_shim.c:143:13: error: invalid use of incomplete typedef ‘X509’ {aka ‘struct x509_st’}
  cargo:warning=  143 |     return x->cert_info ? x->cert_info->extensions : NULL;
  cargo:warning=      |             ^~
  cargo:warning=src/openssl_shim.c:143:28: error: invalid use of incomplete typedef ‘X509’ {aka ‘struct x509_st’}
  cargo:warning=  143 |     return x->cert_info ? x->cert_info->extensions : NULL;
  cargo:warning=      |                            ^~
  cargo:warning=src/openssl_shim.c:144:1: warning: control reaches end of non-void function [-Wreturn-type]
  cargo:warning=  144 | }
  cargo:warning=      | ^
  exit status: 1

  --- stderr
  thread 'main' panicked at '

  Internal error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-I" "/usr/include" "-Wall" "-Wextra" "-o" "~/code/transfer-rs/target/debug/build/openssl-sys-extras-2c5164fe4320e1a5/out/src/openssl_shim.o" "-c" "src/openssl_shim.c" with args "cc" did not execute successfully (status code exit status: 1).

  ', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.55/src/lib.rs:1672:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: src/c_helpers.c: In function ‘rust_SSL_clone’:
warning: src/c_helpers.c:4:5: warning: implicit declaration of function ‘CRYPTO_add’ [-Wimplicit-function-declaration]
warning:     4 |     CRYPTO_add(&ssl->references, 1, CRYPTO_LOCK_SSL);
warning:       |     ^~~~~~~~~~
warning: src/c_helpers.c:4:20: error: invalid use of incomplete typedef ‘SSL’ {aka ‘struct ssl_st’}
warning:     4 |     CRYPTO_add(&ssl->references, 1, CRYPTO_LOCK_SSL);
warning:       |                    ^~
warning: src/c_helpers.c:4:37: error: ‘CRYPTO_LOCK_SSL’ undeclared (first use in this function); did you mean ‘CRYPTO_LOCK’?
warning:     4 |     CRYPTO_add(&ssl->references, 1, CRYPTO_LOCK_SSL);
warning:       |                                     ^~~~~~~~~~~~~~~
warning:       |                                     CRYPTO_LOCK
warning: src/c_helpers.c:4:37: note: each undeclared identifier is reported only once for each function it appears in
warning: src/c_helpers.c: In function ‘rust_SSL_CTX_clone’:
warning: src/c_helpers.c:8:20: error: invalid use of incomplete typedef ‘SSL_CTX’ {aka ‘struct ssl_ctx_st’}
warning:     8 |     CRYPTO_add(&ctx->references,1,CRYPTO_LOCK_SSL_CTX);
warning:       |                    ^~
warning: src/c_helpers.c:8:35: error: ‘CRYPTO_LOCK_SSL_CTX’ undeclared (first use in this function); did you mean ‘CRYPTO_EX_INDEX_SSL_CTX’?
warning:     8 |     CRYPTO_add(&ctx->references,1,CRYPTO_LOCK_SSL_CTX);
warning:       |                                   ^~~~~~~~~~~~~~~~~~~
warning:       |                                   CRYPTO_EX_INDEX_SSL_CTX
warning: src/c_helpers.c: In function ‘rust_X509_clone’:
warning: src/c_helpers.c:12:21: error: invalid use of incomplete typedef ‘X509’ {aka ‘struct x509_st’}
warning:    12 |     CRYPTO_add(&x509->references,1,CRYPTO_LOCK_X509);
warning:       |                     ^~
warning: src/c_helpers.c:12:36: error: ‘CRYPTO_LOCK_X509’ undeclared (first use in this function); did you mean ‘CRYPTO_LOCK’?
warning:    12 |     CRYPTO_add(&x509->references,1,CRYPTO_LOCK_X509);
warning:       |                                    ^~~~~~~~~~~~~~~~
warning:       |                                    CRYPTO_LOCK

error: build failed


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions