kryptco / kr

DEPRECATED A dev tool for SSH auth + Git commit/tag signing using a key stored in Krypton.
https://krypt.co/developers/
Other
1.59k stars 109 forks source link

Compile error: error: failed to run custom build command for `openssl v0.9.24` #237

Open daenney opened 6 years ago

daenney commented 6 years ago

I can't seem to build 2.4.12 (using the PKGBUILD on AUR). I'm also weirded out by the fact it tries to link against OpenSSL 0.9.x?

==> Making package: kr 2.4.12-1 (Mon 17 Sep 2018 09:40:16 CEST)
==> Retrieving sources...
  -> Updating kr git repo...
Fetching origin
remote: Counting objects: 45, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 45 (delta 23), reused 43 (delta 23), pack-reused 0
Unpacking objects: 100% (45/45), done.
From https://github.com/kryptco/kr
 * [new branch]      go1.11-fix          -> go1.11-fix
   309230e..ee6b7db  master              -> master
 + 1c73887...21f32e4 refs/pull/228/merge -> refs/pull/228/merge  (forced update)
 * [new ref]         refs/pull/236/head  -> refs/pull/236/head
 * [new tag]         2.4.12              -> 2.4.12
==> Validating source files with md5sums...
    kr ... Skipped
==> Making package: kr 2.4.12-1 (Mon 17 Sep 2018 09:40:18 AM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (15) c-ares-1.14.0-1  http-parser-2.8.1-1  icu-62.1-1  libnsl-1.2.0-1  libuv-1.23.0-1
              perl-error-0.17026-2  perl-mailtools-2.20-2  perl-timedate-2.30-5  git-2.19.0-1  go-2:1.11-1
              nodejs-10.10.0-1  python-3.7.0-3  python2-2.7.15-2  rsync-3.1.3-1  rustup-1.13.0-3

Total Installed Size:  732.25 MiB

:: Proceed with installation? [Y/n] 
(15/15) checking keys in keyring                                      [#######################################] 100%
(15/15) checking package integrity                                    [#######################################] 100%
(15/15) loading package files                                         [#######################################] 100%
(15/15) checking for file conflicts                                   [#######################################] 100%
:: Processing package changes...
( 1/15) installing rustup                                             [#######################################] 100%
You may need to run rustup update stable
and possibly also rustup self upgrade-data
Optional dependencies for rustup
    lldb: rust-lldb script
    gdb: rust-gdb script
( 2/15) installing go                                                 [#######################################] 100%
( 3/15) installing rsync                                              [#######################################] 100%
( 4/15) installing icu                                                [#######################################] 100%
( 5/15) installing libnsl                                             [#######################################] 100%
( 6/15) installing libuv                                              [#######################################] 100%
( 7/15) installing http-parser                                        [#######################################] 100%
( 8/15) installing c-ares                                             [#######################################] 100%
( 9/15) installing nodejs                                             [#######################################] 100%
Optional dependencies for nodejs
    npm: nodejs package manager
(10/15) installing perl-error                                         [#######################################] 100%
(11/15) installing perl-timedate                                      [#######################################] 100%
(12/15) installing perl-mailtools                                     [#######################################] 100%
(13/15) installing git                                                [#######################################] 100%
Optional dependencies for git
    tk: gitk and git gui
    perl-libwww: git svn
    perl-term-readkey: git svn
    perl-mime-tools: git send-email
    perl-net-smtp-ssl: git send-email TLS support
    perl-authen-sasl: git send-email TLS support
    perl-mediawiki-api: git mediawiki support
    perl-datetime-format-iso8601: git mediawiki support
    perl-lwp-protocol-https: git mediawiki https support
    perl-cgi: gitweb (web interface) support
    python2: various helper scripts [pending]
    subversion: git svn
    gnome-keyring: GNOME keyring credential helper
(14/15) installing python2                                            [#######################################] 100%
Optional dependencies for python2
    tk: for IDLE
    python2-setuptools
    python2-pip
(15/15) installing python                                             [#######################################] 100%
Optional dependencies for python
    python-setuptools
    python-pip
    sqlite [installed]
    mpdecimal: for decimal
    xz: for lzma [installed]
    tk: for tkinter
:: Running post-transaction hooks...
(1/4) Warn about old perl modules
(2/4) Reloading system manager configuration...
  Skipped: Current root is not booted.
(3/4) Creating system user accounts...
Creating group git with gid 980.
Creating user git (git daemon user) with uid 980 and gid 980.
(4/4) Arming ConditionNeedsUpdate...
==> Retrieving sources...
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Creating working copy of kr git repo...
Cloning into 'kr'...
done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
Submodule 'sigchain' (https://github.com/kryptco/sigchain) registered for path 'sigchain'
Cloning into '/build/kr/src/kr/sigchain'...
Submodule path 'sigchain': checked out '659620db74ec14d460da1515161274c741df29e9'
Submodule 'libsodium' (https://github.com/jedisct1/libsodium) registered for path 'sigchain/libsodium'
Submodule 'openssl' (https://github.com/openssl/openssl) registered for path 'sigchain/openssl'
Cloning into '/build/kr/src/kr/sigchain/libsodium'...
Cloning into '/build/kr/src/kr/sigchain/openssl'...
Submodule path 'sigchain/libsodium': checked out '5ebc0d40295ac6c509aaf1d3ed5ded6bc2a77074'
Submodule path 'sigchain/openssl': checked out 'd4e4bd2a8163f355fa8a3884077eaec7adc75ff7'
/build/kr/src
/usr/bin/rustup
thread 'main' panicked at 'binary not found', libcore/option.rs:914:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2018-09-13, rust version 1.29.0 (aa3ca1994 2018-09-11)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu installed - rustc 1.29.0 (aa3ca1994 2018-09-11)

info: downloading component 'rust-std' for 'wasm32-unknown-emscripten'
info: installing component 'rust-std' for 'wasm32-unknown-emscripten'
error: no such subcommand: `web`

        Did you mean `new`?

    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading cargo-web v0.6.10
  Installing cargo-web v0.6.10
 Downloading base-x v0.2.3
 Downloading serde v1.0.79
 Downloading toml v0.4.6
 Downloading rustc-demangle v0.1.9
 Downloading pbr v1.0.1
 Downloading serde_json v1.0.27
 Downloading futures v0.1.24
 Downloading log v0.4.5
 Downloading tempdir v0.3.7
 Downloading websocket v0.20.3
 Downloading semver v0.9.0
 Downloading libflate v0.1.16
 Downloading serde_derive v1.0.79
 Downloading parity-wasm v0.19.3
 Downloading hyper v0.11.27
 Downloading tar v0.4.16
 Downloading handlebars v0.32.4
 Downloading env_logger v0.5.13
 Downloading memmap v0.6.2
 Downloading walkdir v2.2.5
 Downloading cargo_metadata v0.5.8
 Downloading regex v0.2.11
 Downloading xdg v2.1.0
 Downloading digest v0.7.5
 Downloading clap v2.32.0
 Downloading indexmap v1.0.1
 Downloading notify v4.0.6
 Downloading ansi_term v0.11.0
 Downloading sha2 v0.7.1
 Downloading sha1 v0.6.0
 Downloading reqwest v0.8.8
 Downloading unicode_categories v0.1.1
 Downloading time v0.1.40
 Downloading libc v0.2.43
 Downloading ryu v0.2.6
 Downloading itoa v0.4.3
 Downloading cfg-if v0.1.5
 Downloading remove_dir_all v0.5.1
 Downloading rand v0.4.3
 Downloading bytes v0.4.10
 Downloading native-tls v0.1.5
 Downloading url v1.7.1
 Downloading tokio-tls v0.1.4
 Downloading sha1 v0.2.0
 Downloading tokio-io v0.1.8
 Downloading rand v0.3.22
 Downloading unicase v1.4.2
 Downloading byteorder v1.2.6
 Downloading hyper v0.10.13
 Downloading tokio-core v0.1.17
 Downloading bitflags v0.9.1
 Downloading base64 v0.5.2
 Downloading iovec v0.1.2
 Downloading lazy_static v0.2.11
 Downloading openssl v0.9.24
 Downloading lazy_static v1.1.0
 Downloading foreign-types v0.3.2
 Downloading openssl-sys v0.9.36
 Downloading version_check v0.1.4
 Downloading foreign-types-shared v0.1.1
 Downloading cc v1.0.25
 Downloading pkg-config v0.3.14
 Downloading matches v0.1.8
 Downloading idna v0.1.5
 Downloading percent-encoding v1.0.1
 Downloading unicode-bidi v0.3.4
 Downloading unicode-normalization v0.1.7
 Downloading tokio-executor v0.1.4
 Downloading tokio-reactor v0.1.5
 Downloading mio v0.6.16
 Downloading scoped-tls v0.1.2
 Downloading tokio v0.1.8
 Downloading tokio-timer v0.2.6
 Downloading slab v0.4.1
 Downloading num_cpus v1.8.0
 Downloading crossbeam-utils v0.5.0
 Downloading parking_lot v0.6.4
 Downloading lazycell v1.1.0
 Downloading net2 v0.2.33
 Downloading parking_lot_core v0.3.1
 Downloading lock_api v0.1.3
 Downloading smallvec v0.6.5
 Downloading rand v0.5.5
 Downloading unreachable v1.0.0
 Downloading void v1.0.2
 Downloading rand_core v0.2.1
 Downloading rustc_version v0.2.3
 Downloading semver-parser v0.7.0
 Downloading owning_ref v0.3.3
 Downloading scopeguard v0.3.3
 Downloading stable_deref_trait v1.1.1
 Downloading tokio-fs v0.1.3
 Downloading tokio-current-thread v0.1.1
 Downloading tokio-codec v0.1.0
 Downloading tokio-uds v0.2.1
 Downloading tokio-tcp v0.1.1
 Downloading tokio-threadpool v0.1.6
 Downloading tokio-udp v0.1.2
 Downloading crossbeam-deque v0.6.1
 Downloading crossbeam-epoch v0.5.2
 Downloading arrayvec v0.4.7
 Downloading memoffset v0.2.1
 Downloading nodrop v0.1.12
 Downloading mio-uds v0.6.7
 Downloading language-tags v0.2.2
 Downloading typeable v0.1.2
 Downloading httparse v1.3.2
 Downloading log v0.3.9
 Downloading traitobject v0.1.0
 Downloading mime v0.2.6
 Downloading base64 v0.6.0
 Downloading safemem v0.2.0
 Downloading adler32 v1.0.3
 Downloading crc v1.8.1
 Downloading build_const v0.2.1
 Downloading proc-macro2 v0.4.19
 Downloading quote v0.6.8
 Downloading syn v0.15.4
 Downloading unicode-xid v0.1.0
 Downloading parking_lot v0.4.8
 Downloading parking_lot_core v0.2.14
 Downloading futures-cpupool v0.1.8
 Downloading base64 v0.9.3
 Downloading unicase v2.1.0
 Downloading relay v0.1.1
 Downloading tokio-proto v0.1.1
 Downloading want v0.0.4
 Downloading mime v0.3.9
 Downloading tokio-service v0.1.0
 Downloading safemem v0.3.0
 Downloading slab v0.3.0
 Downloading take v0.1.0
 Downloading smallvec v0.2.1
 Downloading try-lock v0.1.0
 Downloading xattr v0.2.2
 Downloading filetime v0.2.1
 Downloading regex v1.0.5
 Downloading pest v1.0.6
 Downloading pest_derive v1.0.8
 Downloading quick-error v1.2.2
 Downloading thread_local v0.3.6
 Downloading aho-corasick v0.6.8
 Downloading utf8-ranges v1.0.1
 Downloading regex-syntax v0.6.2
 Downloading memchr v2.0.2
 Downloading ucd-util v0.1.1
 Downloading quote v0.3.15
 Downloading syn v0.11.11
 Downloading unicode-xid v0.0.4
 Downloading synom v0.11.3
 Downloading humantime v1.1.1
 Downloading atty v0.2.11
 Downloading termcolor v1.0.4
 Downloading same-file v1.0.3
 Downloading error-chain v0.11.0
 Downloading backtrace v0.3.9
 Downloading backtrace-sys v0.1.24
 Downloading regex-syntax v0.5.6
 Downloading generic-array v0.9.0
 Downloading typenum v1.10.0
 Downloading vec_map v0.8.1
 Downloading bitflags v1.0.4
 Downloading textwrap v0.10.0
 Downloading unicode-width v0.1.5
 Downloading strsim v0.7.0
 Downloading mio-extras v2.0.5
 Downloading inotify v0.6.1
 Downloading inotify-sys v0.1.3
 Downloading byte-tools v0.2.0
 Downloading fake-simd v0.1.2
 Downloading block-buffer v0.3.3
 Downloading arrayref v0.3.5
 Downloading uuid v0.6.5
 Downloading hyper-tls v0.1.4
 Downloading mime_guess v2.0.0-alpha.6
 Downloading encoding_rs v0.8.6
 Downloading serde_urlencoded v0.5.3
 Downloading phf v0.7.23
 Downloading phf_shared v0.7.23
 Downloading siphasher v0.2.3
 Downloading phf_codegen v0.7.23
 Downloading phf_generator v0.7.23
 Downloading dtoa v0.4.3
   Compiling serde v1.0.79
   Compiling semver-parser v0.7.0
   Compiling version_check v0.1.4
   Compiling void v1.0.2
   Compiling stable_deref_trait v1.1.1
   Compiling rand_core v0.2.1
   Compiling libc v0.2.43
   Compiling nodrop v0.1.12
   Compiling byteorder v1.2.6
   Compiling crossbeam-utils v0.5.0
   Compiling memoffset v0.2.1
   Compiling cfg-if v0.1.5
   Compiling scopeguard v0.3.3
   Compiling futures v0.1.24
   Compiling lazycell v1.1.0
   Compiling slab v0.4.1
   Compiling pkg-config v0.3.14
   Compiling cc v1.0.25
   Compiling siphasher v0.2.3
   Compiling openssl v0.9.24
   Compiling foreign-types-shared v0.1.1
   Compiling proc-macro2 v0.4.19
   Compiling build_const v0.2.1
   Compiling typenum v1.10.0
   Compiling unicode-xid v0.1.0
   Compiling scoped-tls v0.1.2
   Compiling bitflags v0.9.1
   Compiling httparse v1.3.2
   Compiling matches v0.1.8
   Compiling smallvec v0.2.1
   Compiling unicode-normalization v0.1.7
   Compiling unicode-xid v0.0.4
   Compiling safemem v0.3.0
   Compiling take v0.1.0
   Compiling try-lock v0.1.0
   Compiling slab v0.3.0
   Compiling ryu v0.2.6
   Compiling lazy_static v0.2.11
   Compiling ucd-util v0.1.1
   Compiling language-tags v0.2.2
   Compiling percent-encoding v1.0.1
   Compiling quote v0.3.15
   Compiling regex v1.0.5
   Compiling safemem v0.2.0
   Compiling rustc-demangle v0.1.9
   Compiling typeable v0.1.2
   Compiling unicode-width v0.1.5
   Compiling quick-error v1.2.2
   Compiling dtoa v0.4.3
   Compiling traitobject v0.1.0
   Compiling bitflags v1.0.4
   Compiling adler32 v1.0.3
   Compiling pest v1.0.6
   Compiling byte-tools v0.2.0
   Compiling same-file v1.0.3
   Compiling utf8-ranges v1.0.1
   Compiling arrayref v0.3.5
   Compiling itoa v0.4.3
   Compiling regex v0.2.11
   Compiling vec_map v0.8.1
   Compiling termcolor v1.0.4
   Compiling fake-simd v0.1.2
   Compiling sha1 v0.2.0
   Compiling ansi_term v0.11.0
   Compiling strsim v0.7.0
   Compiling remove_dir_all v0.5.1
   Compiling xdg v2.1.0
   Compiling sha1 v0.6.0
   Compiling unicode_categories v0.1.1
   Compiling indexmap v1.0.1
   Compiling base-x v0.2.3
   Compiling unreachable v1.0.0
   Compiling arrayvec v0.4.7
   Compiling owning_ref v0.3.3
   Compiling log v0.4.5
   Compiling encoding_rs v0.8.6
   Compiling lazy_static v1.1.0
   Compiling unicase v1.4.2
   Compiling unicase v2.1.0
   Compiling base64 v0.5.2
   Compiling foreign-types v0.3.2
   Compiling rand v0.5.5
   Compiling iovec v0.1.2
   Compiling net2 v0.2.33
   Compiling num_cpus v1.8.0
   Compiling rand v0.4.3
   Compiling memchr v2.0.2
   Compiling time v0.1.40
   Compiling inotify-sys v0.1.3
   Compiling filetime v0.2.1
   Compiling xattr v0.2.2
   Compiling atty v0.2.11
   Compiling memmap v0.6.2
   Compiling crc v1.8.1
   Compiling unicode-bidi v0.3.4
   Compiling synom v0.11.3
   Compiling openssl-sys v0.9.36
   Compiling backtrace-sys v0.1.24
   Compiling base64 v0.9.3
   Compiling regex-syntax v0.6.2
   Compiling regex-syntax v0.5.6
   Compiling base64 v0.6.0
   Compiling humantime v1.1.1
   Compiling textwrap v0.10.0
   Compiling walkdir v2.2.5
   Compiling block-buffer v0.3.3
   Compiling tokio-executor v0.1.4
   Compiling tokio-service v0.1.0
   Compiling relay v0.1.1
   Compiling smallvec v0.6.5
   Compiling lock_api v0.1.3
   Compiling log v0.3.9
   Compiling want v0.0.4
   Compiling bytes v0.4.10
   Compiling aho-corasick v0.6.8
   Compiling futures-cpupool v0.1.8
   Compiling mio v0.6.16
   Compiling pbr v1.0.1
   Compiling tar v0.4.16
   Compiling syn v0.11.11
   Compiling rand v0.3.22
   Compiling uuid v0.6.5
   Compiling tempdir v0.3.7
   Compiling clap v2.32.0
   Compiling tokio-timer v0.2.6
   Compiling tokio-current-thread v0.1.1
   Compiling parking_lot_core v0.2.14
   Compiling mime v0.2.6
   Compiling tokio-io v0.1.8
   Compiling mio-uds v0.6.7
   Compiling mio-extras v2.0.5
   Compiling quote v0.6.8
error: failed to run custom build command for `openssl v0.9.24`
process didn't exit successfully: `/tmp/cargo-installo9MqhO/debug/build/openssl-4dcd4d0c1d4575a6/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to detect OpenSSL version', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.24/build.rs:16:14
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-web v0.6.10`, intermediate artifacts can be found at `/tmp/cargo-installo9MqhO`

Caused by:
  build failed
==> ERROR: A failure occurred in prepare().
    Aborting...
vale981 commented 6 years ago

It tries to get the OpenSSL version by an environment variable. I've run env DEP_OPENSSL_VERSION=111 bash and compiled it.

My build fails at:

go clean -cache || true
cd sigchain && CARGO_RELEASE=--release make libsigchain-with-dashboard
make[1]: Entering directory '/home/hiro/src/kr/sigchain'
if [ "`cargo web --version`" != "cargo-web 0.6.10" ]; then echo "Please install cargo-web 0.6.10 with \`cargo install -f --version 0.6.10 cargo-web\`"; exit 1; fi
# use rsync so that file modifed times are only updated when the contents change
cd dashboard_yew && cargo web deploy --release --target=wasm32-unknown-emscripten && rsync --checksum --delete -r ../target/deploy/* ../target/deploy-final
Downloading emscripten-1.37.27-1-x86_64-unknown-linux-gnu.tgz...
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:345:21
note: Run with `RUST_BACKTRACE=1` for a backtrace.
make[1]: *** [Makefile:25: libsigchain-with-dashboard] Error 101
make[1]: Leaving directory '/home/hiro/src/kr/sigchain'
make: *** [Makefile:50: all] Error 2
vale981 commented 6 years ago

Caused by an outdated version of openssl-sys (which is discontinued).

See sigchain/Cargo.toml

[replace."openssl:0.9.23"]
git = "https://github.com/kryptco/rust-openssl"
kcking commented 6 years ago

Thank you for reporting these build issues. As a temporary workaround, version 0.6.10 of cargo-web can be installed by installing openssl-1.0 and then pointing rust-openssl to it:

$ sudo pacman -S openssl-1.0
$ env OPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0 OPENSSL_LIB_DIR=/usr/lib/openssl-1.0/ DEP_OPENSSL_VERSION=101 cargo install -f --version 0.6.10 cargo-web

After running these commands, makepkg should complete successfully. We are working on updating the PKGBUILD to use a later version of cargo-web and reqwest

As a side note, rust-openssl 0.9.x does not correspond with the OpenSSL version being linked. When building cargo-web (which is the step @daenney is failing on), rust is linking your system OpenSSL. This version of cargo-web only supports up to OpenSSL 1.0.x, which the steps above install and expose.

vale981 commented 5 years ago

Alright I feel really dumb now ;). I should have tried to install an older version of openssl. Instead, I've stared ripping sigchain out of kr, which was partially successful. Thank you.

StoppingBuck commented 5 years ago

This is still happening. I'm a little wary about the security consequences of depending on an outdated OpenSSL version...?

vale981 commented 5 years ago

This is still happening. I'm a little wary about the security consequences of depending on an outdated OpenSSL version...?

Same doubts by me...

agrinman commented 5 years ago

We're working on updating the dependency and making a version of kr available that doesn't depend on cargo-web at all. In the mean time, this should not be a worry though because cargo-web is used only for the Krypton Teams dashboard which runs locally in the browser and does not make any remote network requests. If you're not using it then there's even less to worry about. See @kcking's previous comment.

daenney commented 5 years ago

Though it's not necessarily a security risk it does mean kr is currently non-buildable, since not everyone keeps multiple version of OpenSSL around in their distros package repositories. Given there's a solution for Arch it would be lovely if someone updated the PKGBUILD in the meantime.

daenney commented 5 years ago

Could you perhaps do what Parity did and force a newer dependency: https://github.com/paritytech/substrate/pull/913/files ? That should fix the issue without needing to wait for anyone else.

AliOthmen commented 5 years ago

Hello i have this error when compile project with cargo
help please

Compiling generic-array v0.9.0 error: failed to run custom build command for openssl v0.9.24

Caused by: process didn't exit successfully: /usr/src/app/target/release/build/openssl-0d6c67a3035cbfcf/build-script-build (exit code: 101) --- stderr thread 'main' panicked at 'Unable to detect OpenSSL version', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.24/build.rs:16:14 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.

The command '/bin/sh -c cargo build --release' returned a non-zero code: 101 skipped