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
0.6.3 unable to build on armv7l #304
Comments
I believe I have put the correct libc names in libs.json, but somehow I didn't use that. I'm still trying to recall why... |
I have the same problem. I can't install curl_cffi on Raspberry Pi 4 File "scripts/build.py", line 45, in <module>
arch = detect_arch()
^^^^^^^^^^^^^
File "scripts/build.py", line 42, in detect_arch
raise Exception(f"Unsupported arch: {uname}")
Exception: Unsupported arch: uname_result(system='Linux', node='raspberrypi', release='5.10.103-v7l+', version='#1529 SMP Tue Mar 8 12:24:00 GMT 2022', machine='armv7l') |
I tried to install the old version 0.6.1 But I got another error: File "/tmp/pip-build-env-7qonxzod/overlay/lib/python3.11/site-packages/cffi/api.py", line 48, in __init__
import _cffi_backend as backend
ImportError: libffi.so.8: cannot open shared object file: No such file or directory Maybe someone knows how to fix this? uname_result(system='Linux', node='raspberrypi', release='5.10.103-v7l+', version='#1529 SMP Tue Mar 8 12:24: 00 GMT 2022', machine='armv7l') I installed these packages: sudo apt install libffi6
sudo apt install libgfortran4
sudo apt install libffi-dev But it did not help. I don't use curl_cffi myself, the application I'm trying to install needs it |
@Galoev you can use the wheels I have available here: |
@bjia56 I got the same error: ❯ pip install curl_cffi --extra-index-url https://bjia56.github.io/armv7l-wheels/
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://bjia56.github.io/armv7l-wheels/
Collecting curl_cffi
Using cached curl_cffi-0.6.3.tar.gz (125 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [43 lines of output]
Traceback (most recent call last):
File "/home/pi/Documents/galoev_gpt/tmp/.tenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/pi/Documents/galoev_gpt/tmp/.tenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/Documents/galoev_gpt/tmp/.tenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 16, in <module>
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 146, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 307, in __init__
_Distribution.__init__(self, dist_attrs)
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 284, in __init__
self.finalize_options()
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 658, in finalize_options
ep(self)
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 678, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/cffi/setuptools_ext.py", line 216, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/tmp/pip-build-env-2mm9r84c/overlay/lib/python3.11/site-packages/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "scripts/build.py", line 45, in <module>
arch = detect_arch()
^^^^^^^^^^^^^
File "scripts/build.py", line 42, in detect_arch
raise Exception(f"Unsupported arch: {uname}")
Exception: Unsupported arch: uname_result(system='Linux', node='raspberrypi', release='5.10.103-v7l+', version='#1529 SMP Tue Mar 8 12:24:00 GMT 2022', machine='armv7l')
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error I also tried to build the project from your fork of the repository, where you fixed the error, but I got this error: ❯ git clone https://github.com/bjia56/curl_cffi.git
Cloning into 'curl_cffi'...
remote: Enumerating objects: 1979, done.
remote: Counting objects: 100% (992/992), done.
remote: Compressing objects: 100% (424/424), done.
remote: Total 1979 (delta 781), reused 585 (delta 567), pack-reused 987
Receiving objects: 100% (1979/1979), 1.10 MiB | 3.98 MiB/s, done.
Resolving deltas: 100% (1304/1304), done.
❯ cd curl_cffi
❯ git checkout armv7l-fix
Branch 'armv7l-fix' set up to track remote branch 'armv7l-fix' from 'origin'.
Switched to a new branch 'armv7l-fix'
❯ make preprocess
curl -L "https://curl.se/download/curl-8.5.0.tar.xz" \
-o "curl-8.5.0.tar.xz"
tar -xf curl-8.5.0.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2596k 100 2596k 0 0 6166k 0 --:--:-- --:--:-- --:--:-- 6181k
curl -L "https://github.com/yifeikong/curl-impersonate/archive/refs/tags/v0.7.0b4.tar.gz" \
-o "curl-impersonate-0.7.0b4.tar.gz"
tar -xf curl-impersonate-0.7.0b4.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 137k 0 137k 0 0 182k 0 --:--:-- --:--:-- --:--:-- 182k
cd curl-8.5.0
for p in curl-impersonate-0.7.0b4/chrome/patches/curl-*.patch; do patch -p1 < ../$p; done
# Re-generate the configure script
autoreconf -fi
mkdir -p ../include/curl
cp -R include/curl/* ../include/curl/
# Sentinel files: https://tech.davis-hansson.com/p/make/
touch .preprocessed
patching file CMakeLists.txt
patching file Makefile.am
patching file configure.ac
patching file curl-config.in
patching file export.sh
patching file include/curl/curl.h
patching file include/curl/easy.h
patching file include/curl/typecheck-gcc.h
patching file lib/Makefile.am
patching file lib/Makefile.inc
patching file lib/curl_config.h.cmake
patching file lib/dynhds.c
patching file lib/dynhds.h
patching file lib/easy.c
patching file lib/easyoptions.c
patching file lib/http.c
patching file lib/http2.c
patching file lib/http2.h
patching file lib/impersonate.c
patching file lib/impersonate.h
patching file lib/multi.c
patching file lib/setopt.c
patching file lib/strerror.c
patching file lib/transfer.c
patching file lib/url.c
patching file lib/urldata.h
patching file lib/vtls/openssl.c
patching file lib/vtls/vtls.c
patching file lib/vtls/vtls.h
patching file lib/vtls/vtls_int.h
patching file libcurl.def
patching file libcurl.pc.in
patching file m4/curl-compilers.m4
can't find file to patch at input line 3566
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/scripts/singleuse.pl b/scripts/singleuse.pl
|index b8a57f8d8..63c0e7a55 100755
|--- a/scripts/singleuse.pl
|+++ b/scripts/singleuse.pl
--------------------------
File to patch:
Skip this patch? [y] y
Skipping patch.
1 out of 1 hunk ignored
patching file src/Makefile.am
patching file src/tool_cfgable.c
patching file src/tool_cfgable.h
patching file src/tool_getparam.c
patching file src/tool_listhelp.c
patching file src/tool_operate.c
patching file src/tool_setopt.c
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
configure.ac:123: installing './compile'
configure.ac:129: installing './missing'
docs/examples/Makefile.am: installing './depcomp'
src/Makefile.am:64: warning: variable 'curl_LDFLAGS' is defined but no program or
src/Makefile.am:64: library has 'curl' as canonical name (possible typo)
generating patched libcurl header files
❯ pip install .
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/Documents/galoev_gpt/tmp/curl_cffi
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [44 lines of output]
Using /tmp/tmpfg_rtnjm to store libcurl-impersonate
Traceback (most recent call last):
File "/home/pi/Documents/galoev_gpt/tmp/.tenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/pi/Documents/galoev_gpt/tmp/.tenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/Documents/galoev_gpt/tmp/.tenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 16, in <module>
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 146, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 307, in __init__
_Distribution.__init__(self, dist_attrs)
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 284, in __init__
self.finalize_options()
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 658, in finalize_options
ep(self)
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 678, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/cffi/setuptools_ext.py", line 216, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "scripts/build.py", line 106, in <module>
ffibuilder = FFI()
^^^^^
File "/tmp/pip-build-env-6uf7pv8y/overlay/lib/python3.11/site-packages/cffi/api.py", line 48, in __init__
import _cffi_backend as backend
ImportError: libffi.so.8: cannot open shared object file: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output. |
Your pip doesn't seem to be pulling the pre-built wheels from the custom index. What python version are you using? |
Oh I think I know the issue here, your pip is preferring to build from source because that's a more recent version than what's available on my index. Try specifying an older version like curl_cffi==0.6.2 |
This helped, the package was installed successfully, thanks @bjia56 ❯ pip install curl_cffi==0.6.2 --extra-index-url https://bjia56.github.io/armv7l-wheels/
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://bjia56.github.io/armv7l-wheels/
Collecting curl_cffi==0.6.2
Downloading https://github.com/bjia56/armv7l-wheels/releases/download/curl_cffi-0.6.2-cpython3.9/curl_cffi-0.6.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.3/5.3 MB 4.6 MB/s eta 0:00:00
Requirement already satisfied: cffi>=1.12.0 in ./.tenv/lib/python3.11/site-packages (from curl_cffi==0.6.2) (1.16.0)
Collecting certifi (from curl_cffi==0.6.2)
Using cached https://www.piwheels.org/simple/certifi/certifi-2024.2.2-py3-none-any.whl (163 kB)
Requirement already satisfied: pycparser in ./.tenv/lib/python3.11/site-packages (from cffi>=1.12.0->curl_cffi==0.6.2) (2.22)
Installing collected packages: certifi, curl_cffi
Successfully installed certifi-2024.2.2 curl_cffi-0.6.2 But now I have another error. When I tried to import the package from code I got this error: >>> import curl_cffi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/Documents/galoev_gpt/tmp/.tenv/lib/python3.11/site-packages/curl_cffi/__init__.py", line 16, in <module>
import _cffi_backend # noqa: F401 # required by _wrapper
^^^^^^^^^^^^^^^^^^^^
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found (required by /home/pi/Documents/galoev_gpt/tmp/.tenv/lib/python3.11/site-packages/_cffi_backend.cpython-311-arm-linux-gnueabihf.so) |
Also, I figured out where to find libffi.so.8 from an old error: wget "https://github.com/libffi/libffi/releases/download/v3.4.6/libffi-3.4.6.tar.gz"
tar zxf libffi-3.4.6.tar.gz
cd libffi-3.4.6
./configure
sudo make install
sudo ldconfig |
The wheel referencing glibc 2.34 is odd, it shouldn't be doing that if it's manylinux2014. I'll check the binary dependencies a bit later |
@Galoev the newest release is now out: The wheels look like they conform with manylinux2014 correctly. However, in your error, glibc 2.34 is referenced by |
GH actions run
Build output from GH actions
This line needs to account for gnueabihf on armv6l and armv7l:
https://github.com/yifeikong/curl_cffi/blob/main/scripts/build.py#L24
For reference on my armv7l builder container:
The text was updated successfully, but these errors were encountered: