GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.44k stars 304 forks source link

Could not build Taskwarrior 3.0.2 #3605

Closed clobrano closed 2 months ago

clobrano commented 2 months ago

To report a bug...

I downloaded Taskwarrior 3.0.2 and follow the instructions in INSTALL file, and it ended with error

$ dnf install -y cmake make libuuid-devel
$ cmake -DCMAKE_BUILD_TYPE=release .
$ make                            
...  
[ 97%] Linking CXX executable task
/usr/bin/ld: cannot find -ltaskchampion-lib: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/task_executable.dir/build.make:106: src/task] Error 1
make[1]: *** [CMakeFiles/Makefile2:357: src/CMakeFiles/task_executable.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

I tried to build taskchampion manually, but it also failed

$ cd taskchampion
$ sudo dnf install -y rustc cargo
$ cargo build --release
error[E0282]: type annotations needed for `Box<_>`
  --> /home/clobrano/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.20/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |              ++++++++

   Compiling google-cloud-metadata v0.4.0
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
djmitche commented 2 months ago

What version of rust are you using? Typically the system packages are long out of date. The current minimum version is 1.70.0.

It's generally best to use rustup to install and manage rust.

clobrano commented 2 months ago

To be completely sure I cleaned up rust toolchain and reinstalled via rustup. Now I have

rustc 1.80.1 (3f5fd8dd4 2024-08-06)

and the same issue stated above

djmitche commented 2 months ago

3.0.2 actually doesn't work with the new rust - #3485 fixed a bug around - vs _ that only caused issues with newer versions. That bug is fixed in 3.1.0.

I don't know what's up with the failures to build time though!

clobrano commented 2 months ago

That bug is fixed in 3.1.0

Good, 3.1.0 works just fine, thanks!

3.0.2 actually doesn't work with the new rust

I didn't see any reference to rust version (nor to rust actually) in the INSTALL file.

djmitche commented 2 months ago

Well, it was released before the new rust version was, so that information was as yet unknown :)

clobrano commented 2 months ago

I'm sorry, I've been unclear. What I meant was that the dependency section does not list rust in any way, while it lists make, gcc, clang, etc.

djmitche commented 2 months ago

Oh, good point - I've filed #3606 to fix that.

Did you figure out the issue building the Taskchampion dependencies?

echo-bravo-yahoo commented 2 months ago

Can confirm I had the same issue, and moving to taskwarrior 3.1.0 resolved my issues.

djmitche commented 2 months ago

Cool, sounds like this is fixed then

clobrano commented 2 months ago

Did you figure out the issue building the Taskchampion dependencies?

No, I couldn't understand what the problem was, nor how to fix it

djmitche commented 2 months ago

Can you give the version of rust and the commit hash of taskchampion you are building?

clobrano commented 2 months ago

I might have created some misunderstanding. With v3.1.0 all good, I can build and use Taskwarrior With the released v3.0.2 (Taskchampion included), I still had the issue with rustc 1.80.1 (3f5fd8dd4 2024-08-06).

Once I got 3.1.0 working, I didn't continue debugging the original issue

djmitche commented 2 months ago

OK, as long as the most recent version is building šŸ‘šŸ¼