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

Can't build with --locked #760

Closed
BigmenPixel0 opened this issue Feb 7, 2022 · 15 comments
Closed

Can't build with --locked #760

BigmenPixel0 opened this issue Feb 7, 2022 · 15 comments

Comments

@BigmenPixel0
Copy link

If I run cargo fetch with --locked I get an error:

error: the lock file /tmp/makepkg/shadowsocks-rust/src/shadowsocks-rust-1.13.1/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.

shadowsocks-rust version 1.13.1

@database64128
Copy link
Contributor

Looks like you are the maintainer of the shadowsocks-rust AUR package. I have a few questions and suggestions on your PKGBUILD:

  1. arch should not be any. You should explicitly list all supported architectures.
  2. Why are openssl and libsodium listed as dependencies? They are not required by shadowsocks-rust.
  3. Why explicitly disable LTO? Building shadowsocks-rust with LTO won't break. Actually LTO is explicitly enabled in Cargo.toml to improve performance for release builds.
  4. Why add -rust suffix to sslocal, ssserver, and ssurl? Also, now that we have ssservice, you can simply create sslocal, ssserver, ssmanager as symlinks to ssservice. And these symlinks won't work if you name them with the -rust suffix. If @zonyitoo is willing to integrate ssurl into ssservice, then we can use a single binary for everything.
  5. I don't think running tests when building the package is a good idea.
  6. I don't think it's necessary to have a separate fetch run in prepare().

@BigmenPixel0
Copy link
Author

BigmenPixel0 commented Feb 7, 2022

Looks like you are the maintainer of the shadowsocks-rust AUR package. I have a few questions and suggestions on your PKGBUILD:

  1. arch should not be any. You should explicitly list all supported architectures.
  2. Why are openssl and libsodium listed as dependencies? They are not required by shadowsocks-rust.
  3. Why explicitly disable LTO? Building shadowsocks-rust with LTO won't break. Actually LTO is explicitly enabled in Cargo.toml to improve performance for release builds.
  4. Why add -rust suffix to sslocal, ssserver, and ssurl? Also, now that we have ssservice, you can simply create sslocal, ssserver, ssmanager as symlinks to ssservice. And these symlinks won't work if you name them with the -rust suffix. If @zonyitoo is willing to integrate ssurl into ssservice, then we can use a single binary for everything.
  5. I don't think running tests when building the package is a good idea.
  6. I don't think it's necessary to have a separate fetch run in prepare().

*3. I tried to compile with LTO, it didn’t work for me, so this is my problem? (log)
*5. It's in the archwiki.
*6. It's in the archwiki.

@database64128
Copy link
Contributor

Looking at Rust packages in the official repos, some of them skipped the fetch step, some omitted the tests, some have neither and some have both like your package does. Realistically, I don't think anyone installing the shadowsocks-rust package is interested in running the tests.

As for the LTO situation, I was wrong. You made the right call to explicitly disable LTO. Please also consider open an issue at https://github.com/briansmith/ring and attach the failed build logs.

zonyitoo added a commit that referenced this issue Feb 8, 2022
@zonyitoo
Copy link
Collaborator

zonyitoo commented Feb 8, 2022

I just updated Cargo.lock.

If @zonyitoo is willing to integrate ssurl into ssservice, then we can use a single binary for everything.

Well, the ssurl is not a required component. It is totally Ok to omit the ssurl binary in the PKGBUILD.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Feb 8, 2022

*3. I tried to compile with LTO, it didn’t work for me, so this is my problem? (log)

That was interesting! How to reproduce that? @BigmenPixel0

@BigmenPixel0
Copy link
Author

*3. I tried to compile with LTO, it didn’t work for me, so this is my problem? (log)

That was interesting! How to reproduce that? @BigmenPixel0

Try building the shadowsocks-rust package from the AUR, but with the lto option enabled.

@database64128
Copy link
Contributor

That was interesting! How to reproduce that?

It’s not really related to this project, but if you are curious, Arch Linux’s build system can be configured to enable LTO by including lto in OPTIONS in /etc/makepkg.conf. It probably has nothing to do with Rust’s LTO.

@BigmenPixel0
Copy link
Author

As for the LTO situation, I was wrong. You made the right call to explicitly disable LTO. Please also consider open an issue at https://github.com/briansmith/ring and attach the failed build logs.

Already exist.

@BigmenPixel0
Copy link
Author

Problem solved, I'm closing the issue.

@BigmenPixel0
Copy link
Author

The problem recurred in 1.14.1.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Mar 8, 2022

What problem exactly?

@BigmenPixel0
Copy link
Author

What problem exactly?

error: the lock file /var/cache/makepkg/shadowsocks-rust/src/shadowsocks-rust-1.14.1/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Mar 8, 2022

Well, this is because the tag v1.14.1 was tagged on the wrong commit.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Mar 8, 2022

Retagged. Please retry.

@BigmenPixel0
Copy link
Author

Retagged. Please retry.

It works, thanks.

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

3 participants