jshmrtn / ex-openssl

Openssl Nif wrapper for Elixir
MIT License
10 stars 4 forks source link

Compilation error #4

Open murin-matus opened 6 years ago

murin-matus commented 6 years ago
$ mix deps.get
inch_ex is missing its version requirement, use ">= 0.0.0" if it should match any version
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  bunt 0.2.0
  credo 0.8.10
  dialyxir 0.5.1
  earmark 1.2.4
  ex_doc 0.18.1
  inch_ex 0.5.6
  poison 3.1.0
  rustler 0.10.1
* Getting rustler (Hex package)
* Getting ex_doc (Hex package)
* Getting inch_ex (Hex package)
* Getting credo (Hex package)
* Getting dialyxir (Hex package)
* Getting bunt (Hex package)
* Getting poison (Hex package)
* Getting earmark (Hex package)

$ iex -S mix
Erlang/OTP 21 [erts-10.1.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

==> bunt
Compiling 2 files (.ex)
Generated bunt app
==> dialyxir
Compiling 5 files (.ex)
Generated dialyxir app
==> earmark
Compiling 3 files (.erl)
/home/robert/.asdf/installs/erlang/19.1/lib/erlang/lib/parsetools-2.1.3/include/yeccpre.hrl:60: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
Compiling 24 files (.ex)
warning: variable "matches" is unused
  lib/earmark/scanner.ex:76

warning: variable "matches" is unused
  lib/earmark/scanner.ex:79

Generated earmark app
==> ex_doc
Compiling 15 files (.ex)
warning: "not expr1 in expr2" is deprecated. Instead use "expr1 not in expr2" if you require Elixir v1.5+, or "not(expr1 in expr2)" if you have to support earlier Elixir versions
  lib/ex_doc/formatter/html.ex:291

warning: Kernel.Typespec.beam_callbacks/1 is deprecated. Use Code.Typespec.fetch_callbacks/1 instead
  lib/ex_doc/retriever.ex:494

warning: Kernel.Typespec.beam_specs/1 is deprecated. Use Code.Typespec.fetch_specs/1 instead
  lib/ex_doc/retriever.ex:481

warning: Kernel.Typespec.spec_to_ast/2 is deprecated. Use Code.Typespec.spec_to_quoted/2 instead
Found at 2 locations:
  lib/ex_doc/retriever.ex:246
  lib/ex_doc/retriever.ex:330

warning: Kernel.Typespec.type_to_ast/1 is deprecated. Use Code.Typespec.type_to_quoted/1 instead
  lib/ex_doc/retriever.ex:522

Generated ex_doc app
==> credo
Compiling 161 files (.ex)
warning: this clause cannot match because a previous clause at line 165 always matches
  lib/credo/cli/output/summary.ex:165

warning: module attribute @lint was set but never used
  lib/credo/check/find_lint_attributes.ex:23

Generated credo app
==> rustler
Compiling 2 files (.erl)
/usr/lib/erlang/lib/parsetools-2.1.2/include/yeccpre.hrl:60: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
Compiling 6 files (.ex)
warning: Kernel.to_char_list/1 is deprecated. Use Kernel.to_charlist/1 instead
  lib/rustler/toml_parser.ex:7

warning: Kernel.to_char_list/1 is deprecated. Use Kernel.to_charlist/1 instead
  lib/rustler/toml_parser.ex:7

Generated rustler app
==> ex_openssl
Compiling NIF crate :exopenssl (native/exopenssl)...
   Compiling erlang_nif-sys v0.6.3
   Compiling openssl-sys v0.9.21 (https://github.com/jshmrtn/rust-openssl.git?branch=feature/pkcs7#fbc5d4a3)
error: failed to run custom build command for `openssl-sys v0.9.21 (https://github.com/jshmrtn/rust-openssl.git?branch=feature/pkcs7#fbc5d4a3)`
process didn't exit successfully: `/development/ex-openssl/_build/dev/rustler_crates/exopenssl/debug/build/openssl-sys-4d163c72b1222885/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
cargo:rerun-if-env-changed=OPENSSL_DIR
cargo:rustc-link-lib=ssl
cargo:rustc-link-lib=crypto
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
DEBUG = Some("true")
running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-m64" "-Wall" "-Wextra" "-E" "/development/ex-openssl/_build/dev/rustler_crates/exopenssl/debug/build/openssl-sys-3d93cc51e712d750/out/expando.c"
exit code: 0
cargo:rustc-cfg=osslconf="OPENSSL_NO_SSL3_METHOD"
cargo:conf=OPENSSL_NO_SSL3_METHOD

--- stderr
thread 'main' panicked at '

This crate is only compatible with OpenSSL 1.0.1, 1.0.2, and 1.1.0, or LibreSSL
2.5 and 2.6.0, but a different version of OpenSSL was found. The build is now
aborting due to this version mismatch.

', /development/.cargo/git/checkouts/rust-openssl-9240620e21fb14b2/fbc5d4a/openssl-sys/build.rs:486:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `erlang_nif-sys v0.6.3`
process didn't exit successfully: `/development/ex-openssl/_build/dev/rustler_crates/exopenssl/debug/build/erlang_nif-sys-9bda4bd08603e1fd/build-script-build` (exit code: 101)
--- stdout
Unsupported Erlang version.

Is the erlang_nif-sys version up to date in the Cargo.toml?
Does 'cargo update' fix it?
If not please report at https://github.com/goertzenator/erlang_nif-sys.

--- stderr
thread 'main' panicked at 'gen_api.erl encountered an error.', /development/.cargo/registry/src/github.com-1ecc6299db9ec823/erlang_nif-sys-0.6.3/build.rs:28:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.

** (RuntimeError) Rust NIF compile error (rustc exit code 101)
    lib/mix/tasks/compile.rustler.ex:62: Mix.Tasks.Compile.Rustler.compile_crate/1
    (elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2
    lib/mix/tasks/compile.rustler.ex:15: Mix.Tasks.Compile.Rustler.run/1
    (mix) lib/mix/task.ex:316: Mix.Task.run_task/3
    (mix) lib/mix/tasks/compile.all.ex:68: Mix.Tasks.Compile.All.run_compiler/2
    (mix) lib/mix/tasks/compile.all.ex:52: Mix.Tasks.Compile.All.do_compile/4
    (mix) lib/mix/tasks/compile.all.ex:23: anonymous fn/1 in Mix.Tasks.Compile.All.run/1
    (mix) lib/mix/tasks/compile.all.ex:39: Mix.Tasks.Compile.All.with_logger_app/1
maennchen commented 6 years ago

This crate is only compatible with OpenSSL 1.0.1, 1.0.2, and 1.1.0, or LibreSSL 2.5 and 2.6.0, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch.

murin-matus commented 6 years ago

Hello,

thank you for your fast response. Do you plan to use current version of rust-openssl or update supported versions of OpenSSL?

Thank you.

maennchen commented 6 years ago

@murin-matus Currently I'm not working on this project. But I'd be happy to accept PR's.

I'm probably going to continue on this in 1-2 months and do updates then.