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

undefined reference to `bn_is_zero' #68

Closed
emk opened this issue Oct 7, 2014 · 8 comments
Closed

undefined reference to `bn_is_zero' #68

emk opened this issue Oct 7, 2014 · 8 comments

Comments

@emk
Copy link

emk commented Oct 7, 2014

My builds of iron-based projects are still failing with something related to the BN_is_zero problem, despite running cargo update:

Installing Rust and Cargo
62.41s$ curl -sL https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz | tar --strip-components=1 -C ~/rust -xzf -
7.53s$ curl -sL https://static.rust-lang.org/cargo-dist/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz | tar --strip-components=1 -C ~/rust -xzf -
0.01s0.01s0.13s$ rustc --version
rustc 0.12.0-nightly (dc987adfc 2014-10-04 23:42:07 +0000)
0.03s$ cargo --version
cargo 0.0.1-pre-nightly (f0762df 2014-10-03 01:57:14 +0000)
before_script
9.14s$ cargo update
    Updating git repository `https://github.com/iron/router.git`
    Updating git repository `https://github.com/iron/logger.git`
    Updating git repository `https://github.com/iron/iron.git`
    Updating git repository `https://github.com/conduit-rust/route-recognizer.rs.git`
    Updating git repository `https://github.com/servo/rust-url.git`
    Updating git repository `https://github.com/lifthrasiir/rust-encoding`
    Updating git repository `https://github.com/reem/rust-error.git`
    Updating git repository `https://github.com/reem/rust-typeable.git`
    Updating git repository `https://github.com/reem/rust-replace-map.git`
    Updating git repository `https://github.com/reem/rust-typemap.git`
    Updating git repository `https://github.com/reem/rust-phantom.git`
    Updating git repository `https://github.com/reem/rust-unsafe-any.git`
    Updating git repository `https://github.com/reem/rust-http-content-type.git`
    Updating git repository `https://github.com/sfackler/rust-phf.git`
    Updating git repository `https://github.com/chris-morgan/rust-http.git`
    Updating git repository `https://github.com/sfackler/rust-openssl.git`
    Updating git repository `https://github.com/reem/rust-plugin.git`
37.53s$ cargo build
   Compiling phantom v0.0.0 (https://github.com/reem/rust-phantom.git#deb5acfe)
   Compiling route-recognizer v0.1.0 (https://github.com/conduit-rust/route-recognizer.rs.git#9dfb3413)
   Compiling encoding v0.1.0 (https://github.com/lifthrasiir/rust-encoding#97e5a566)
   Compiling phf_mac v0.0.0 (https://github.com/sfackler/rust-phf.git#a1b50302)
   Compiling typeable v0.0.1 (https://github.com/reem/rust-typeable.git#55154e18)
   Compiling replace-map v0.0.1 (https://github.com/reem/rust-replace-map.git#140217a7)
   Compiling unsafe-any v0.1.0 (https://github.com/reem/rust-unsafe-any.git#75cff194)
   Compiling openssl v0.0.0 (https://github.com/sfackler/rust-openssl.git#40c69488)
   Compiling phf v0.0.0 (https://github.com/sfackler/rust-phf.git#a1b50302)
   Compiling error v0.0.0 (https://github.com/reem/rust-error.git#a04b3213)
   Compiling typemap v0.0.0 (https://github.com/reem/rust-typemap.git#895f26e2)
   Compiling plugin v0.0.0 (https://github.com/reem/rust-plugin.git#19b97b79)
   Compiling url v0.1.0 (https://github.com/servo/rust-url.git#55b18b79)
   Compiling http v0.1.0-pre (https://github.com/chris-morgan/rust-http.git#bd06bef0)
   Compiling generator v0.1.0 (https://github.com/reem/rust-http-content-type.git#6f656bbe)
   Compiling content_type v0.1.0 (https://github.com/reem/rust-http-content-type.git#6f656bbe)
   Compiling iron v0.0.1 (https://github.com/iron/iron.git#2cefd9a0)
   Compiling router v0.1.0 (https://github.com/iron/router.git#6911bf35)
   Compiling logger v0.1.0 (https://github.com/iron/logger.git#7ace037e)
   Compiling heroku-rust-cargo-hello v1.0.0 (file:///home/travis/build/emk/heroku-rust-cargo-hello)
error: linking with `cc` failed: exit code: 1
note: cc '-m64' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-o' '/home/travis/build/emk/heroku-rust-cargo-hello/target/hello' '/home/travis/build/emk/heroku-rust-cargo-hello/target/hello.o' '-Wl,--whole-archive' '-lmorestack' '-Wl,--no-whole-archive' '-nodefaultlibs' '-fno-lto' '-Wl,--gc-sections' '-pie' '-Wl,--as-needed' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/librouter-6398087b87453241.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libroute-recognizer-e21fcedb311c4a38.rlib' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lnative-4e7c5e5c' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/liblogger-6a39d0e2c1e16083.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libiron-94e197af3c7f7b9d.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libcontent_type-b3fc4f01bc3dcbfb.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libphf-4fc01267f85abb4e.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/liberror-e5e02eafec1ab2f1.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libtypeable-d0d1baca4b0d6107.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libreplace-map-d1de898a4eb569a5.rlib' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps' '-lgenerator-e170cac01c08bdc6' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps' '-lphf_mac-78b8694be35c3487' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lgraphviz-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-ltime-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lgetopts-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lflate-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc_back-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lsyntax-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lfmt_macros-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-ldebug-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-larena-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lterm-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc_llvm-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrbml-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lserialize-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-llog-4e7c5e5c' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libplugin-f845a6ab531c9346.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libtypemap-3fdac74be380d9e4.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libunsafe-any-411b26d39a73c121.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libphantom-da5bb593d3eb3a9e.rlib' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lregex-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lstd-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lsync-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustrt-4e7c5e5c' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/native/http-b27c1e7938f5a5d0' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/native/openssl-fbe75530f7eda428' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/.rust' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-lssl' '-lcrypto' '-lrt' '-lpthread' '-lrt' '-ldl' '-lm' '-ldl' '-lpthread' '-lgcc_s' '-lpthread' '-lc' '-lm' '-lcompiler-rt'
note: /home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libgenerator-e170cac01c08bdc6.so: undefined reference to `bn_is_zero'
collect2: ld returned 1 exit status

It looks like @reem is following up at the Rust level, but in case it helps, my toy project is here.

Thank you for the lovely library!

vhbit added a commit to vhbit/rust-openssl that referenced this issue Oct 7, 2014
@vhbit
Copy link
Contributor

vhbit commented Oct 7, 2014

@emk check if the problem is fixed in commit above

@emk
Copy link
Author

emk commented Oct 7, 2014

I've queued up a build on Rust CI. If this turns green in the next 15 minutes or so, we're good. (I may or may not be around.)

Thank you for looking into this problem!

@vhbit
Copy link
Contributor

vhbit commented Oct 7, 2014

I believe it wouldn't help :-) Rust CI uses Travis and on Travis there were no problems with bn_is_zero even before this patch

@reem
Copy link
Contributor

reem commented Oct 7, 2014

@vhbit Iron was erroring, so it should fail. Unfortunately I just simultaneously patched rust-http-content-type to not use rust-openssl. I'll reset the change and see if we can fix this.

@reem
Copy link
Contributor

reem commented Oct 7, 2014

@vhbit Tried building with your fork, looks green! I knew I must have munged something up with linking.

@vhbit
Copy link
Contributor

vhbit commented Oct 7, 2014

ok, creating PR then

@emk
Copy link
Author

emk commented Oct 7, 2014

My apologies, I thought the change had already been merged.

I'll run another build in an hour or so, when I get back. Thank you, everybody!

vhbit added a commit to vhbit/rust-openssl that referenced this issue Oct 7, 2014
vhbit added a commit to vhbit/rust-openssl that referenced this issue Oct 7, 2014
@emk
Copy link
Author

emk commented Oct 7, 2014

Still failing with errors about bn_is_zero as of 9:30am Eastern. So indirect dependencies on rust-openssl via iron aren't picking up either fix at the moment. I imagine that you both know this, already. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants