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

Cannot get cowsay example to work #182

Open
erdemoney opened this issue Feb 23, 2025 · 2 comments
Open

Cannot get cowsay example to work #182

erdemoney opened this issue Feb 23, 2025 · 2 comments

Comments

@erdemoney
Copy link

erdemoney commented Feb 23, 2025

Hi,
I was not able to get the basic example with cowsay working on my machine.
When I run cargo build --release the following error.

error: failed to parse lock file at: /home/tibit/pyapp-latest/Cargo.lock

Caused by:
  lock file version 4 requires `-Znext-lockfile-bump`

I attempted to resolve this myself according to advice I found on another GH thread to just bump the version down to fix this and this allowed me to build but the executable created did not work.

tibit@prox-per-vm4-l8:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy
tibit@prox-per-vm4-l8:~$ curl https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz -Lo pyapp-source.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  223k  100  223k    0     0   215k      0  0:00:01  0:00:01 --:--:--  215k
tibit@prox-per-vm4-l8:~$ tar -xzf pyapp-source.tar.gz
tibit@prox-per-vm4-l8:~$ mv pyapp-v* pyapp-latest
tibit@prox-per-vm4-l8:~$ cd pyapp-latest
tibit@prox-per-vm4-l8:~/pyapp-latest$ export PYAPP_PROJECT_NAME=cowsay
tibit@prox-per-vm4-l8:~/pyapp-latest$ export PYAPP_PROJECT_VERSION=6.1
tibit@prox-per-vm4-l8:~/pyapp-latest$ cargo build --release --quiet
error: failed to parse lock file at: /home/tibit/pyapp-latest/Cargo.lock

Caused by:
  lock file version 4 requires `-Znext-lockfile-bump`
tibit@prox-per-vm4-l8:~/pyapp-latest$ hx Cargo.lock
tibit@prox-per-vm4-l8:~/pyapp-latest$
tibit@prox-per-vm4-l8:~/pyapp-latest$
tibit@prox-per-vm4-l8:~/pyapp-latest$
tibit@prox-per-vm4-l8:~/pyapp-latest$ cargo build --release --quiet
tibit@prox-per-vm4-l8:~/pyapp-latest$ mv target/release/pyapp cowsay && chmod +x cowsay
tibit@prox-per-vm4-l8:~/pyapp-latest$ ./cowsay -t 'Hello, World!'

tibit@prox-per-vm4-l8:~/pyapp-latest$ cargo --version
cargo 1.75.0

I get the "creating virtual environment" dialog and then nothing happens.

Note: The cargo version I was running was older (from apt) I tried the newest one from rustup and rebuilt. I no longer get the error from Cargo.lock but running the executable yields the same result.

tibit@prox-per-vm4-l8:~/pyapp-latest$ cargo --version
cargo 1.85.0 (d73d2caf9 2024-12-31)
@erdemoney erdemoney changed the title Cargo.lock error "lock file version 4 requires -Znext-lockfile-bump" cannot get example to work Cannot get example to work Feb 23, 2025
@erdemoney erdemoney changed the title Cannot get example to work Cannot get cowsay example to work Feb 23, 2025
@ofek
Copy link
Owner

ofek commented Feb 23, 2025

What version of Rust?

@erdemoney
Copy link
Author

Sorry I forgot to include that.

tibit@prox-per-vm4-l8:~$ rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)

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

2 participants