Skip to content

Installing datrie fails with gcc14 #101

Open
@vandalt

Description

@vandalt

Installation fails with gcc14 on Archlinux, it seems #99 fixes the issue, but I wanted to open an issue just in case others encountered the issue.

  error: subprocess-exited-with-error
  
  × Building wheel for datrie (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [75 lines of output]
      running bdist_wheel
      running build
      running build_clib
      building 'datrie' library
      creating build
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/libdatrie
      creating build/temp.linux-x86_64-cpython-312/libdatrie/datrie
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ilibdatrie -c libdatrie/datrie/alpha-map.c -o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/alpha-map.o
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ilibdatrie -c libdatrie/datrie/darray.c -o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/darray.o
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ilibdatrie -c libdatrie/datrie/dstring.c -o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/dstring.o
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ilibdatrie -c libdatrie/datrie/fileutils.c -o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/fileutils.o
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ilibdatrie -c libdatrie/datrie/tail.c -o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/tail.o
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ilibdatrie -c libdatrie/datrie/trie-string.c -o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/trie-string.o
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ilibdatrie -c libdatrie/datrie/trie.c -o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/trie.o
      ar rcs build/temp.linux-x86_64-cpython-312/libdatrie.a build/temp.linux-x86_64-cpython-312/libdatrie/datrie/alpha-map.o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/darray.o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/dstring.o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/fileutils.o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/tail.o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/trie-string.o build/temp.linux-x86_64-cpython-312/libdatrie/datrie/trie.o
      running build_ext
      building 'datrie' extension
      creating build/temp.linux-x86_64-cpython-312/src
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -Ilibdatrie -I/home/vandal/repos/learning/showyourwork-learn/venv/include -I/usr/include/python3.12 -c src/datrie.c -o build/temp.linux-x86_64-cpython-312/src/datrie.o
      src/datrie.c: In function ‘__pyx_pf_6datrie_8BaseTrie___init__’:
      src/datrie.c:5673:53: error: passing argument 1 of ‘trie_new’ from incompatible pointer type [-Wincompatible-pointer-types]
       5673 |   __pyx_v_self->_c_trie = trie_new(__pyx_v_alpha_map->_c_alpha_map);
            |                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
            |                                                     |
            |                                                     struct AlphaMap *
      In file included from src/datrie.c:1248:
      src/../libdatrie/datrie/trie.h:120:35: note: expected ‘const AlphaMap *’ {aka ‘const struct _AlphaMap *’} but argument is of type ‘struct AlphaMap *’
        120 | Trie *  trie_new (const AlphaMap *alpha_map);
            |                   ~~~~~~~~~~~~~~~~^~~~~~~~~
      src/datrie.c: In function ‘__pyx_pf_6datrie_8BaseTrie_6clear’:
      src/datrie.c:6351:47: error: passing argument 1 of ‘trie_new’ from incompatible pointer type [-Wincompatible-pointer-types]
       6351 |   __pyx_v__c_trie = trie_new(__pyx_v_alpha_map->_c_alpha_map);
            |                              ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
            |                                               |
            |                                               struct AlphaMap *
      src/../libdatrie/datrie/trie.h:120:35: note: expected ‘const AlphaMap *’ {aka ‘const struct _AlphaMap *’} but argument is of type ‘struct AlphaMap *’
        120 | Trie *  trie_new (const AlphaMap *alpha_map);
            |                   ~~~~~~~~~~~~~~~~^~~~~~~~~
      src/datrie.c: In function ‘__pyx_pf_6datrie_8AlphaMap___cinit__’:
      src/datrie.c:27404:30: error: assignment to ‘struct AlphaMap *’ from incompatible pointer type ‘AlphaMap *’ {aka ‘struct _AlphaMap *’} [-Wincompatible-pointer-types]
      27404 |   __pyx_v_self->_c_alpha_map = alpha_map_new();
            |                              ^
      src/datrie.c: In function ‘__pyx_pf_6datrie_8AlphaMap_2__dealloc__’:
      src/datrie.c:27460:32: error: passing argument 1 of ‘alpha_map_free’ from incompatible pointer type [-Wincompatible-pointer-types]
      27460 |     alpha_map_free(__pyx_v_self->_c_alpha_map);
            |                    ~~~~~~~~~~~~^~~~~~~~~~~~~~
            |                                |
            |                                struct AlphaMap *
      In file included from src/datrie.c:1247:
      src/../libdatrie/datrie/alpha-map.h:72:39: note: expected ‘AlphaMap *’ {aka ‘struct _AlphaMap *’} but argument is of type ‘struct AlphaMap *’
         72 | void        alpha_map_free (AlphaMap *alpha_map);
            |                             ~~~~~~~~~~^~~~~~~~~
      src/datrie.c: In function ‘__pyx_f_6datrie_8AlphaMap_copy’:
      src/datrie.c:27875:61: error: passing argument 1 of ‘alpha_map_clone’ from incompatible pointer type [-Wincompatible-pointer-types]
      27875 |   __pyx_v_clone->_c_alpha_map = alpha_map_clone(__pyx_v_self->_c_alpha_map);
            |                                                 ~~~~~~~~~~~~^~~~~~~~~~~~~~
            |                                                             |
            |                                                             struct AlphaMap *
      src/../libdatrie/datrie/alpha-map.h:70:46: note: expected ‘const AlphaMap *’ {aka ‘const struct _AlphaMap *’} but argument is of type ‘struct AlphaMap *’
         70 | AlphaMap *  alpha_map_clone (const AlphaMap *a_map);
            |                              ~~~~~~~~~~~~~~~~^~~~~
      src/datrie.c:27875:31: error: assignment to ‘struct AlphaMap *’ from incompatible pointer type ‘AlphaMap *’ {aka ‘struct _AlphaMap *’} [-Wincompatible-pointer-types]
      27875 |   __pyx_v_clone->_c_alpha_map = alpha_map_clone(__pyx_v_self->_c_alpha_map);
            |                               ^
      src/datrie.c: In function ‘__pyx_f_6datrie_8AlphaMap__add_range’:
      src/datrie.c:28566:50: error: passing argument 1 of ‘alpha_map_add_range’ from incompatible pointer type [-Wincompatible-pointer-types]
      28566 |   __pyx_v_code = alpha_map_add_range(__pyx_v_self->_c_alpha_map, __pyx_v_begin, __pyx_v_end);
            |                                      ~~~~~~~~~~~~^~~~~~~~~~~~~~
            |                                                  |
            |                                                  struct AlphaMap *
      src/../libdatrie/datrie/alpha-map.h:74:45: note: expected ‘AlphaMap *’ {aka ‘struct _AlphaMap *’} but argument is of type ‘struct AlphaMap *’
         74 | int         alpha_map_add_range (AlphaMap  *alpha_map,
            |                                  ~~~~~~~~~~~^~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for datrie
Failed to build datrie
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (datrie)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions