jauhien / iron-kaleidoscope

LLVM tutorial in Rust language
Other
1.16k stars 83 forks source link

Can't build the project #4

Closed jagajaga closed 8 years ago

jagajaga commented 8 years ago

Hello! Using the latest nightly (1.9.0) I can't build the project. I really don't know what's the problem.. Here is full log:

    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating git repository `https://github.com/jauhien/iron-llvm.git`
   Compiling libc v0.1.12
   Compiling libc v0.2.8
   Compiling bitflags v0.3.3
   Compiling mempool v0.2.0
   Compiling semver v0.1.20
   Compiling strsim v0.3.0
   Compiling gcc v0.3.26
   Compiling rustc-serialize v0.3.18
   Compiling utf8-ranges v0.1.3
   Compiling regex-syntax v0.3.1
   Compiling bitflags v0.5.0
/home/jaga/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.1.12/rust/src/liblibc/lib.rs:81:21: 81:39 warning: lint raw_pointer_derive has been removed: using derive with raw pointers is ok
/home/jaga/.cargo/registry/src/github.com-88ac128001ac3a9a/libc-0.1.12/rust/src/liblibc/lib.rs:81 #![allow(bad_style, raw_pointer_derive)]
                                                                                                                      ^~~~~~~~~~~~~~~~~~
   Compiling llvm-sys v0.2.1
   Compiling cmake v0.1.16
   Compiling llvm-sys v0.3.0
   Compiling memchr v0.1.10
   Compiling aho-corasick v0.5.1
   Compiling iron_llvm v0.0.1 (https://github.com/jauhien/iron-llvm.git#401fbb93)
   Compiling regex v0.1.60
   Compiling regex_macros v0.1.34
   Compiling docopt v0.6.78
   Compiling iron_kaleidoscope v0.0.1 (file:///home/Sexy/Programming/Rust/iron-kaleidoscope)
src/builder.rs:227:13: 227:30 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:227         Ok((function.to_ref(), false))
                               ^~~~~~~~~~~~~~~~~
src/builder.rs:227:13: 227:30 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:227:13: 227:30 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:227         Ok((function.to_ref(), false))
                               ^~~~~~~~~~~~~~~~~
src/builder.rs:240:58: 240:66 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:240         let mut function = unsafe {FunctionRef::from_ref(function)};
                                                                            ^~~~~~~~
src/builder.rs:240:58: 240:66 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:240:58: 240:66 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:240         let mut function = unsafe {FunctionRef::from_ref(function)};
                                                                            ^~~~~~~~
src/builder.rs:251:57: 251:67 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:251             context.builder.build_store(param.to_ref(), arg_alloca);
                                                                           ^~~~~~~~~~
src/builder.rs:251:57: 251:67 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:251:57: 251:67 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:251             context.builder.build_store(param.to_ref(), arg_alloca);
                                                                           ^~~~~~~~~~
src/builder.rs:270:44: 270:61 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:270                 unsafe {LLVMDeleteFunction(function.to_ref())};
                                                              ^~~~~~~~~~~~~~~~~
src/builder.rs:270:44: 270:61 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:270:44: 270:61 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:270                 unsafe {LLVMDeleteFunction(function.to_ref())};
                                                              ^~~~~~~~~~~~~~~~~
src/builder.rs:276:35: 276:40 error: mismatched types:
 expected `&*mut llvm_sys::LLVMValue`,
    found `&*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:276         context.builder.build_ret(&body);
                                                     ^~~~~
src/builder.rs:276:35: 276:40 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:276:35: 276:40 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:276         context.builder.build_ret(&body);
                                                     ^~~~~
src/builder.rs:278:25: 278:47 error: mismatched types:
 expected `llvm_sys::analysis::LLVMVerifierFailureAction`,
    found `llvm_sys::analysis::LLVMVerifierFailureAction`
(expected enum `llvm_sys::analysis::LLVMVerifierFailureAction`,
    found a different enum `llvm_sys::analysis::LLVMVerifierFailureAction`) [E0308]
src/builder.rs:278         function.verify(LLVMAbortProcessAction);
                                           ^~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:278:25: 278:47 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:278:25: 278:47 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:278         function.verify(LLVMAbortProcessAction);
                                           ^~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:285:13: 285:30 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:285         Ok((function.to_ref(), self.prototype.name.as_str() == ""))
                               ^~~~~~~~~~~~~~~~~
src/builder.rs:285:13: 285:30 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:285:13: 285:30 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:285         Ok((function.to_ref(), self.prototype.name.as_str() == ""))
                               ^~~~~~~~~~~~~~~~~
src/builder.rs:296:5: 296:56 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:296     builder.build_alloca(context.ty.to_ref(), var_name)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:296:5: 296:56 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:296:5: 296:56 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:296     builder.build_alloca(context.ty.to_ref(), var_name)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:308:21: 308:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:308                 Ok((RealConstRef::get(&context.ty, *value).to_ref(), false))
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:308:21: 308:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:308:21: 308:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:308                 Ok((RealConstRef::get(&context.ty, *value).to_ref(), false))
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:318:62: 318:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:318                         let var = context.builder.build_load(*value, name);
                                                                                ^~~~~~
src/builder.rs:318:62: 318:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:318:62: 318:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:318                         let var = context.builder.build_load(*value, name);
                                                                                ^~~~~~
src/builder.rs:319:29: 319:32 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:319                         Ok((var, false))
                                               ^~~
src/builder.rs:319:29: 319:32 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:319:29: 319:32 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:319                         Ok((var, false))
                                               ^~~
src/builder.rs:347:49: 347:74 error: mismatched types:
 expected `&mut [*mut llvm_sys::LLVMValue]`,
    found `&mut [*mut llvm_sys::LLVMValue]`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:347                                                 args_value.as_mut_slice(),
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:347:49: 347:74 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:347:49: 347:74 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:347                                                 args_value.as_mut_slice(),
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:346:21: 348:56 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:346                 Ok((context.builder.build_call(function.to_ref(),
src/builder.rs:347                                                 args_value.as_mut_slice(),
src/builder.rs:348                                                 "unop"),
src/builder.rs:346:21: 348:56 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:346:21: 348:56 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:346                 Ok((context.builder.build_call(function.to_ref(),
src/builder.rs:347                                                 args_value.as_mut_slice(),
src/builder.rs:348                                                 "unop"),
src/builder.rs:373:49: 373:54 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:373                     context.builder.build_store(value, variable);
                                                                   ^~~~~
src/builder.rs:373:49: 373:54 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:373:49: 373:54 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:373                     context.builder.build_store(value, variable);
                                                                   ^~~~~
src/builder.rs:373:56: 373:64 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:373                     context.builder.build_store(value, variable);
                                                                          ^~~~~~~~
src/builder.rs:373:56: 373:64 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:373:56: 373:64 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:373                     context.builder.build_store(value, variable);
                                                                          ^~~~~~~~
src/builder.rs:384:59: 384:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:384                     "+" => Ok((context.builder.build_fadd(lhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:384:59: 384:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:384:59: 384:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:384                     "+" => Ok((context.builder.build_fadd(lhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:385:59: 385:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:385                                                           rhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:385:59: 385:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:385:59: 385:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:385                                                           rhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:384:32: 386:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:384                     "+" => Ok((context.builder.build_fadd(lhs_value,
src/builder.rs:385                                                           rhs_value,
src/builder.rs:386                                                           "addtmp"),
src/builder.rs:384:32: 386:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:384:32: 386:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:384                     "+" => Ok((context.builder.build_fadd(lhs_value,
src/builder.rs:385                                                           rhs_value,
src/builder.rs:386                                                           "addtmp"),
src/builder.rs:388:59: 388:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:388                     "-" => Ok((context.builder.build_fsub(lhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:388:59: 388:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:388:59: 388:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:388                     "-" => Ok((context.builder.build_fsub(lhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:389:59: 389:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:389                                                           rhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:389:59: 389:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:389:59: 389:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:389                                                           rhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:388:32: 390:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:388                     "-" => Ok((context.builder.build_fsub(lhs_value,
src/builder.rs:389                                                           rhs_value,
src/builder.rs:390                                                           "subtmp"),
src/builder.rs:388:32: 390:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:388:32: 390:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:388                     "-" => Ok((context.builder.build_fsub(lhs_value,
src/builder.rs:389                                                           rhs_value,
src/builder.rs:390                                                           "subtmp"),
src/builder.rs:392:59: 392:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:392                     "*" => Ok((context.builder.build_fmul(lhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:392:59: 392:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:392:59: 392:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:392                     "*" => Ok((context.builder.build_fmul(lhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:393:59: 393:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:393                                                           rhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:393:59: 393:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:393:59: 393:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:393                                                           rhs_value,
                                                                             ^~~~~~~~~
src/builder.rs:392:32: 394:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:392                     "*" => Ok((context.builder.build_fmul(lhs_value,
src/builder.rs:393                                                           rhs_value,
src/builder.rs:394                                                           "multmp"),
src/builder.rs:392:32: 394:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:392:32: 394:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:392                     "*" => Ok((context.builder.build_fmul(lhs_value,
src/builder.rs:393                                                           rhs_value,
src/builder.rs:394                                                           "multmp"),
src/builder.rs:397:62: 397:73 error: mismatched types:
 expected `llvm_sys::LLVMRealPredicate`,
    found `llvm_sys::LLVMRealPredicate`
(expected enum `llvm_sys::LLVMRealPredicate`,
    found a different enum `llvm_sys::LLVMRealPredicate`) [E0308]
src/builder.rs:397                         let cmp = context.builder.build_fcmp(LLVMRealOLT,
                                                                                ^~~~~~~~~~~
src/builder.rs:397:62: 397:73 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:397:62: 397:73 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:397                         let cmp = context.builder.build_fcmp(LLVMRealOLT,
                                                                                ^~~~~~~~~~~
src/builder.rs:398:62: 398:71 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:398                                                              lhs_value,
                                                                                ^~~~~~~~~
src/builder.rs:398:62: 398:71 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:398:62: 398:71 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:398                                                              lhs_value,
                                                                                ^~~~~~~~~
src/builder.rs:399:62: 399:71 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:399                                                              rhs_value,
                                                                                ^~~~~~~~~
src/builder.rs:399:62: 399:71 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:399:62: 399:71 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:399                                                              rhs_value,
                                                                                ^~~~~~~~~
src/builder.rs:403:29: 405:70 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:403                         Ok((context.builder.build_ui_to_fp(cmp,
src/builder.rs:404                                                            context.ty.to_ref(),
src/builder.rs:405                                                            "booltmp"),
src/builder.rs:403:29: 405:70 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:403:29: 405:70 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:403                         Ok((context.builder.build_ui_to_fp(cmp,
src/builder.rs:404                                                            context.ty.to_ref(),
src/builder.rs:405                                                            "booltmp"),
src/builder.rs:426:56: 426:81 error: mismatched types:
 expected `&mut [*mut llvm_sys::LLVMValue]`,
    found `&mut [*mut llvm_sys::LLVMValue]`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:426                                                        args_value.as_mut_slice(),
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:426:56: 426:81 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:426:56: 426:81 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:426                                                        args_value.as_mut_slice(),
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:425:29: 427:64 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:425                         Ok((context.builder.build_call(function.to_ref(),
src/builder.rs:426                                                        args_value.as_mut_slice(),
src/builder.rs:427                                                        "binop"),
src/builder.rs:425:29: 427:64 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:425:29: 427:64 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:425                         Ok((context.builder.build_call(function.to_ref(),
src/builder.rs:426                                                        args_value.as_mut_slice(),
src/builder.rs:427                                                        "binop"),
src/builder.rs:454:48: 454:73 error: mismatched types:
 expected `&mut [*mut llvm_sys::LLVMValue]`,
    found `&mut [*mut llvm_sys::LLVMValue]`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:454                                                args_value.as_mut_slice(),
                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:454:48: 454:73 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:454:48: 454:73 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:454                                                args_value.as_mut_slice(),
                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:453:21: 455:58 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:453                 Ok((context.builder.build_call(function.to_ref(),
src/builder.rs:454                                                args_value.as_mut_slice(),
src/builder.rs:455                                                "calltmp"),
src/builder.rs:453:21: 455:58 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:453:21: 455:58 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:453                 Ok((context.builder.build_call(function.to_ref(),
src/builder.rs:454                                                args_value.as_mut_slice(),
src/builder.rs:455                                                "calltmp"),
src/builder.rs:467:57: 467:68 error: mismatched types:
 expected `llvm_sys::LLVMRealPredicate`,
    found `llvm_sys::LLVMRealPredicate`
(expected enum `llvm_sys::LLVMRealPredicate`,
    found a different enum `llvm_sys::LLVMRealPredicate`) [E0308]
src/builder.rs:467                 let ifcond = context.builder.build_fcmp(LLVMRealONE, cond_value, zero.to_ref(), "ifcond");
                                                                           ^~~~~~~~~~~
src/builder.rs:467:57: 467:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:467:57: 467:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:467                 let ifcond = context.builder.build_fcmp(LLVMRealONE, cond_value, zero.to_ref(), "ifcond");
                                                                           ^~~~~~~~~~~
src/builder.rs:467:70: 467:80 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:467                 let ifcond = context.builder.build_fcmp(LLVMRealONE, cond_value, zero.to_ref(), "ifcond");
                                                                                        ^~~~~~~~~~
src/builder.rs:467:70: 467:80 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:467:70: 467:80 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:467                 let ifcond = context.builder.build_fcmp(LLVMRealONE, cond_value, zero.to_ref(), "ifcond");
                                                                                        ^~~~~~~~~~
src/builder.rs:498:34: 498:65 error: mismatched types:
 expected `&mut [*mut llvm_sys::LLVMValue]`,
    found `&mut [*mut llvm_sys::LLVMValue]`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:498                 phi.add_incoming(vec![then_value].as_mut_slice(), vec![then_end_block].as_mut_slice());
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:498:34: 498:65 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:498:34: 498:65 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:498                 phi.add_incoming(vec![then_value].as_mut_slice(), vec![then_end_block].as_mut_slice());
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:499:34: 499:65 error: mismatched types:
 expected `&mut [*mut llvm_sys::LLVMValue]`,
    found `&mut [*mut llvm_sys::LLVMValue]`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:499                 phi.add_incoming(vec![else_value].as_mut_slice(), vec![else_end_block].as_mut_slice());
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:499:34: 499:65 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:499:34: 499:65 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:499                 phi.add_incoming(vec![else_value].as_mut_slice(), vec![else_end_block].as_mut_slice());
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/builder.rs:501:21: 501:33 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:501                 Ok((phi.to_ref(), false))
                                       ^~~~~~~~~~~~
src/builder.rs:501:21: 501:33 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:501:21: 501:33 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:501                 Ok((phi.to_ref(), false))
                                       ^~~~~~~~~~~~
src/builder.rs:517:45: 517:56 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:517                 context.builder.build_store(start_value, variable);
                                                               ^~~~~~~~~~~
src/builder.rs:517:45: 517:56 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:517:45: 517:56 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:517                 context.builder.build_store(start_value, variable);
                                                               ^~~~~~~~~~~
src/builder.rs:517:58: 517:66 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:517                 context.builder.build_store(start_value, variable);
                                                                            ^~~~~~~~
src/builder.rs:517:58: 517:66 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:517:58: 517:66 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:517                 context.builder.build_store(start_value, variable);
                                                                            ^~~~~~~~
*mut llvm_sys::LLVMValue
src/builder.rs:536:72: 536:78 error: no method named `to_ref` found for type `*mut llvm_sys::LLVMValue` in the current scope
src/builder.rs:536                 context.named_values.insert(var_name.clone(), variable.to_ref());
                                                                                          ^~~~~~
src/builder.rs:540:59: 540:70 error: mismatched types:
 expected `llvm_sys::LLVMRealPredicate`,
    found `llvm_sys::LLVMRealPredicate`
(expected enum `llvm_sys::LLVMRealPredicate`,
    found a different enum `llvm_sys::LLVMRealPredicate`) [E0308]
src/builder.rs:540                 let end_cond = context.builder.build_fcmp(LLVMRealONE, end_value, zero.to_ref(), "loopcond");
                                                                             ^~~~~~~~~~~
src/builder.rs:540:59: 540:70 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:540:59: 540:70 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:540                 let end_cond = context.builder.build_fcmp(LLVMRealONE, end_value, zero.to_ref(), "loopcond");
                                                                             ^~~~~~~~~~~
src/builder.rs:540:72: 540:81 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:540                 let end_cond = context.builder.build_fcmp(LLVMRealONE, end_value, zero.to_ref(), "loopcond");
                                                                                          ^~~~~~~~~
src/builder.rs:540:72: 540:81 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:540:72: 540:81 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:540                 let end_cond = context.builder.build_fcmp(LLVMRealONE, end_value, zero.to_ref(), "loopcond");
                                                                                          ^~~~~~~~~
src/builder.rs:553:60: 553:68 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:553                 let cur_value = context.builder.build_load(variable, var_name);
                                                                              ^~~~~~~~
src/builder.rs:553:60: 553:68 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:553:60: 553:68 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:553                 let cur_value = context.builder.build_load(variable, var_name);
                                                                              ^~~~~~~~
src/builder.rs:554:72: 554:82 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:554                 let next_value = context.builder.build_fadd(cur_value, step_value, "nextvar");
                                                                                          ^~~~~~~~~~
src/builder.rs:554:72: 554:82 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:554:72: 554:82 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:554                 let next_value = context.builder.build_fadd(cur_value, step_value, "nextvar");
                                                                                          ^~~~~~~~~~
src/builder.rs:555:57: 555:65 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:555                 context.builder.build_store(next_value, variable);
                                                                           ^~~~~~~~
src/builder.rs:555:57: 555:65 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:555:57: 555:65 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:555                 context.builder.build_store(next_value, variable);
                                                                           ^~~~~~~~
src/builder.rs:577:21: 577:34 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:577                 Ok((zero.to_ref(), false))
                                       ^~~~~~~~~~~~~
src/builder.rs:577:21: 577:34 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:577:21: 577:34 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:577                 Ok((zero.to_ref(), false))
                                       ^~~~~~~~~~~~~
src/builder.rs:591:49: 591:59 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:591                     context.builder.build_store(init_value, variable);
                                                                   ^~~~~~~~~~
src/builder.rs:591:49: 591:59 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:591:49: 591:59 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:591                     context.builder.build_store(init_value, variable);
                                                                   ^~~~~~~~~~
src/builder.rs:591:61: 591:69 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/builder.rs:591                     context.builder.build_store(init_value, variable);
                                                                               ^~~~~~~~
src/builder.rs:591:61: 591:69 help: run `rustc --explain E0308` to see a detailed explanation
src/builder.rs:591:61: 591:69 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/builder.rs:591                     context.builder.build_store(init_value, variable);
                                                                               ^~~~~~~~
*mut llvm_sys::LLVMValue
src/driver.rs:200:27: 200:31 error: no method named `dump` found for type `*mut llvm_sys::LLVMValue` in the current scope
src/driver.rs:200                     value.dump();
                                            ^~~~
src/driver.rs:200:27: 200:31 help: items from traits can only be used if the trait is implemented and in scope; the following trait defines an item `dump`, perhaps you need to implement it:
src/driver.rs:200:27: 200:31 help: candidate #1: `builder::ModuleProvider`
src/jitter.rs:201:47: 201:48 error: mismatched types:
 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`
(expected enum `llvm_sys::LLVMValue`,
    found a different enum `llvm_sys::LLVMValue`) [E0308]
src/jitter.rs:201         let f = unsafe {FunctionRef::from_ref(f)};
                                                                ^
src/jitter.rs:201:47: 201:48 help: run `rustc --explain E0308` to see a detailed explanation
src/jitter.rs:201:47: 201:48 note: Perhaps two different versions of crate `llvm_sys` are being used?
src/jitter.rs:201         let f = unsafe {FunctionRef::from_ref(f)};
                                                                ^
error: aborting due to 50 previous errors
Could not compile `iron_kaleidoscope`.

To learn more, run the command again with --verbose.

The lines like

 expected `*mut llvm_sys::LLVMValue`,
    found `*mut llvm_sys::LLVMValue`

really confuses me...

jagajaga commented 8 years ago

cc @jauhien

jagajaga commented 8 years ago

Version 0.2.1 was needed.