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

Fails to build #16

Closed
vyp opened this issue Dec 21, 2014 · 16 comments
Closed

Fails to build #16

vyp opened this issue Dec 21, 2014 · 16 comments

Comments

@vyp
Copy link

vyp commented Dec 21, 2014

My versions, installed about a day (24 hours) ago:

$ rustc --version
rustc 0.13.0-nightly (99d6956c3 2014-12-18 20:32:07 +0000)

$ cargo --version
cargo 0.0.1-pre-nightly (5af754d 2014-12-18 01:50:48 +0000)

If it matters, I'm on arch linux, using the rust-nightly-bin and cargo-nightly-bin AUR packages.


cargo build in this repository gives (what looks like) syntax errors when attempting to build docopt. Their latest commits and release (0.6.16) fixes this.

So cargo update -p docopt, and then cargo build --verbose results in the following error:

       Fresh docopt v0.6.16 (https://github.com/docopt/docopt.rs#3f39bcc7)
       Fresh docopt_macros v0.6.16 (https://github.com/docopt/docopt.rs#3f39bcc7)
   Compiling clog v0.2.0 (file:///home/rws/code/gen/clog2)
     Running `rustc /home/rws/code/gen/clog2/src/main.rs --crate-name clog --crate-type bin -g --out-dir /home/rws/code/gen/clog2/target --dep-info /home/rws/code/gen/clog2/target/.fingerprint/clog-76bd6c1d8f39f9ac/dep-bin-clog -L /home/rws/code/gen/clog2/target -L /home/rws/code/gen/clog2/target/deps --extern docopt_macros=/home/rws/code/gen/clog2/target/deps/libdocopt_macros-c59a259f9c0bfb33.so --extern docopt=/home/rws/code/gen/clog2/target/deps/libdocopt-29a30eb0650840d7.rlib`
/home/rws/code/gen/clog2/src/main.rs:41:34: 41:35 error: macros that expand to items must either be surrounded with braces or followed by a semicolon
/home/rws/code/gen/clog2/src/main.rs:41   flag_setversion: Option<String>)
                                                                         ^
error: aborting due to previous error
Could not compile `clog`.

Caused by:
  Process didn't exit successfully: `rustc /home/rws/code/gen/clog2/src/main.rs --crate-name clog --crate-type bin -g --out-dir /home/rws/code/gen/clog2/target --dep-info /home/rws/code/gen/clog2/target/.fingerprint/clog-76bd6c1d8f39f9ac/dep-bin-clog -L /home/rws/code/gen/clog2/target -L /home/rws/code/gen/clog2/target/deps --extern docopt_macros=/home/rws/code/gen/clog2/target/deps/libdocopt_macros-c59a259f9c0bfb33.so --extern docopt=/home/rws/code/gen/clog2/target/deps/libdocopt-29a30eb0650840d7.rlib` (status=101)

So add in a semicolon at the end of line 41 in src/main.rs, and then cargo build --verbose results in the following error:

       Fresh docopt v0.6.16 (https://github.com/docopt/docopt.rs#3f39bcc7)
       Fresh docopt_macros v0.6.16 (https://github.com/docopt/docopt.rs#3f39bcc7)
   Compiling clog v0.2.0 (file:///home/rws/code/gen/clog2)
     Running `rustc /home/rws/code/gen/clog2/src/main.rs --crate-name clog --crate-type bin -g --out-dir /home/rws/code/gen/clog2/target --dep-info /home/rws/code/gen/clog2/target/.fingerprint/clog-76bd6c1d8f39f9ac/dep-bin-clog -L /home/rws/code/gen/clog2/target -L /home/rws/code/gen/clog2/target/deps --extern docopt_macros=/home/rws/code/gen/clog2/target/deps/libdocopt_macros-c59a259f9c0bfb33.so --extern docopt=/home/rws/code/gen/clog2/target/deps/libdocopt-29a30eb0650840d7.rlib`
/home/rws/code/gen/clog2/src/log_writer.rs:1:5: 1:39 error: unresolved import `std::collections::hashmap::HashMap`. Could not find `hashmap` in `std::collections`
/home/rws/code/gen/clog2/src/log_writer.rs:1 use std::collections::hashmap::HashMap;
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rws/code/gen/clog2/src/common.rs:2:5: 2:39 error: unresolved import `std::collections::hashmap::HashMap`. Could not find `hashmap` in `std::collections`
/home/rws/code/gen/clog2/src/common.rs:2 use std::collections::hashmap::HashMap;
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rws/code/gen/clog2/src/section_builder.rs:1:5: 1:39 error: unresolved import `std::collections::hashmap::HashMap`. Could not find `hashmap` in `std::collections`
/home/rws/code/gen/clog2/src/section_builder.rs:1 use std::collections::hashmap::HashMap;
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rws/code/gen/clog2/src/section_builder.rs:2:5: 2:30 error: unresolved import `std::collections::hashmap`. There is no `hashmap` in `std::collections`
/home/rws/code/gen/clog2/src/section_builder.rs:2 use std::collections::hashmap;
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/rws/code/gen/clog2/src/section_builder.rs:3:37: 3:44 error: unresolved import `common::Feature`. There is no `Feature` in `common`
/home/rws/code/gen/clog2/src/section_builder.rs:3 use common::{ LogEntry, SectionMap, Feature, Fix };
                                                                                      ^~~~~~~
/home/rws/code/gen/clog2/src/section_builder.rs:3:46: 3:49 error: unresolved import `common::Fix`. There is no `Fix` in `common`
/home/rws/code/gen/clog2/src/section_builder.rs:3 use common::{ LogEntry, SectionMap, Feature, Fix };
                                                                                               ^~~
/home/rws/code/gen/clog2/src/git.rs:3:26: 3:33 error: unresolved import `common::Feature`. There is no `Feature` in `common`
/home/rws/code/gen/clog2/src/git.rs:3 use common:: { LogEntry, Feature, Fix, Unknown };
                                                               ^~~~~~~
/home/rws/code/gen/clog2/src/git.rs:3:35: 3:38 error: unresolved import `common::Fix`. There is no `Fix` in `common`
/home/rws/code/gen/clog2/src/git.rs:3 use common:: { LogEntry, Feature, Fix, Unknown };
                                                                        ^~~
/home/rws/code/gen/clog2/src/git.rs:3:40: 3:47 error: unresolved import `common::Unknown`. There is no `Unknown` in `common`
/home/rws/code/gen/clog2/src/git.rs:3 use common:: { LogEntry, Feature, Fix, Unknown };
                                                                             ^~~~~~~
/home/rws/code/gen/clog2/src/main.rs:17:5: 17:23 error: unresolved import `docopt::FlagParser`. There is no `FlagParser` in `docopt`
/home/rws/code/gen/clog2/src/main.rs:17 use docopt::FlagParser;
                                            ^~~~~~~~~~~~~~~~~~
error: aborting due to 10 previous errors
Could not compile `clog`.

Caused by:
  Process didn't exit successfully: `rustc /home/rws/code/gen/clog2/src/main.rs --crate-name clog --crate-type bin -g --out-dir /home/rws/code/gen/clog2/target --dep-info /home/rws/code/gen/clog2/target/.fingerprint/clog-76bd6c1d8f39f9ac/dep-bin-clog -L /home/rws/code/gen/clog2/target -L /home/rws/code/gen/clog2/target/deps --extern docopt_macros=/home/rws/code/gen/clog2/target/deps/libdocopt_macros-c59a259f9c0bfb33.so --extern docopt=/home/rws/code/gen/clog2/target/deps/libdocopt-29a30eb0650840d7.rlib` (status=101)

This is where I decided to stop and open this issue, because I have little to no knowledge of rust yet (just started).

@0x-r4bbit
Copy link
Contributor

@jumpwah thanks for reporting this bug, @cburgdorf is gonna take a look as soon as possible!

@vyp
Copy link
Author

vyp commented Dec 23, 2014

Thanks @PascalPrecht, I understand that it's close to holidays, so no rush.

@kbknapp
Copy link
Member

kbknapp commented Mar 30, 2015

@thoughtram

Similar issues today:

Building failed with docopt macro errors (I'm assuming cause it was an older version in Cargo.lock), so I deleted Cargo.lock, and rebuilt but then received the same error listed above:

/home/kevin/Builds/clog/src/main.rs:41:34: 41:35 error: macros that expand to items must either be surrounded with braces or followed by a semicolon
/home/kevin/Builds/clog/src/main.rs:41   flag_setversion: Option<String>)

So I added a ; to line 41 of src/main.rs, but now receive:

Updating git repository `https://github.com/docopt/docopt.rs`
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling regex v0.1.24
   Compiling rustc-serialize v0.3.10
   Compiling libc v0.1.4
   Compiling docopt v0.6.55 (https://github.com/docopt/docopt.rs#b1867708)
   Compiling docopt_macros v0.6.55 (https://github.com/docopt/docopt.rs#b1867708)
   Compiling clog v0.2.0 (file:///home/kevin/Builds/clog)
src/main.rs:7:1: 7:17 error: The attribute `phase` is currently unknown to the the compiler and may have meaning added to it in the future
src/main.rs:7 #[phase(plugin)]
              ^~~~~~~~~~~~~~~~
src/main.rs:7:17: 7:17 help: add #![feature(custom_attribute)] to the crate attributes to enable
src/main.rs:10:1: 10:17 error: The attribute `phase` is currently unknown to the the compiler and may have meaning added to it in the future
src/main.rs:10 #[phase(plugin)] extern crate docopt_macros;
               ^~~~~~~~~~~~~~~~
src/main.rs:10:17: 10:17 help: add #![feature(custom_attribute)] to the crate attributes to enable
src/common.rs:4:1: 4:36 error: The attribute `deriving` is currently unknown to the the compiler and may have meaning added to it in the future
src/common.rs:4 #[deriving(Show, PartialEq, Clone)]
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.rs:4:36: 4:36 help: add #![feature(custom_attribute)] to the crate attributes to enable
src/common.rs:11:1: 11:19 error: The attribute `deriving` is currently unknown to the the compiler and may have meaning added to it in the future
src/common.rs:11 #[deriving(Clone)]
                 ^~~~~~~~~~~~~~~~~~
src/common.rs:11:19: 11:19 help: add #![feature(custom_attribute)] to the crate attributes to enable
src/git.rs:5:1: 5:18 error: The attribute `deriving` is currently unknown to the the compiler and may have meaning added to it in the future
src/git.rs:5 #[deriving(Show)]
             ^~~~~~~~~~~~~~~~~
src/git.rs:5:18: 5:18 help: add #![feature(custom_attribute)] to the crate attributes to enable
src/main.rs:2:1: 2:51 error: The attribute `comment` is currently unknown to the the compiler and may have meaning added to it in the future
src/main.rs:2 #![comment = "A conventional changelog generator"]
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.rs:2:51: 2:51 help: add #![feature(custom_attribute)] to the crate attributes to enable
src/main.rs:3:1: 3:20 error: The attribute `license` is currently unknown to the the compiler and may have meaning added to it in the future
src/main.rs:3 #![license = "MIT"]
              ^~~~~~~~~~~~~~~~~~~
src/main.rs:3:20: 3:20 help: add #![feature(custom_attribute)] to the crate attributes to enable
error: aborting due to 7 previous errors
Could not compile `clog`.

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

I'm using nightly rustc 1.0.0-nightly (c89de2c56 2015-03-28) (built 2015-03-29)

@vyp
Copy link
Author

vyp commented Mar 30, 2015

There are actually quite a few changes that need to be made to get clog to compile (not that I have got it to compile though) than what's on master here (because obviously rust has updated a lot in the past few months, so like everything, or a lot of things, are super outdated). I've been learning rust in the meantime, and I've been hoping to fix this issue myself, just haven't had the time to focus on this!

However, I will hopefully get time to look into this more in the coming weeks, or otherwise at least before rust 1.0. Of course, you can obviously go ahead and fix this yourself if you want. It seems like you know a lot more rust than me anyway. :)

@vyp
Copy link
Author

vyp commented Mar 30, 2015

Also, I forgot to update here, but for any other readers on arch linux, I think the rust-nightly-bin AUR package now provides cargo.

@kbknapp
Copy link
Member

kbknapp commented Mar 30, 2015

I can confirm that it does, that's what I've been using for a while now ;)

I'll take a look at the code tomorrow and see if can do some updating. I'll
submit a PR if so. Thanks for the quick reply!
On Mar 29, 2015 11:39 PM, "RWS" notifications@github.com wrote:

Also, I forgot to update here, but for any other readers on arch linux, I
think the rust-nightly-bin AUR package now provides cargo.


Reply to this email directly or view it on GitHub
#16 (comment).

@vyp
Copy link
Author

vyp commented Mar 30, 2015

Oh btw, I'm not owner nor collaborator here, I'm the one who originally opened the issue. Just to clarify.

@kbknapp
Copy link
Member

kbknapp commented Mar 30, 2015

ah cool thanks, its hard to tell since I'm replying via email :P My
comments still stand though.
On Mar 29, 2015 11:48 PM, "RWS" notifications@github.com wrote:

Oh btw, I'm not owner nor collaborator here, I'm the one who originally
opened the issue. Just to clarify.


Reply to this email directly or view it on GitHub
#16 (comment).

@cburgdorf
Copy link
Contributor

Hey there, I recently started a branch to port it to latest rust but it's not finished yet and I haven't found the time to continue with it yet.

I can push the branch if you are interested to help.

@vyp
Copy link
Author

vyp commented Mar 30, 2015

I can push the branch if you are interested to help.

Yep! :) However, any of my help will only be very basic at the moment. I haven't studied the source code yet..

@cburgdorf
Copy link
Contributor

Ok, here it is. But don't expect too much. It's really just a start ;)

@vyp
Copy link
Author

vyp commented Mar 30, 2015

Awesome, you still figured out a lot of the changes, so it's quite a lot already.

Does this compile (for you)? I would try myself, but can't right now. I will try in a couple of days. Also, if you don't mind, what rust version are you using (for reference)?

@cburgdorf
Copy link
Contributor

Nope, not yet. Just went down the rabbit whole for a while but stopped before I got it to compile ;)

@vyp
Copy link
Author

vyp commented Mar 30, 2015

Cool, I'll hopefully at least try it out and report back (with the errors) in a couple of days. If I find time, I maybe could also help with descending into the depths of the rabbit hole but not sure yet.

Thanks for your work. :)

@kbknapp
Copy link
Member

kbknapp commented Mar 31, 2015

I just submitted a PR that compiles and works in case y'all want to check it out. I ran it on the fork and it took 7ms...since I don't have any prior knowledge I'm not sure if that's a + or -

@vyp
Copy link
Author

vyp commented Mar 31, 2015

Cool I won't bother with the update branch then. :)

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

No branches or pull requests

4 participants