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

[Bug]: Missing 'longintrepr.h' python 3.11 header file #13327

Closed
Querela opened this issue Nov 20, 2022 · 5 comments
Closed

[Bug]: Missing 'longintrepr.h' python 3.11 header file #13327

Querela opened this issue Nov 20, 2022 · 5 comments
Labels
bug report Something is not working properly

Comments

@Querela
Copy link

Querela commented Nov 20, 2022

Problem description

It seems as if some python header files are missing for the new python3.11. In particular: longintrepr.h. I did not find a python-dev or lib* package which might contain these.
And I was unable to install the previous 3.10 version of python since it was not listed anymore, e.g. in apt-cache madison python. So, my previous virtual environment with dependencies currently is broken and can't really be reinstalled.

Related: cython/cython#4461 ?

What steps will reproduce the bug?

Commands:

python3.11 -m venv venv
source venv/bin/activate
pip install pycrypto

Result:

# ...
      aarch64-linux-android-clang -fwrapv -Wall -fstack-protector-strong -fstack-protector-strong -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/data/data/com.termux/files/home/tempissue/venv/include -I/data/data/com.termux/files/usr/include/python3.11 -c src/_fastmath.c -o build/temp.linux-aarch64-cpython-311/src/_fastmath.o
      src/_fastmath.c:33:10: fatal error: 'longintrepr.h' file not found
      #include <longintrepr.h>                                /* for conversions */
               ^~~~~~~~~~~~~~~
      1 error generated.
      error: command '/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycrypto
Full Output
Collecting pycrypto
  Using cached pycrypto-2.6.1.tar.gz (446 kB)
  Preparing metadata (setup.py) ... done
Installing collected packages: pycrypto
  DEPRECATION: pycrypto is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for pycrypto ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pycrypto did not run successfully.
  │ exit code: 1
  ╰─> [212 lines of output]
      running install
      /data/data/com.termux/files/home/tempissue/venv/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-311
      creating build/lib.linux-aarch64-cpython-311/Crypto
      copying lib/Crypto/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto
      copying lib/Crypto/pct_warnings.py -> build/lib.linux-aarch64-cpython-311/Crypto
      creating build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/MD5.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/SHA512.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/MD2.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/SHA384.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/HMAC.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/SHA.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/MD4.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/RIPEMD.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/SHA256.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/SHA224.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/hashalgo.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      copying lib/Crypto/Hash/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/Hash
      creating build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/DES.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/blockalgo.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/ARC4.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/PKCS1_v1_5.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/CAST.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/PKCS1_OAEP.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/Blowfish.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/ARC2.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/XOR.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/AES.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/DES3.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      copying lib/Crypto/Cipher/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/Cipher
      creating build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/_number_new.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/asn1.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/number.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/py3compat.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/winrandom.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/RFC1751.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/Counter.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      copying lib/Crypto/Util/randpool.py -> build/lib.linux-aarch64-cpython-311/Crypto/Util
      creating build/lib.linux-aarch64-cpython-311/Crypto/Random
      copying lib/Crypto/Random/random.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random
      copying lib/Crypto/Random/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random
      copying lib/Crypto/Random/_UserFriendlyRNG.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random
      creating build/lib.linux-aarch64-cpython-311/Crypto/Random/Fortuna
      copying lib/Crypto/Random/Fortuna/FortunaGenerator.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random/Fortuna
      copying lib/Crypto/Random/Fortuna/FortunaAccumulator.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random/Fortuna
      copying lib/Crypto/Random/Fortuna/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random/Fortuna
      copying lib/Crypto/Random/Fortuna/SHAd256.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random/Fortuna
      creating build/lib.linux-aarch64-cpython-311/Crypto/Random/OSRNG
      copying lib/Crypto/Random/OSRNG/fallback.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random/OSRNG
      copying lib/Crypto/Random/OSRNG/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random/OSRNG
      copying lib/Crypto/Random/OSRNG/rng_base.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random/OSRNG
      copying lib/Crypto/Random/OSRNG/posix.py -> build/lib.linux-aarch64-cpython-311/Crypto/Random/OSRNG
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest
      copying lib/Crypto/SelfTest/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest
      copying lib/Crypto/SelfTest/st_common.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_ARC4.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_CAST.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/common.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_ARC2.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_XOR.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_Blowfish.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_DES.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_AES.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_DES3.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      copying lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Cipher
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_MD4.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_MD5.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_SHA384.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_MD2.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_SHA256.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_SHA.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_SHA224.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_RIPEMD.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/common.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_HMAC.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      copying lib/Crypto/SelfTest/Hash/test_SHA512.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Hash
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Protocol
      copying lib/Crypto/SelfTest/Protocol/test_chaffing.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Protocol
      copying lib/Crypto/SelfTest/Protocol/test_AllOrNothing.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Protocol
      copying lib/Crypto/SelfTest/Protocol/test_rfc1751.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Protocol
      copying lib/Crypto/SelfTest/Protocol/test_KDF.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Protocol
      copying lib/Crypto/SelfTest/Protocol/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Protocol
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/PublicKey
      copying lib/Crypto/SelfTest/PublicKey/test_ElGamal.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/PublicKey
      copying lib/Crypto/SelfTest/PublicKey/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/PublicKey
      copying lib/Crypto/SelfTest/PublicKey/test_DSA.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/PublicKey
      copying lib/Crypto/SelfTest/PublicKey/test_importKey.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/PublicKey
      copying lib/Crypto/SelfTest/PublicKey/test_RSA.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/PublicKey
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random
      copying lib/Crypto/SelfTest/Random/test_random.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random
      copying lib/Crypto/SelfTest/Random/test__UserFriendlyRNG.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random
      copying lib/Crypto/SelfTest/Random/test_rpoolcompat.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random
      copying lib/Crypto/SelfTest/Random/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/Fortuna
      copying lib/Crypto/SelfTest/Random/Fortuna/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/Fortuna
      copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaGenerator.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/Fortuna
      copying lib/Crypto/SelfTest/Random/Fortuna/test_SHAd256.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/Fortuna
      copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/Fortuna
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/OSRNG
      copying lib/Crypto/SelfTest/Random/OSRNG/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/OSRNG
      copying lib/Crypto/SelfTest/Random/OSRNG/test_nt.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/OSRNG
      copying lib/Crypto/SelfTest/Random/OSRNG/test_posix.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/OSRNG
      copying lib/Crypto/SelfTest/Random/OSRNG/test_generic.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/OSRNG
      copying lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/OSRNG
      copying lib/Crypto/SelfTest/Random/OSRNG/test_fallback.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Random/OSRNG
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Util
      copying lib/Crypto/SelfTest/Util/test_winrandom.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Util
      copying lib/Crypto/SelfTest/Util/test_number.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Util
      copying lib/Crypto/SelfTest/Util/test_asn1.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Util
      copying lib/Crypto/SelfTest/Util/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Util
      copying lib/Crypto/SelfTest/Util/test_Counter.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Util
      creating build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Signature
      copying lib/Crypto/SelfTest/Signature/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Signature
      copying lib/Crypto/SelfTest/Signature/test_pkcs1_pss.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Signature
      copying lib/Crypto/SelfTest/Signature/test_pkcs1_15.py -> build/lib.linux-aarch64-cpython-311/Crypto/SelfTest/Signature
      creating build/lib.linux-aarch64-cpython-311/Crypto/Protocol
      copying lib/Crypto/Protocol/KDF.py -> build/lib.linux-aarch64-cpython-311/Crypto/Protocol
      copying lib/Crypto/Protocol/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/Protocol
      copying lib/Crypto/Protocol/AllOrNothing.py -> build/lib.linux-aarch64-cpython-311/Crypto/Protocol
      copying lib/Crypto/Protocol/Chaffing.py -> build/lib.linux-aarch64-cpython-311/Crypto/Protocol
      creating build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-aarch64-cpython-311/Crypto/PublicKey
      creating build/lib.linux-aarch64-cpython-311/Crypto/Signature
      copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-aarch64-cpython-311/Crypto/Signature
      copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-aarch64-cpython-311/Crypto/Signature
      copying lib/Crypto/Signature/__init__.py -> build/lib.linux-aarch64-cpython-311/Crypto/Signature
      running build_ext
      running build_configure
      checking for gcc... gcc
      checking whether the C compiler works... yes
      checking for C compiler default output file name... a.out
      checking for suffix of executables...
      checking whether we are cross compiling... no
      checking for suffix of object files... o
      checking whether we are using the GNU C compiler... yes
      checking whether gcc accepts -g... yes
      checking for gcc option to accept ISO C89... none needed
      checking for __gmpz_init in -lgmp... yes
      checking for __gmpz_init in -lmpir... no
      checking whether mpz_powm is declared... yes
      checking whether mpz_powm_sec is declared... yes
      checking how to run the C preprocessor... gcc -E
      checking for grep that handles long lines and -e... /data/data/com.termux/files/usr/bin/grep
      checking for egrep... /data/data/com.termux/files/usr/bin/grep -E
      checking for ANSI C header files... yes
      checking for sys/types.h... yes
      checking for sys/stat.h... yes
      checking for stdlib.h... yes
      checking for string.h... yes
      checking for memory.h... yes
      checking for strings.h... yes
      checking for inttypes.h... yes
      checking for stdint.h... yes
      checking for unistd.h... yes
      checking for inttypes.h... (cached) yes
      checking limits.h usability... yes
      checking limits.h presence... yes
      checking for limits.h... yes
      checking stddef.h usability... yes
      checking stddef.h presence... yes
      checking for stddef.h... yes
      checking for stdint.h... (cached) yes
      checking for stdlib.h... (cached) yes
      checking for string.h... (cached) yes
      checking wchar.h usability... yes
      checking wchar.h presence... yes
      checking for wchar.h... yes
      checking for inline... inline
      checking for int16_t... yes
      checking for int32_t... yes
      checking for int64_t... yes
      checking for int8_t... yes
      checking for size_t... yes
      checking for uint16_t... yes
      checking for uint32_t... yes
      checking for uint64_t... yes
      checking for uint8_t... yes
      checking for stdlib.h... (cached) yes
      checking for GNU libc compatible malloc... yes
      checking for memmove... yes
      checking for memset... yes
      configure: creating ./config.status
      config.status: creating src/config.h
      building 'Crypto.PublicKey._fastmath' extension
      creating build/temp.linux-aarch64-cpython-311
      creating build/temp.linux-aarch64-cpython-311/src
      aarch64-linux-android-clang -fwrapv -Wall -fstack-protector-strong -fstack-protector-strong -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/data/data/com.termux/files/home/tempissue/venv/include -I/data/data/com.termux/files/usr/include/python3.11 -c src/_fastmath.c -o build/temp.linux-aarch64-cpython-311/src/_fastmath.o
      src/_fastmath.c:33:10: fatal error: 'longintrepr.h' file not found
      #include <longintrepr.h>                                /* for conversions */
               ^~~~~~~~~~~~~~~
      1 error generated.
      error: command '/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycrypto

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: pip install --upgrade pip

What is the expected behavior?

Working installation. Package with header files to install.

System information

termux-info:

Termux Variables:
TERMUX_API_VERSION=0.50.1+dc89cd6
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=9884
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.pku.edu.cn/termux/termux-main/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.31.1
Android version:
11
Kernel build information:
Linux localhost 4.14.180-perf-g4b73fd3 #2 SMP PREEMPT Sun Jun 27 00:46:38 CST 2021 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
MI 9

Python version: 3.11.0.

apt-cache madison python
    python |     3.11.0 | https://mirrors.pku.edu.cn/termux/termux-main stable/main aarch64 Packages
@Querela Querela added the bug report Something is not working properly label Nov 20, 2022
@sylirre
Copy link
Member

sylirre commented Nov 20, 2022

The file is present:
Screenshot_20221120-170323

@sylirre sylirre closed this as completed Nov 20, 2022
@sylirre
Copy link
Member

sylirre commented Nov 20, 2022

Try setting export CFLAGS="-I${PREFIX}/include/python3.11/cpython".

@Querela
Copy link
Author

Querela commented Nov 20, 2022

Ok. Thanks.
I always thought those libraries/headers are picked up by default.
The compilation still fails but not because of this particular header file, now it's all about modsupport.h. I will need to test a bit more to find out the solution....

# ...
      /data/data/com.termux/files/usr/include/python3.11/cpython/modsupport.h:2:4: error: "this header file must not be included directly"
      #  error "this header file must not be included directly"
# ...

@sylirre
Copy link
Member

sylirre commented Nov 20, 2022

This header is private and normally shouldn't be used by third party modules.

I guess earlier longintrepr.h was included by one or more "public" Python headers and no CFLAGS tweaking was required. Python 3.11 release become stricter regarding this.

@Querela
Copy link
Author

Querela commented Nov 20, 2022

Yep, probably. I'm surprised it even worked with 3.10 in my old venv. According to https://www.pycrypto.org/ it is long obsolete. The replacement PyCryptodome now works fine.
Thank you for the time spent on this issue and looking into things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly
Projects
None yet
Development

No branches or pull requests

2 participants