LoongArch64 build error: invalid argument of ‘model’ attribute #561

Closed
opened 2026-01-29 20:45:51 +00:00 by claunia · 2 comments
Owner

Originally created by @wojiushixiaobai on GitHub (Nov 6, 2025).

Building wheel...
  
      + rm -rf /tmp/cibuildwheel/built_wheel
      + mkdir -p /tmp/cibuildwheel/built_wheel
      + python -m build /project/src/brotli --wheel --outdir=/tmp/cibuildwheel/built_wheel
  * Creating isolated environment: venv+pip...
  * Installing packages in isolated environment:
    - pkgconfig
    - setuptools
  * Getting build dependencies for wheel...
  running egg_info
  creating python/brotli.egg-info
  writing python/brotli.egg-info/PKG-INFO
  writing dependency_links to python/brotli.egg-info/dependency_links.txt
  writing top-level names to python/brotli.egg-info/top_level.txt
  writing manifest file 'python/brotli.egg-info/SOURCES.txt'
  reading manifest file 'python/brotli.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  /tmp/build-env-fs6oehd2/lib/python3.8/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
    warnings.warn(msg)
  warning: no files found matching 'python/_brotli.cc'
  adding license file 'LICENSE'
  writing manifest file 'python/brotli.egg-info/SOURCES.txt'
  * Building wheel...
  running bdist_wheel
  running build
  running build_py
  creating bin/lib.linux-loongarch64-cpython-38
  copying python/brotli.py -> bin/lib.linux-loongarch64-cpython-38
  running build_ext
  building '_brotli' extension
  creating bin/temp.linux-loongarch64-cpython-38/python
  creating bin/temp.linux-loongarch64-cpython-38/c/common
  creating bin/temp.linux-loongarch64-cpython-38/c/dec
  creating bin/temp.linux-loongarch64-cpython-38/c/enc
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ic/include -I/tmp/build-env-fs6oehd2/include -I/opt/_internal/cpython-3.8.20/include/python3.8 -c python/_brotli.c -o bin/temp.linux-loongarch64-cpython-38/python/_brotli.o
  python/_brotli.c: In function ‘Buffer_Finish’:
  python/_brotli.c:357:7: warning: pointer targets in assignment from ‘char *’ to ‘uint8_t *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
    357 |   out = PyBytes_AS_STRING(result);
        |       ^
  python/_brotli.c: In function ‘brotli_Decompressor_process’:
  python/_brotli.c:723:34: warning: comparison of integer expressions of different signedness: ‘uint64_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare]
    723 |       if (buffer.total_allocated >= output_buffer_limit) break;
        |                                  ^~
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ic/include -I/tmp/build-env-fs6oehd2/include -I/opt/_internal/cpython-3.8.20/include/python3.8 -c c/common/constants.c -o bin/temp.linux-loongarch64-cpython-38/c/common/constants.o
  In file included from c/common/constants.c:7:
  c/common/constants.h:196:23: error: invalid argument of ‘model’ attribute
    196 | BrotliPrefixCodeRange _kBrotliPrefixCodeRanges[BROTLI_NUM_BLOCK_LEN_SYMBOLS];
        |                       ^~~~~~~~~~~~~~~~~~~~~~~~
  c/common/constants.c:10:23: error: invalid argument of ‘model’ attribute
     10 | BrotliPrefixCodeRange _kBrotliPrefixCodeRanges[BROTLI_NUM_BLOCK_LEN_SYMBOLS] = {
        |                       ^~~~~~~~~~~~~~~~~~~~~~~~
  /tmp/build-env-fs6oehd2/lib/python3.8/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
    warnings.warn(msg)
  <string>:82: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
  error: command '/opt/rh/gcc-toolset-14/root/usr/bin/gcc' failed with exit code 1
  
  ERROR Backend subprocess exited when trying to invoke build_wheel
                                                             ✕ 23.54s
Error: cibuildwheel: Command ['python', '-m', 'build', PurePosixPath('/project/src/brotli'), '--wheel', '--outdir=/tmp/cibuildwheel/built_wheel'] failed with code 1. 

Error: Process completed with exit code 1.
Originally created by @wojiushixiaobai on GitHub (Nov 6, 2025). - https://github.com/loong64/pypi/actions/runs/19145628754/job/54722363144 ```sh Building wheel... + rm -rf /tmp/cibuildwheel/built_wheel + mkdir -p /tmp/cibuildwheel/built_wheel + python -m build /project/src/brotli --wheel --outdir=/tmp/cibuildwheel/built_wheel * Creating isolated environment: venv+pip... * Installing packages in isolated environment: - pkgconfig - setuptools * Getting build dependencies for wheel... running egg_info creating python/brotli.egg-info writing python/brotli.egg-info/PKG-INFO writing dependency_links to python/brotli.egg-info/dependency_links.txt writing top-level names to python/brotli.egg-info/top_level.txt writing manifest file 'python/brotli.egg-info/SOURCES.txt' reading manifest file 'python/brotli.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' /tmp/build-env-fs6oehd2/lib/python3.8/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite' warnings.warn(msg) warning: no files found matching 'python/_brotli.cc' adding license file 'LICENSE' writing manifest file 'python/brotli.egg-info/SOURCES.txt' * Building wheel... running bdist_wheel running build running build_py creating bin/lib.linux-loongarch64-cpython-38 copying python/brotli.py -> bin/lib.linux-loongarch64-cpython-38 running build_ext building '_brotli' extension creating bin/temp.linux-loongarch64-cpython-38/python creating bin/temp.linux-loongarch64-cpython-38/c/common creating bin/temp.linux-loongarch64-cpython-38/c/dec creating bin/temp.linux-loongarch64-cpython-38/c/enc gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ic/include -I/tmp/build-env-fs6oehd2/include -I/opt/_internal/cpython-3.8.20/include/python3.8 -c python/_brotli.c -o bin/temp.linux-loongarch64-cpython-38/python/_brotli.o python/_brotli.c: In function ‘Buffer_Finish’: python/_brotli.c:357:7: warning: pointer targets in assignment from ‘char *’ to ‘uint8_t *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign] 357 | out = PyBytes_AS_STRING(result); | ^ python/_brotli.c: In function ‘brotli_Decompressor_process’: python/_brotli.c:723:34: warning: comparison of integer expressions of different signedness: ‘uint64_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare] 723 | if (buffer.total_allocated >= output_buffer_limit) break; | ^~ gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ic/include -I/tmp/build-env-fs6oehd2/include -I/opt/_internal/cpython-3.8.20/include/python3.8 -c c/common/constants.c -o bin/temp.linux-loongarch64-cpython-38/c/common/constants.o In file included from c/common/constants.c:7: c/common/constants.h:196:23: error: invalid argument of ‘model’ attribute 196 | BrotliPrefixCodeRange _kBrotliPrefixCodeRanges[BROTLI_NUM_BLOCK_LEN_SYMBOLS]; | ^~~~~~~~~~~~~~~~~~~~~~~~ c/common/constants.c:10:23: error: invalid argument of ‘model’ attribute 10 | BrotliPrefixCodeRange _kBrotliPrefixCodeRanges[BROTLI_NUM_BLOCK_LEN_SYMBOLS] = { | ^~~~~~~~~~~~~~~~~~~~~~~~ /tmp/build-env-fs6oehd2/lib/python3.8/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite' warnings.warn(msg) <string>:82: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead. error: command '/opt/rh/gcc-toolset-14/root/usr/bin/gcc' failed with exit code 1 ERROR Backend subprocess exited when trying to invoke build_wheel ✕ 23.54s Error: cibuildwheel: Command ['python', '-m', 'build', PurePosixPath('/project/src/brotli'), '--wheel', '--outdir=/tmp/cibuildwheel/built_wheel'] failed with code 1. Error: Process completed with exit code 1. ```
Author
Owner

@eustas commented on GitHub (Nov 6, 2025):

Fixed after 1.2.0. I plan releasing 1.2.1 soonish...

@eustas commented on GitHub (Nov 6, 2025): Fixed after 1.2.0. I plan releasing 1.2.1 soonish...
Author
Owner

@wojiushixiaobai commented on GitHub (Nov 6, 2025):

Fixed after 1.2.0. I plan releasing 1.2.1 soonish...

Thanks, the patch e230f474b8 works .

@wojiushixiaobai commented on GitHub (Nov 6, 2025): > Fixed after 1.2.0. I plan releasing 1.2.1 soonish... Thanks, the patch https://github.com/google/brotli/commit/e230f474b87134e8c6c85b630084c612057f253e works .
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#561