msgspec icon indicating copy to clipboard operation
msgspec copied to clipboard

Unable to build from Git

Open clin1234 opened this issue 8 months ago • 1 comments

(venv) cc@pretty:~$ pip install --no-build-isolation -C"--with-cython=" git+https://github.com/jcrist/msgspec
Collecting git+https://github.com/jcrist/msgspec
  Cloning https://github.com/jcrist/msgspec to /tmp/pip-req-build-y5vzjnp3
  Running command git clone --filter=blob:none --quiet https://github.com/jcrist/msgspec /tmp/pip-req-build-y5vzjnp3
  Resolved https://github.com/jcrist/msgspec to commit dd965dce22e5278d4935bea923441ecde31b5325
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: msgspec
  Building wheel for msgspec (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for msgspec (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [56 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/yaml.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/toml.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/structs.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/msgpack.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/json.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/inspect.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/_version.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/_utils.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/_json_schema.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/__init__.py -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/structs.pyi -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/msgpack.pyi -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/json.pyi -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/__init__.pyi -> build/lib.linux-x86_64-cpython-314t/msgspec
      copying msgspec/py.typed -> build/lib.linux-x86_64-cpython-314t/msgspec
      UPDATING build/lib.linux-x86_64-cpython-314t/msgspec/_version.py
      set build/lib.linux-x86_64-cpython-314t/msgspec/_version.py to '0.19.0'
      running build_ext
      building 'msgspec._core' extension
      creating build/temp.linux-x86_64-cpython-314t/msgspec
      gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -O3 -fPIC -I/home/cc/venv/include -I/usr/include/python3.14t -c msgspec/_core.c -o build/temp.linux-x86_64-cpython-314t/msgspec/_core.o
      msgspec/_core.c:2150:5: warning: braces around scalar initializer
       2150 |     { MS_IMMORTAL_INITIAL_REFCNT },
            |     ^
      msgspec/_core.c:2150:5: note: (near initialization for ‘_NoDefault_Object.ob_tid’)
      msgspec/_core.c:2151:5: error: initialization of ‘short unsigned int’ from ‘PyTypeObject *’ {aka ‘struct _typeobject *’} makes integer from pointer without a cast [-Wint-conversion]
       2151 |     &NoDefault_Type
            |     ^
      msgspec/_core.c:2151:5: note: (near initialization for ‘_NoDefault_Object.ob_flags’)
      msgspec/_core.c:2151:5: error: initializer element is not computable at load time
      msgspec/_core.c:2151:5: note: (near initialization for ‘_NoDefault_Object.ob_flags’)
      msgspec/_core.c:2254:5: warning: braces around scalar initializer
       2254 |     { MS_IMMORTAL_INITIAL_REFCNT },
            |     ^
      msgspec/_core.c:2254:5: note: (near initialization for ‘_Unset_Object.ob_tid’)
      msgspec/_core.c:2255:5: error: initialization of ‘short unsigned int’ from ‘PyTypeObject *’ {aka ‘struct _typeobject *’} makes integer from pointer without a cast [-Wint-conversion]
       2255 |     &Unset_Type
            |     ^
      msgspec/_core.c:2255:5: note: (near initialization for ‘_Unset_Object.ob_flags’)
      msgspec/_core.c:2255:5: error: initializer element is not computable at load time
      msgspec/_core.c:2255:5: note: (near initialization for ‘_Unset_Object.ob_flags’)
      msgspec/_core.c: In function ‘ms_passes_big_int_constraints’:
      msgspec/_core.c:9795:5: warning: ‘_PyLong_Sign’ is deprecated [-Wdeprecated-declarations]
       9795 |     bool neg = _PyLong_Sign(obj) < 0;
            |     ^~~~
      In file included from /usr/include/python3.14t/longobject.h:119,
                       from /usr/include/python3.14t/Python.h:83,
                       from msgspec/_core.c:9:
      /usr/include/python3.14t/cpython/longobject.h:89:37: note: declared here
         89 | Py_DEPRECATED(3.14) PyAPI_FUNC(int) _PyLong_Sign(PyObject *v);
            |                                     ^~~~~~~~~~~~
      error: command '/opt/gcc-latest/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 msgspec

clin1234 avatar Mar 10 '25 18:03 clin1234