public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* Struggling with a problem with the python 3.13 update
@ 2025-02-04 17:22 Adolf Belka
  2025-02-05 13:05 ` Michael Tremer
  0 siblings, 1 reply; 4+ messages in thread
From: Adolf Belka @ 2025-02-04 17:22 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 6103 bytes --]

Hi All,

I have hit a problem with my python-3.13 update that I have not been 
able to figure a way out from.

I had got to the updating of python3-cryptography. The newer version 
used in combination with python 3.13 is now requiring a lot of rust 
crates to be installed. So far I have had to install 21 new rust crates 
and update quite a few others.

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-tiny-keccak failed to compile with the following log output.

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
====================================== 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/.cargo && 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=/usr/src/tiny-keccak-2.0.2/.cargo RUSTC_BOOTSTRAP=1 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=2021 
/usr/share/cargo/registry/crunchy-0.2.3/build.rs --error-format=json 
--json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type 
bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off 
--cfg 'feature="default"' --cfg 'feature="limit_128"' --check-cfg 
'cfg(docsrs)' --check-cfg 'cfg(feature, values("default", "limit_1024", 
"limit_128", "limit_2048", "limit_256", "limit_512", "limit_64", 
"std"))' -C metadata=ac4fd721ed21a1bd -C 
extra-filename=-ac4fd721ed21a1bd --out-dir 
/usr/src/tiny-keccak-2.0.2/target/release/build/crunchy-ac4fd721ed21a1bd 
-C strip=debuginfo -L 
dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps --cap-lints 
allow -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 
--cap-lints=warn`
      Running `rustc --crate-name build_script_build --edition=2018 
build.rs --error-format=json 
--json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type 
bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off 
--cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 
'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", 
"kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C 
metadata=716aee7b2cfdb0c1 -C extra-filename=-716aee7b2cfdb0c1 --out-dir 
/usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 
-C strip=debuginfo -L 
dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps -Copt-level=3 
-Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn`
error: You need to specify at least one hash function you intend to use. 
Available options:
        keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, 
k12, fips202, sp800
        e.g.
        tiny-keccak = { version = "2.0.0", features = ["sha3"] }
   --> build.rs:13:1
    |
13 | / compile_error!(
14 | |     "You need to specify at least one hash function you intend to 
use. \
15 | |     Available options:\n\
16 | |     keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, 
k12, fips202, sp800\n\
17 | |     e.g.\n\
18 | |     tiny-keccak = { version = \"2.0.0\", features = [\"sha3\"] }"
19 | | );
    | |_^

error: could not compile `tiny-keccak` (build script) due to 1 previous 
error

Caused by:
   process didn't exit successfully: `rustc --crate-name 
build_script_build --edition=2018 build.rs --error-format=json 
--json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type 
bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off 
--cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 
'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", 
"kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C 
metadata=716aee7b2cfdb0c1 -C extra-filename=-716aee7b2cfdb0c1 --out-dir 
/usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 
-C strip=debuginfo -L 
dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps -Copt-level=3 
-Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn` (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

The rust-const-random-macro contains the following dependencies section 
within its cargo.toml file:-

[dependencies.tiny-keccak]
version = "2.0.2"
features = ["shake"]

but that is in the rust crate that comes after tiny-keccak gets compiled 
successfully.

I can't figure out how to tell the rust compilation of tiny-keccak to 
specify 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 would specify all of the available hash 
functions. Also it seems to me that the compilation command includes a 
list of the hash functions

--cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 
'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", 
"kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))'

Any help or guidance on how I should deal with this issue would be very 
gladly accepted.

I only have 16 python modules and around 7 applications that use python 
left to build with python-3.13 . It feels so close to completing but 
with rust-tiny-keccak it feels so far still.

Regards,
Adolf.


Sent from my laptop


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Struggling with a problem with the python 3.13 update
  2025-02-04 17:22 Struggling with a problem with the python 3.13 update Adolf Belka
@ 2025-02-05 13:05 ` Michael Tremer
  2025-02-05 14:19   ` Adolf Belka
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Tremer @ 2025-02-05 13:05 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 7218 bytes --]

Hello Adolf,

> On 4 Feb 2025, at 17:22, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
> 
> Hi All,
> 
> I have hit a problem with my python-3.13 update that I have not been able to figure a way out from.
> 
> I had got to the updating of python3-cryptography. The newer version used in combination with python 3.13 is now requiring a lot of rust crates to be installed. So far I have had to install 21 new rust crates and update quite a few others.

I am not going to comment on how bad this all is, because you all know… Let’s 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-tiny-keccak failed to compile with the following log output.
> 
> 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
> ====================================== 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/.cargo && 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=/usr/src/tiny-keccak-2.0.2/.cargo RUSTC_BOOTSTRAP=1 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=2021 /usr/share/cargo/registry/crunchy-0.2.3/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="limit_128"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("default", "limit_1024", "limit_128", "limit_2048", "limit_256", "limit_512", "limit_64", "std"))' -C metadata=ac4fd721ed21a1bd -C extra-filename=-ac4fd721ed21a1bd --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/crunchy-ac4fd721ed21a1bd -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps --cap-lints allow -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn`
>      Running `rustc --crate-name build_script_build --edition=2018 build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C metadata=716aee7b2cfdb0c1 -C extra-filename=-716aee7b2cfdb0c1 --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn`
> error: You need to specify at least one hash function you intend to use. Available options:
>        keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, k12, fips202, sp800
>        e.g.
>        tiny-keccak = { version = "2.0.0", features = ["sha3"] }
>   --> build.rs:13:1
>    |
> 13 | / compile_error!(
> 14 | |     "You need to specify at least one hash function you intend to use. \
> 15 | |     Available options:\n\
> 16 | |     keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, k12, fips202, sp800\n\
> 17 | |     e.g.\n\
> 18 | |     tiny-keccak = { version = \"2.0.0\", features = [\"sha3\"] }"
> 19 | | );
>    | |_^
> 
> error: could not compile `tiny-keccak` (build script) due to 1 previous error
> 
> Caused by:
>   process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C metadata=716aee7b2cfdb0c1 -C extra-filename=-716aee7b2cfdb0c1 --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn` (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 hashes, but none of them are enabled by default. They need to be enabled whenever they are needed.

> The rust-const-random-macro contains the following dependencies section within its cargo.toml file:-
> 
> [dependencies.tiny-keccak]
> version = "2.0.2"
> features = ["shake"]
> 
> but that is in the rust crate that comes after tiny-keccak gets compiled successfully.

The “features” option enabled “shake” here. This 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 specify 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 would specify all of the available hash functions. Also it seems to me that the compilation command includes a list of the hash functions
> 
> --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))'
> 
> Any help or guidance on how I should deal with this issue would be very gladly accepted.

I would assume that there is nothing that you should do manually here. The people who depend on this package need to tell it which hash they want to use and Cargo is supposed to take care of the rest. In Cargo.toml, there should be something like this:

  [dependencies]
  tiny-keccak = { version = "2.0.0", features = ["sha3"] }

Maybe the syntax has changed? Because the snippet that you posted seems to carry the same information, just in a different format.

> I only have 16 python modules and around 7 applications that use python left to build with python-3.13 . It feels so close to completing but with rust-tiny-keccak it feels so far still.

I hope I could help :)

-Michael

> 
> Regards,
> Adolf.
> 
> 
> Sent from my laptop
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Struggling with a problem with the python 3.13 update
  2025-02-05 13:05 ` Michael Tremer
@ 2025-02-05 14:19   ` Adolf Belka
  2025-02-05 18:27     ` Adolf Belka
  0 siblings, 1 reply; 4+ messages in thread
From: Adolf Belka @ 2025-02-05 14:19 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 8823 bytes --]

Hi Michael,

On 05/02/2025 14:05, Michael Tremer wrote:
> Hello Adolf,
> 
>> On 4 Feb 2025, at 17:22, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
>>
>> Hi All,
>>
>> I have hit a problem with my python-3.13 update that I have not been able to figure a way out from.
>>
>> I had got to the updating of python3-cryptography. The newer version used in combination with python 3.13 is now requiring a lot of rust crates to be installed. So far I have had to install 21 new rust crates and update quite a few others.
> 
> I am not going to comment on how bad this all is, because you all know… Let’s just insert some eye rolling here...

I had a similar feeling when it all started but I just have to work with it or it doesn't get updated.

> 
>> 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-tiny-keccak failed to compile with the following log output.
>>
>> 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
>> ====================================== 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/.cargo && 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=/usr/src/tiny-keccak-2.0.2/.cargo RUSTC_BOOTSTRAP=1 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=2021 /usr/share/cargo/registry/crunchy-0.2.3/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="limit_128"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("default", "limit_1024", "limit_128", "limit_2048", "limit_256", "limit_512", "limit_64", "std"))' -C metadata=ac4fd721ed21a1bd -C extra-filename=-ac4fd721ed21a1bd --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/crunchy-ac4fd721ed21a1bd -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps --cap-lints allow -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn`
>>       Running `rustc --crate-name build_script_build --edition=2018 build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C metadata=716aee7b2cfdb0c1 -C extra-filename=-716aee7b2cfdb0c1 --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn`
>> error: You need to specify at least one hash function you intend to use. Available options:
>>         keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, k12, fips202, sp800
>>         e.g.
>>         tiny-keccak = { version = "2.0.0", features = ["sha3"] }
>>    --> build.rs:13:1
>>     |
>> 13 | / compile_error!(
>> 14 | |     "You need to specify at least one hash function you intend to use. \
>> 15 | |     Available options:\n\
>> 16 | |     keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, k12, fips202, sp800\n\
>> 17 | |     e.g.\n\
>> 18 | |     tiny-keccak = { version = \"2.0.0\", features = [\"sha3\"] }"
>> 19 | | );
>>     | |_^
>>
>> error: could not compile `tiny-keccak` (build script) due to 1 previous error
>>
>> Caused by:
>>    process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C metadata=716aee7b2cfdb0c1 -C extra-filename=-716aee7b2cfdb0c1 --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn` (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 hashes, but none of them are enabled by default. They need to be enabled whenever they are needed.

I misinterpreted it then. I though they were all enabled.

> 
>> The rust-const-random-macro contains the following dependencies section within its cargo.toml file:-
>>
>> [dependencies.tiny-keccak]
>> version = "2.0.2"
>> features = ["shake"]
>>
>> but that is in the rust crate that comes after tiny-keccak gets compiled successfully.
> 
> The “features” option enabled “shake” here. This is basically how to enable the hash that you need. In the example above, sha3 has been used.

The problem is that dependencies section is in the rust-const-random-macro crate which only gets used after rust-tiny-keccak has been built.

> 
>> I can't figure out how to tell the rust compilation of tiny-keccak to specify 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 would specify all of the available hash functions. Also it seems to me that the compilation command includes a list of the hash functions
>>
>> --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))'
>>
>> Any help or guidance on how I should deal with this issue would be very gladly accepted.
> 
> I would assume that there is nothing that you should do manually here. The people who depend on this package need to tell it which hash they want to use and Cargo is supposed to take care of the rest. In Cargo.toml, there should be something like this:
> 
>    [dependencies]
>    tiny-keccak = { version = "2.0.0", features = ["sha3"] }
> 
> Maybe the syntax has changed? Because the snippet that you posted seems to carry the same information, just in a different format.

I tried putting that wording into the rust-tiny-keccak cargo.toml file but then the compiling of tiny-keccak complained that it couldn't find the module tiny-keccak that it was currently trying to build. Sounds a bit bootstrappy again.

Maybe the right thing is done if the files are updated on line. The message keeps coming up that I might be suffering from any problem due to having the offline status set. Maybe I should look and see if I can find what Arch Linux did with the python-cryptography update and thee ensuing rust crate requirements. There might be something somewhere showing what I need to change.

Maybe I need to modify the build.rs file in the tiny-keccak source file to enable all the hashes or at least the shake one that is required by rust-const-random-macro.

> 
>> I only have 16 python modules and around 7 applications that use python left to build with python-3.13 . It feels so close to completing but with rust-tiny-keccak it feels so far still.
> 
> I hope I could help :)

You have given me the knowledge that none of the hashes are selected, so I just need to try and find out what to change to make at least the shake hash get enabled. Maybe I need to try one of the bootstrap techniques I already tried with the first python modules needing to be built.

Thanks and regards,
Adolf.
> 
> -Michael
> 
>>
>> Regards,
>> Adolf.
>>
>>
>> Sent from my laptop
>>
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Struggling with a problem with the python 3.13 update
  2025-02-05 14:19   ` Adolf Belka
@ 2025-02-05 18:27     ` Adolf Belka
  0 siblings, 0 replies; 4+ messages in thread
From: Adolf Belka @ 2025-02-05 18:27 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 9680 bytes --]

Hi Michael & all,

Success!!

I figured out what needed to be changed. I read the rust doc page on features and found that all features are disabled by default but that if you place the required features in the default feature entry it is then enabled. So in the tiny-keccak Cargo.toml file I changed, with a patch file,

[features]
cshake = []
default = []
.....

to

[features]
cshake = []
default = ["shake"]
.....

and rust-tiny-keccak then built successfully and the next three rust crates.

I am now working through the next issue with the fourth rust crate after tiny-keccak.

Regards,

Adolf.

On 05/02/2025 15:19, Adolf Belka wrote:
> Hi Michael,
>
> On 05/02/2025 14:05, Michael Tremer wrote:
>> Hello Adolf,
>>
>>> On 4 Feb 2025, at 17:22, Adolf Belka <adolf.belka(a)ipfire.org> wrote:
>>>
>>> Hi All,
>>>
>>> I have hit a problem with my python-3.13 update that I have not been able to figure a way out from.
>>>
>>> I had got to the updating of python3-cryptography. The newer version used in combination with python 3.13 is now requiring a lot of rust crates to be installed. So far I have had to install 21 new rust crates and update quite a few others.
>>
>> I am not going to comment on how bad this all is, because you all know… Let’s just insert some eye rolling here...
>
> I had a similar feeling when it all started but I just have to work with it or it doesn't get updated.
>
>>
>>> 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-tiny-keccak failed to compile with the following log output.
>>>
>>> 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
>>> ====================================== 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/.cargo && 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=/usr/src/tiny-keccak-2.0.2/.cargo RUSTC_BOOTSTRAP=1 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=2021 /usr/share/cargo/registry/crunchy-0.2.3/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="limit_128"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("default", "limit_1024", "limit_128", "limit_2048", "limit_256", "limit_512", "limit_64", "std"))' -C metadata=ac4fd721ed21a1bd -C extra-filename=-ac4fd721ed21a1bd --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/crunchy-ac4fd721ed21a1bd -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps --cap-lints allow -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn`
>>>       Running `rustc --crate-name build_script_build --edition=2018 build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C metadata=716aee7b2cfdb0c1 -C extra-filename=-716aee7b2cfdb0c1 --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn`
>>> error: You need to specify at least one hash function you intend to use. Available options:
>>>         keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, k12, fips202, sp800
>>>         e.g.
>>>         tiny-keccak = { version = "2.0.0", features = ["sha3"] }
>>>    --> build.rs:13:1
>>>     |
>>> 13 | / compile_error!(
>>> 14 | |     "You need to specify at least one hash function you intend to use. \
>>> 15 | |     Available options:\n\
>>> 16 | |     keccak, shake, sha3, cshake, kmac, tuple_hash, parallel_hash, k12, fips202, sp800\n\
>>> 17 | |     e.g.\n\
>>> 18 | |     tiny-keccak = { version = \"2.0.0\", features = [\"sha3\"] }"
>>> 19 | | );
>>>     | |_^
>>>
>>> error: could not compile `tiny-keccak` (build script) due to 1 previous error
>>>
>>> Caused by:
>>>    process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))' -C metadata=716aee7b2cfdb0c1 -C extra-filename=-716aee7b2cfdb0c1 --out-dir /usr/src/tiny-keccak-2.0.2/target/release/build/tiny-keccak-716aee7b2cfdb0c1 -C strip=debuginfo -L dependency=/usr/src/tiny-keccak-2.0.2/target/release/deps -Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn` (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 hashes, but none of them are enabled by default. They need to be enabled whenever they are needed.
>
> I misinterpreted it then. I though they were all enabled.
>
>>
>>> The rust-const-random-macro contains the following dependencies section within its cargo.toml file:-
>>>
>>> [dependencies.tiny-keccak]
>>> version = "2.0.2"
>>> features = ["shake"]
>>>
>>> but that is in the rust crate that comes after tiny-keccak gets compiled successfully.
>>
>> The “features” option enabled “shake” here. This is basically how to enable the hash that you need. In the example above, sha3 has been used.
>
> The problem is that dependencies section is in the rust-const-random-macro crate which only gets used after rust-tiny-keccak has been built.
>
>>
>>> I can't figure out how to tell the rust compilation of tiny-keccak to specify 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 would specify all of the available hash functions. Also it seems to me that the compilation command includes a list of the hash functions
>>>
>>> --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("cshake", "default", "fips202", "k12", "keccak", "kmac", "parallel_hash", "sha3", "shake", "sp800", "tuple_hash"))'
>>>
>>> Any help or guidance on how I should deal with this issue would be very gladly accepted.
>>
>> I would assume that there is nothing that you should do manually here. The people who depend on this package need to tell it which hash they want to use and Cargo is supposed to take care of the rest. In Cargo.toml, there should be something like this:
>>
>>    [dependencies]
>>    tiny-keccak = { version = "2.0.0", features = ["sha3"] }
>>
>> Maybe the syntax has changed? Because the snippet that you posted seems to carry the same information, just in a different format.
>
> I tried putting that wording into the rust-tiny-keccak cargo.toml file but then the compiling of tiny-keccak complained that it couldn't find the module tiny-keccak that it was currently trying to build. Sounds a bit bootstrappy again.
>
> Maybe the right thing is done if the files are updated on line. The message keeps coming up that I might be suffering from any problem due to having the offline status set. Maybe I should look and see if I can find what Arch Linux did with the python-cryptography update and thee ensuing rust crate requirements. There might be something somewhere showing what I need to change.
>
> Maybe I need to modify the build.rs file in the tiny-keccak source file to enable all the hashes or at least the shake one that is required by rust-const-random-macro.
>
>>
>>> I only have 16 python modules and around 7 applications that use python left to build with python-3.13 . It feels so close to completing but with rust-tiny-keccak it feels so far still.
>>
>> I hope I could help :)
>
> You have given me the knowledge that none of the hashes are selected, so I just need to try and find out what to change to make at least the shake hash get enabled. Maybe I need to try one of the bootstrap techniques I already tried with the first python modules needing to be built.
>
> Thanks and regards,
> Adolf.
>>
>> -Michael
>>
>>>
>>> Regards,
>>> Adolf.
>>>
>>>
>>> Sent from my laptop
>>>
>>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-05 18:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-04 17:22 Struggling with a problem with the python 3.13 update Adolf Belka
2025-02-05 13:05 ` Michael Tremer
2025-02-05 14:19   ` Adolf Belka
2025-02-05 18:27     ` Adolf Belka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox