d-unsed / ruru

Native Ruby extensions written in Rust
MIT License
832 stars 40 forks source link

Use ruby-sys 0.2.2 #18

Closed malept closed 8 years ago

malept commented 8 years ago

This means re-adding build.rs.

steveklabnik commented 8 years ago

Wait, why does it mean re-adding build.rs?

malept commented 8 years ago

This is (part of) what happens when I comment out build = "build.rs" and run cargo test:

---- class::any_object::AnyObject::to_0 stdout ----
        <anon>:3:16: 3:25 warning: unused import, #[warn(unused_imports)] on by default
<anon>:3     use ruru::{AnyObject, Fixnum, VM};
                        ^~~~~~~~~
error: linking with `cc` failed: exit code: 1
note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "~/.multirust/toolchains/stable/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/rustdoctest.nVkSPUqZ2Nvk/rust_out.0.o" "-o" "/tmp/rustdoctest.nVkSPUqZ2Nvk/rust_out" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "ruru/target/debug/deps" "-L" "ruru/target/debug" "-L" "~/.multirust/toolchains/stable/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "ruru/target/debug/libruru.rlib" "ruru/target/debug/deps/libruby_sys-f740e5167bbefed4.rlib" "ruru/target/debug/deps/liblibc-7f0d63b960234050.rlib" "-L" "~/.multirust/toolchains/stable/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "std-4fda350b" "-l" "util" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "compiler-rt"
note: ruru/target/debug/libruru.rlib(ruru.0.o): In function `ruru::binding::fixnum::int_to_num':
ruru/src/binding/fixnum.rs:5: undefined reference to `rb_int2inum'
ruru/target/debug/libruru.rlib(ruru.0.o): In function `ruru::binding::fixnum::num_to_int':
ruru/src/binding/fixnum.rs:9: undefined reference to `rb_num2int'
ruru/target/debug/libruru.rlib(ruru.0.o): In function `ruru::binding::vm::init':
ruru/src/binding/vm.rs:6: undefined reference to `ruby_init'
collect2: error: ld returned 1 exit status

error: aborting due to previous error
thread 'class::any_object::AnyObject::to_0' panicked at 'Box<Any>', ../src/libsyntax/errors/mod.rs:613
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread 'class::any_object::AnyObject::to_0' panicked at 'couldn't compile the test', ../src/librustdoc/test.rs:280

Let me know if I should be adding something else to Cargo.toml instead.

steveklabnik commented 8 years ago

Ohhh ffuuuuuuuuuu it's because I screwed up. Let me release a 0.2.2, which doesn't need you to do that.

steveklabnik commented 8 years ago

Okay, 0.2.1 yanked, 0.2.2 should be fine without it.

malept commented 8 years ago

PR now uses ruby-sys 0.2.2, now sans build.rs.

d-unsed commented 8 years ago

Hey @malept!

Merging, thank you! (Sorry that it took a bit long to come back to it)