Closed dead10ck closed 1 year ago
LLVM 15 just came out last month, so if you saw it with previous Rust versions, those would be using LLVM 14. I think this issue hit Zig too and may have delayed their release: do you not see this error on other platforms like linux x86_64? If you see it there too, you should report this upstream, not here.
No, I do not see this on Fedora.
hello, I am facing the same issue. Any help?
hello, I am facing the same issue. Any help?
I managed to work around this by creating ~/.cargo/config.toml
, with the following contents:
[profile.dev]
lto = false
[profile.release]
lto = false
[profile.test]
lto =false
[profile.bench]
lto = false
That will disable link-time optimisation - not sure what effect that will have on performance, or whether all of those lines are needed, but neither of those things are important to what I'm doing so I haven't investigated further. Hopefully the same may work for you too.
lto = "fat"
also works, it's just slower.
Possibly related issue: #12163
It suggests a workaround setting RUSTFLAGS
environment variable like below:
export RUSTFLAGS+=" -C lto=no"
For my case, it also seems to work with the following:
export RUSTFLAGS+=" -C llvm-args=-opaque-pointers"
It has been a while since the release of LLVM 15, but Googling still does not tell me about any similar issues with other platforms than Termux. I just wonder why.
Need documentation about this if it cannot be fixed.
Hi friend if you have problem with installing cryptography and or telethonfaketls and or ccxt packages:
pip install cryptography
pip3 install TelethonFakeTLS
pip install ccxt
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
fix it with this commands:
export RUSTFLAGS=" -C lto=no" && export CARGO_BUILD_TARGET="$(rustc -vV | sed -n 's|host: ||p')" && pip install cryptography
I hope people will work on it and solve it. also it's a persian lng page to fix other similar problems too: Link:Click
@mablue Now Termux provides python-cryptography
package that provides a prebuilt cryptography
module. No need to install it by pip
unless using Python from Termux User Repository which has different versions that provided by termux-packages.
This does not seem to happen anymore with rust 1.68.2
and libllvm 16.0.2
. Execution of pip install cryptography
succeeds without any workarounds other than CARGO_BUILD_TARGET
env var. Can anyone else confirm this?
@mablue Now Termux provides
python-cryptography
package that provides a prebuiltcryptography
module. No need to install it bypip
unless using Python from Termux User Repository which has different versions that provided by termux-packages.
Thanks all. It's better to have this key things internally cuz it can increase usability of termux as coridor of to introduce BsD/Linux based systems to noob people that just want to have fun. Many people in the world never can Think about removing windows from his pc and use a bsd based system on it but them correctly using termux on his phone without any problem :) I have many friends that them cant buy a pc 😔 or a laptop, but them use termux on his old phone to do great things ( small hacks and etc 🤣 ) <<cuz of that I think we should have an other termux version for android 4 support to help these people to be alive>> There is many old phones that can convert to any good thing with termux. Them are all better than atimegas,arduinos,arms,Raspberry Pis and other Fruits... We shoud Continue to this work and make it better but should keep it simple and usable Cuz this is the greatest service that can be done to humanity. And some body realy love it as a friend not just an android app! List of my best friends: Aide, Acode, Termux, dualingo, sololearn, X-plore, MixPlorer, Newpipe, Matsuri, seal, b612, sketchbook, Whats your friends?!🤔🥹 (Yes I know its off topic) take it easy man 😂
Closing as resolved.
For those who might be interested - it appears that current Cargo can build Rust software with both full and thin LTO. It might be relevant to cryptography
as well.
Problem description
I'll not sure at what point this started happening, but I think within the last couple of Rust versions, I've started getting this error at the end of compiling a project with Thin LTO enabled:
It appears to have something to do with LLVM 15.
What steps will reproduce the bug?
Build any project with Thin LTO.
What is the expected behavior?
The project compiles
System information
termux-info: