You are not logged in.

#1 2023-05-29 01:53:46

gremlin
Member
Registered: 2022-07-19
Posts: 16

installing python sha3 lib --- error

Whether I install it by pip or from yay as yay -S python-sha3, the error will be the same:

==> Starting build()...
sha3.c: In function ‘PyInit__sha3’:
sha3.c:326:24: error: lvalue required as left operand of assignment
  326 |     Py_TYPE(&SHA3type) = &PyType_Type;
      |                        ^
sha3.c:324:26: warning: unused variable ‘st’ [-Wunused-variable]
  324 |     struct module_state *st = GETSTATE(module);
      |                          ^~
error: command '/usr/bin/gcc' failed with exit code 1
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: python-sha3-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-sha3 - exit status 4

How to fix it?

Offline

#2 2023-05-29 03:52:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: installing python sha3 lib --- error

That does not look particularly maintained.  Does python-pysha3 do what you need?

Offline

#3 2023-05-29 05:45:02

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: installing python sha3 lib --- error

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2023-05-29 09:12:30

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: installing python sha3 lib --- error

pysha3 looks equaly unmaintained and the upstream page gives a reason for that :

https://github.com/tiran/pysha3 wrote:

The pysha3 package has reached its end of life and is no longer supported.

The SHA-3 code was merged into Python 3.6 many years ago. Please use SHA-3 functions from hashlib module directly.

@gremlin: Why do you need an external program for sha3 support in python ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2023-05-29 17:09:04

gremlin
Member
Registered: 2022-07-19
Posts: 16

Re: installing python sha3 lib --- error

@Lone_Wolf as I've described in my post, I resorted to it because the original python library "sha3", which is installed by pip, didn't work

Last edited by gremlin (2023-05-29 17:09:46)

Offline

#6 2023-05-29 17:22:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: installing python sha3 lib --- error

That's the same upstream source for unmaintained content.  Lone_Wolf was highlighting that this functionality has been added to python itself.  You don't need to install anything else:

#!/bin/python

import hashlib

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB