Skip to content
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

pip install fails on python 3.12 #16

Closed
dbirman opened this issue Sep 3, 2024 · 5 comments · Fixed by #14
Closed

pip install fails on python 3.12 #16

dbirman opened this issue Sep 3, 2024 · 5 comments · Fixed by #14

Comments

@dbirman
Copy link
Member

dbirman commented Sep 3, 2024

I don't think anybody requires 3.12 but just flagging this. This is on MacOS Sonoma, pip install proceeds more or less correctly on Python 3.10

      building 'wavpack_numcodecs.wavpack' extension
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -Iwavpack_numcodecs/include -I/Users/daniel.birman/proj/zombie/.venv/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c wavpack_numcodecs/wavpack.c -o build/temp.macosx-10.9-universal2-cpython-312/wavpack_numcodecs/wavpack.o
      In file included from wavpack_numcodecs/wavpack.c:778:
      wavpack_numcodecs/src/decoder.c:37:31: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
                  if (bytes_to_copy > bcount)
                      ~~~~~~~~~~~~~ ^ ~~~~~~
      wavpack_numcodecs/src/decoder.c:106:9: warning: 'BUFFER_SAMPLES' macro redefined [-Wmacro-redefined]
      #define BUFFER_SAMPLES 3750
              ^
      wavpack_numcodecs/src/encoder.c:47:9: note: previous definition is here
      #define BUFFER_SAMPLES 256
              ^
      wavpack_numcodecs/wavpack.c:2304:42: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
        __pyx_t_14 = ((__pyx_v_compressed_size == -1L) != 0);
                       ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      wavpack_numcodecs/wavpack.c:2614:150: warning: variable '__pyx_v_dest_ptr' is uninitialized when used here [-Wuninitialized]
        __pyx_t_2 = __Pyx_PyInt_FromSize_t(WavpackDecodeFile(__pyx_v_source_ptr, __pyx_v_source_size, __pyx_v_num_chans_ptr, __pyx_v_bytes_per_sample_ptr, __pyx_v_dest_ptr, 0, __pyx_v_num_threads_c)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
                                                                                                                                                           ^~~~~~~~~~~~~~~~
      wavpack_numcodecs/wavpack.c:2478:25: note: initialize the variable '__pyx_v_dest_ptr' to silence this warning
        char *__pyx_v_dest_ptr;
                              ^
                               = NULL
      wavpack_numcodecs/wavpack.c:3222:17: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
        if (unlikely(!Py_OptimizeFlag)) {
                      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
      Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      wavpack_numcodecs/wavpack.c:3420:19: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
          if (unlikely(!Py_OptimizeFlag)) {
                        ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
      Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      wavpack_numcodecs/wavpack.c:3519:19: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
          if (unlikely(!Py_OptimizeFlag)) {
                        ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
      Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      wavpack_numcodecs/wavpack.c:4151:17: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
        if (unlikely(!Py_OptimizeFlag)) {
                      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
      Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      wavpack_numcodecs/wavpack.c:7327:13: warning: code will never be executed [-Wunreachable-code]
                  goto bad;
                  ^~~~~~~~
      9 warnings generated.
      In file included from wavpack_numcodecs/wavpack.c:778:
      wavpack_numcodecs/src/decoder.c:37:31: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
                  if (bytes_to_copy > bcount)
                      ~~~~~~~~~~~~~ ^ ~~~~~~
      wavpack_numcodecs/src/decoder.c:106:9: warning: 'BUFFER_SAMPLES' macro redefined [-Wmacro-redefined]
      #define BUFFER_SAMPLES 3750
              ^
      wavpack_numcodecs/src/encoder.c:47:9: note: previous definition is here
      #define BUFFER_SAMPLES 256
              ^
      wavpack_numcodecs/wavpack.c:2304:42: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
        __pyx_t_14 = ((__pyx_v_compressed_size == -1L) != 0);
                       ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      wavpack_numcodecs/wavpack.c:2614:150: warning: variable '__pyx_v_dest_ptr' is uninitialized when used here [-Wuninitialized]
        __pyx_t_2 = __Pyx_PyInt_FromSize_t(WavpackDecodeFile(__pyx_v_source_ptr, __pyx_v_source_size, __pyx_v_num_chans_ptr, __pyx_v_bytes_per_sample_ptr, __pyx_v_dest_ptr, 0, __pyx_v_num_threads_c)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
                                                                                                                                                           ^~~~~~~~~~~~~~~~
      wavpack_numcodecs/wavpack.c:2478:25: note: initialize the variable '__pyx_v_dest_ptr' to silence this warning
        char *__pyx_v_dest_ptr;
                              ^
                               = NULL
      wavpack_numcodecs/wavpack.c:3222:17: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
        if (unlikely(!Py_OptimizeFlag)) {
                      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
      Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      wavpack_numcodecs/wavpack.c:3420:19: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
          if (unlikely(!Py_OptimizeFlag)) {
                        ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
      Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      wavpack_numcodecs/wavpack.c:3519:19: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
          if (unlikely(!Py_OptimizeFlag)) {
                        ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
      Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      wavpack_numcodecs/wavpack.c:4151:17: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
        if (unlikely(!Py_OptimizeFlag)) {
                      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
      Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
      ^
      /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      wavpack_numcodecs/wavpack.c:7327:13: warning: code will never be executed [-Wunreachable-code]
                  goto bad;
                  ^~~~~~~~
      9 warnings generated.
      clang -bundle -undefined dynamic_lookup -arch arm64 -arch x86_64 -g build/temp.macosx-10.9-universal2-cpython-312/wavpack_numcodecs/wavpack.o -Wl,-rpath,/opt/homebrew/lib/ -lwavpack -o build/lib.macosx-10.9-universal2-cpython-312/wavpack_numcodecs/wavpack.cpython-312-darwin.so -L~/include/ -L/usr/local/include/ -L/usr/include
      ld: warning: search path '~/include/' not found
      ld: library 'wavpack' not found
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command '/usr/bin/clang' 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 wavpack-numcodecs
@alejoe91 alejoe91 mentioned this issue Sep 4, 2024
@alejoe91
Copy link
Collaborator

alejoe91 commented Sep 4, 2024

@dbirman I was able to reproduce the issue and I think it was coming from an update in the macos clang linking.

Anyways, should be fixed in this PR: #14
Can you test the installation from that branch?

@dyf I took the chance and gave the package a fresh look and also upgraded the WavPack version :)

@dbirman
Copy link
Member Author

dbirman commented Sep 4, 2024

Anyways, should be fixed in this PR: #14 Can you test the installation from that branch?

Will do!

@alejoe91
Copy link
Collaborator

alejoe91 commented Sep 6, 2024

@dbirman did you get the chance to test this out on a real mac? :)

@dbirman
Copy link
Member Author

dbirman commented Sep 6, 2024

I'm out sick right now, next time I'm in office I'll have an update for you!

@dbirman
Copy link
Member Author

dbirman commented Sep 15, 2024

@alejoe91 just tested this, working for me now!

@dbirman dbirman closed this as completed Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants