You are not logged in.
Hello everyone!
I'm trying to create an Arch Linux package from the awscrt Python module: https://pypi.org/project/awscrt/
I'm trying to do that since I was not able to find this package in AUR and it is not recommended to use pip on Arch to manage Python modules. I need this package in order to build aws-cli-v2.
Here's the PKGBUILD:
pkgname=python-awscrt
_libname=awscrt
pkgver=0.13.11
pkgrel=1
pkgdesc='Python 3 bindings for the AWS Common Runtime'
arch=('any')
url='https://awslabs.github.io/aws-crt-python/'
license=('Apache')
depends=('python-pip')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_libname:0:1}/${_libname}/${_libname}-${pkgver}.tar.gz")
sha256sums=('631dc8dd10f9ecdc7a0af9b89a8739ce631b76c1de6223208437db414a2bdfc1')
build() {
cd "$srcdir/$_libname-$pkgver"
python setup.py build
}
package() {
cd "$srcdir/$_libname-$pkgver"
python setup.py install --root="$pkgdir" --optimize=1
}
The link to the tar.gz archive of the awscrt: https://files.pythonhosted.org/packages … .11.tar.gz
I'm getting the following error after running makepkg:
[ 99%] Building ASM object crypto/CMakeFiles/crypto.dir/hrss/asm/poly_rq_mul.S.o
In file included from /usr/include/string.h:535,
from /home/username/python/test/src/awscrt-0.13.11/crt/aws-lc/crypto/x509v3/v3_utl.c:63:
In function ‘memset’,
inlined from ‘OPENSSL_memset’ at /home/username/python/test/src/awscrt-0.13.11/crt/aws-lc/crypto/x509v3/../internal.h:841:10,
inlined from ‘ipv6_from_asc’ at /home/username/python/test/src/awscrt-0.13.11/crt/aws-lc/crypto/x509v3/v3_utl.c:1281:9:
/usr/include/bits/string_fortified.h:59:10: error: ‘__builtin_memset’ may write between 16 and 2147483647 bytes into a region of size 15 [-Werror=stringop-overflow=]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/username/python/test/src/awscrt-0.13.11/crt/aws-lc/crypto/x509v3/v3_utl.c: In function ‘ipv6_from_asc’:
/home/username/python/test/src/awscrt-0.13.11/crt/aws-lc/crypto/x509v3/v3_utl.c:1229:40: note: at offset [1, 16] into destination object ‘v6’ of size [0, 16]
1229 | static int ipv6_from_asc(unsigned char v6[16], const char *in)
| ~~~~~~~~~~~~~~^~~~~~
cc1: all warnings being treated as errors
make[2]: *** [crypto/CMakeFiles/crypto.dir/build.make:3128: crypto/CMakeFiles/crypto.dir/x509v3/v3_utl.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:179: crypto/CMakeFiles/crypto.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Traceback (most recent call last):
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 326, in <module>
setuptools.setup(
File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 249, in run
self._build_dependency(lib, dep_build_dir, dep_install_path)
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 242, in _build_dependency
self._build_dependency_impl(aws_lib, build_dir, install_path)
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 205, in _build_dependency_impl
run_cmd(build_cmd)
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 29, in run_cmd
subprocess.check_call(args)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/cmake', '--build', 'build/temp.linux-x86_64-3.10/deps/aws-lc', '--config', 'RelWithDebInfo', '--target', 'install']' returned non-zero exit status 2.
==> ERROR: A failure occurred in build().
Aborting...
Previously I got different error which I tried to get rid off by adding -Wno-array-bounds CFLAGS in /etc/makepkg.conf.
[ 99%] Building ASM object crypto/CMakeFiles/crypto.dir/hrss/asm/poly_rq_mul.S.o
In file included from /usr/include/string.h:535,
from /home/username/python/test/src/awscrt-0.13.11/crt/aws-lc/crypto/x509v3/v3_utl.c:63:
In function ‘memset’,
inlined from ‘OPENSSL_memset’ at /home/username/python/test/src/awscrt-0.13.11/crt/aws-lc/crypto/x509v3/../internal.h:841:10,
inlined from ‘ipv6_from_asc’ at /home/username/python/test/src/awscrt-0.13.11/crt/aws-lc/crypto/x509v3/v3_utl.c:1281:9:
/usr/include/bits/string_fortified.h:59:10: error: ‘__builtin_memset’ forming offset 16 is out of the bounds [0, 16] [-Werror=array-bounds]
59 | return __builtin___memset_chk (__dest, __ch, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [crypto/CMakeFiles/crypto.dir/build.make:3128: crypto/CMakeFiles/crypto.dir/x509v3/v3_utl.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:179: crypto/CMakeFiles/crypto.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Traceback (most recent call last):
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 326, in <module>
setuptools.setup(
File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 249, in run
self._build_dependency(lib, dep_build_dir, dep_install_path)
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 242, in _build_dependency
self._build_dependency_impl(aws_lib, build_dir, install_path)
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 205, in _build_dependency_impl
run_cmd(build_cmd)
File "/home/username/python/test/src/awscrt-0.13.11/setup.py", line 29, in run_cmd
subprocess.check_call(args)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/cmake', '--build', 'build/temp.linux-x86_64-3.10/deps/aws-lc', '--config', 'RelWithDebInfo', '--target', 'install']' returned non-zero exit status 2.
==> ERROR: A failure occurred in build().
Aborting...
I would be grateful for any help how it is possible to build awscrt package on Arch, or, probably, it is possible to install it from another source. Or there's another solution to have the aws-cli-v2 ready to use. Thanks!
Last edited by Jaga (2022-06-06 11:18:37)
Offline
Did you check the comments on the aur page for aws-cli-v2 ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
That's something that I should've checked prior trying to build awscrt
Thanks for the hint. Installed aws-cli-v2-bin and it works fine. At least I know how to create PKGBUILDs now.
Offline