From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: Struggling with a problem with the python 3.13 update Date: Wed, 05 Feb 2025 13:05:06 +0000 Message-ID: <0F499873-E98F-4720-B886-9FD9FF0272CB@ipfire.org> In-Reply-To: <3534def4-a098-454e-a58a-8e3727d32684@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6388011953488447199==" List-Id: --===============6388011953488447199== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Adolf, > On 4 Feb 2025, at 17:22, Adolf Belka wrote: >=20 > Hi All, >=20 > I have hit a problem with my python-3.13 update that I have not been able t= o figure a way out from. >=20 > I had got to the updating of python3-cryptography. The newer version used i= n combination with python 3.13 is now requiring a lot of rust crates to be in= stalled. So far I have had to install 21 new rust crates and update quite a f= ew others. I am not going to comment on how bad this all is, because you all know=E2=80= =A6 Let=E2=80=99s just insert some eye rolling here... > The updates have gone fine until I installed rust-const-random-macro which = then required rust-tiny-keccak which then required rust-crunchy. Then rust-ti= ny-keccak failed to compile with the following log output. >=20 > Feb 4 15:52:36: Building rust-tiny-keccak make: Entering directory '/home/= user/sandbox/ipfire-2.x/lfs' > make: Nothing to be done for 'download'. > make: Leaving directory '/home/user/sandbox/ipfire-2.x/lfs' > make: Entering directory '/usr/src/lfs' > tiny-keccak-2.0.2.tar.gz checksum OK > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Installing tiny-keccak-2.0.2 ... > Install started; saving file list to /usr/src/lsalr ... > cd /usr/src/tiny-keccak-2.0.2 && rm Cargo.toml.orig > cd /usr/src/tiny-keccak-2.0.2 && mkdir -p /usr/src/tiny-keccak-2.0.2/.c= argo && echo "${CARGO_CONFIG}" > /usr/src/tiny-keccak-2.0.2/.cargo/config && = rm -f Cargo.lock > cd /usr/src/tiny-keccak-2.0.2 && CARGOPATH=3D/usr/src/tiny-keccak-2.0.2/.ca= rgo RUSTC_BOOTSTRAP=3D1 cargo --offline build --release -Z avoid-dev-deps -j16 > warning: `/usr/src/tiny-keccak-2.0.2/.cargo/config` is deprecated in favor = of `config.toml` > note: if you need to support cargo 1.38 or earlier, you can symlink `config= ` to `config.toml` > Compiling crunchy v0.2.3 > Compiling tiny-keccak v2.0.2 (/usr/src/tiny-keccak-2.0.2) > Running `rustc --crate-name build_script_build --edition=3D2021 /usr/s= hare/cargo/registry/crunchy-0.2.3/build.rs --error-format=3Djson --json=3Ddia= gnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=3Ddep= -info,link -C embed-bitcode=3Dno -C debug-assertions=3Doff --cfg 'feature=3D"= default"' --cfg 'feature=3D"limit_128"' --check-cfg 'cfg(docsrs)' --check-cfg= 'cfg(feature, values("default", "limit_1024", "limit_128", "limit_2048", "li= mit_256", "limit_512", "limit_64", "std"))' -C metadata=3Dac4fd721ed21a1bd -C= extra-filename=3D-ac4fd721ed21a1bd --out-dir /usr/src/tiny-keccak-2.0.2/targ= et/release/build/crunchy-ac4fd721ed21a1bd -C strip=3Ddebuginfo -L dependency= =3D/usr/src/tiny-keccak-2.0.2/target/release/deps --cap-lints allow -Copt-lev= el=3D3 -Clink-arg=3D-Wl,-z,relro,-z,now -Ccodegen-units=3D1 --cap-lints=3Dwar= n` > Running `rustc --crate-name build_script_build --edition=3D2018 build.= rs --error-format=3Djson --json=3Ddiagnostic-rendered-ansi,artifacts,future-i= ncompat --crate-type bin --emit=3Ddep-info,link -C embed-bitcode=3Dno -C debu= g-assertions=3Doff --cfg 'feature=3D"default"' --check-cfg 'cfg(docsrs)' --ch= eck-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak",= "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C metada= ta=3D716aee7b2cfdb0c1 -C extra-filename=3D-716aee7b2cfdb0c1 --out-dir /usr/sr= c/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 -C stri= p=3Ddebuginfo -L dependency=3D/usr/src/tiny-keccak-2.0.2/target/release/deps = -Copt-level=3D3 -Clink-arg=3D-Wl,-z,relro,-z,now -Ccodegen-units=3D1 --cap-li= nts=3Dwarn` > error: You need to specify at least one hash function you intend to use. Av= ailable options: > keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, k12, f= ips202, sp800 > e.g. > tiny-keccak =3D { version =3D "2.0.0", features =3D ["sha3"] } > --> build.rs:13:1 > | > 13 | / compile_error!( > 14 | | "You need to specify at least one hash function you intend to us= e. \ > 15 | | Available options:\n\ > 16 | | keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, k1= 2, fips202, sp800\n\ > 17 | | e.g.\n\ > 18 | | tiny-keccak =3D { version =3D \"2.0.0\", features =3D [\"sha3\"]= }" > 19 | | ); > | |_^ >=20 > error: could not compile `tiny-keccak` (build script) due to 1 previous err= or >=20 > Caused by: > process didn't exit successfully: `rustc --crate-name build_script_build = --edition=3D2018 build.rs --error-format=3Djson --json=3Ddiagnostic-rendered-= ansi,artifacts,future-incompat --crate-type bin --emit=3Ddep-info,link -C emb= ed-bitcode=3Dno -C debug-assertions=3Doff --cfg 'feature=3D"default"' --check= -cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fip= s202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "t= uple_hash"))' -C metadata=3D716aee7b2cfdb0c1 -C extra-filename=3D-716aee7b2cf= db0c1 --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-7= 16aee7b2cfdb0c1 -C strip=3Ddebuginfo -L dependency=3D/usr/src/tiny-keccak-2.0= .2/target/release/deps -Copt-level=3D3 -Clink-arg=3D-Wl,-z,relro,-z,now -Ccod= egen-units=3D1 --cap-lints=3Dwarn` (exit status: 1) > warning: build failed, waiting for other jobs to finish... > make: *** [rust-tiny-keccak:78: /usr/src/log/tiny-keccak-2.0.2] Error 101 As far as I understand the documentation this package implements a lot of has= hes, but none of them are enabled by default. They need to be enabled wheneve= r they are needed. > The rust-const-random-macro contains the following dependencies section wit= hin its cargo.toml file:- >=20 > [dependencies.tiny-keccak] > version =3D "2.0.2" > features =3D ["shake"] >=20 > but that is in the rust crate that comes after tiny-keccak gets compiled su= ccessfully. The =E2=80=9Cfeatures=E2=80=9D option enabled =E2=80=9Cshake=E2=80=9D here. T= his is basically how to enable the hash that you need. In the example above, = sha3 has been used. > I can't figure out how to tell the rust compilation of tiny-keccak to speci= fy the various hash functions and in terms of the const-random-macro crate to= specify the shake hash function. I would have expected that by default it wo= uld specify all of the available hash functions. Also it seems to me that the= compilation command includes a list of the hash functions >=20 > --cfg 'feature=3D"default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feat= ure, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "paralle= l_hash", "sha3", "shake", "sp800", "tuple_hash"))' >=20 > Any help or guidance on how I should deal with this issue would be very gla= dly accepted. I would assume that there is nothing that you should do manually here. The pe= ople who depend on this package need to tell it which hash they want to use a= nd Cargo is supposed to take care of the rest. In Cargo.toml, there should be= something like this: [dependencies] tiny-keccak =3D { version =3D "2.0.0", features =3D ["sha3"] } Maybe the syntax has changed? Because the snippet that you posted seems to ca= rry the same information, just in a different format. > I only have 16 python modules and around 7 applications that use python lef= t to build with python-3.13 . It feels so close to completing but with rust-t= iny-keccak it feels so far still. I hope I could help :) -Michael >=20 > Regards, > Adolf. >=20 >=20 > Sent from my laptop >=20 --===============6388011953488447199==--