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

Building fails on macOS 15.1 arm64 : unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked) #127

Open
paris-ci opened this issue Dec 1, 2024 · 6 comments
Assignees

Comments

@paris-ci
Copy link

paris-ci commented Dec 1, 2024

Your system information

  • Operating system used: macOS 15.1.1 (24B91)
  • PyKCS11 version: pykcs11-1.5.17
  • Python version: Python 3.12.7 (installed with pyenv)
  • PKCS#11 library used: Not sure... How can I know that?

Please describe your issue in as much detail as possible:

I am trying to install endesive, a pip package that depends on PyKCS11. Unfortunately, installing PyKCS11 fails on my machine. I'd hope for that to work :)

pip install pykcs11 when the installation fails

❯ python3 -m pip install pykcs11
Collecting pykcs11
  Using cached pykcs11-1.5.17.tar.gz (82 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pykcs11
  Building wheel for pykcs11 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pykcs11 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      building 'PyKCS11._LowLevel' extension
      swigging src/pykcs11.i to src/pykcs11_wrap.cpp
      swig -python -c++ -o src/pykcs11_wrap.cpp src/pykcs11.i
      creating build/temp.macosx-15.1-arm64-cpython-312/src
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/ck_attribute_smart.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/ck_attribute_smart.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang /usr/bin/cc -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/dyn_unix.c -o build/temp.macosx-15.1-arm64-cpython-312/src/dyn_unix.o
      clang: warning: /usr/bin/cc: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/pkcs11lib.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/pkcs11lib.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/pykcs11.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/pykcs11_wrap.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11_wrap.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/pykcs11string.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11string.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/utility.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/utility.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      creating build/lib.macosx-15.1-arm64-cpython-312/PyKCS11
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include /usr/bin/c++ -bundle -undefined dynamic_lookup -L/opt/homebrew/opt/ncurses/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/arthur/.pyenv/versions/3.12.7/lib -Wl,-rpath,/Users/arthur/.pyenv/versions/3.12.7/lib -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -L/opt/homebrew/opt/ncurses/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/arthur/.pyenv/versions/3.12.7/lib -Wl,-rpath,/Users/arthur/.pyenv/versions/3.12.7/lib -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -L/opt/homebrew/opt/postgresql@16/lib -I/opt/homebrew/opt/postgresql@16/include build/temp.macosx-15.1-arm64-cpython-312/src/ck_attribute_smart.o build/temp.macosx-15.1-arm64-cpython-312/src/dyn_unix.o build/temp.macosx-15.1-arm64-cpython-312/src/pkcs11lib.o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11.o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11_wrap.o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11string.o build/temp.macosx-15.1-arm64-cpython-312/src/utility.o -L/usr/local/lib -L/Users/arthur/.pyenv/versions/3.12.7/lib -o build/lib.macosx-15.1-arm64-cpython-312/PyKCS11/_LowLevel.cpython-312-darwin.so
      ld: warning: duplicate -rpath '/Users/arthur/.pyenv/versions/3.12.7/lib' ignored
      ld: warning: duplicate -rpath '/opt/homebrew/lib' ignored
      ld: multiple errors: unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked) in '/usr/bin/c++'; unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked) in '/usr/bin/c++'
      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 pykcs11
Failed to build pykcs11
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pykcs11)

Steps for reproducing this issue:

  1. Install macOS 15.1.1 (Used to work before)
  2. Install pyenv with brew
  3. Install Python 3.12.7
  4. Run pyenv global 3.12.7
  5. Try to install python3 -m pip install pykcs11
@LudovicRousseau LudovicRousseau self-assigned this Dec 1, 2024
@LudovicRousseau
Copy link
Owner

ld: multiple errors: unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked) in '/usr/bin/c++'; unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked) in '/usr/bin/c++'

I have no idea what that is.
Maybe see softhsm/SoftHSMv2#355

I do not yet use macOS 15.x.

@LudovicRousseau
Copy link
Owner

I tried on a MacBook Pro M1 (arm64) with Sequoia 15.1.1 and I have no issue.

% pip3 install pykcs11
Defaulting to user installation because normal site-packages is not writeable
Collecting pykcs11
  Downloading pykcs11-1.5.17.tar.gz (82 kB)
     |████████████████████████████████| 82 kB 182 kB/s 
  WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /private/var/folders/__/v17hbpl16vqdkgys203_qj480000gn/T/pip-build-env-s1vz6_oc/normal/lib/python3.9/site-packages
  sysconfig: /Library/Python/3.9/site-packages
  WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /private/var/folders/__/v17hbpl16vqdkgys203_qj480000gn/T/pip-build-env-s1vz6_oc/normal/lib/python3.9/site-packages
  sysconfig: /Library/Python/3.9/site-packages
  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = '/private/var/folders/__/v17hbpl16vqdkgys203_qj480000gn/T/pip-build-env-s1vz6_oc/normal'
  WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /private/var/folders/__/v17hbpl16vqdkgys203_qj480000gn/T/pip-build-env-s1vz6_oc/overlay/lib/python3.9/site-packages
  sysconfig: /Library/Python/3.9/site-packages
  WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /private/var/folders/__/v17hbpl16vqdkgys203_qj480000gn/T/pip-build-env-s1vz6_oc/overlay/lib/python3.9/site-packages
  sysconfig: /Library/Python/3.9/site-packages
  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = '/private/var/folders/__/v17hbpl16vqdkgys203_qj480000gn/T/pip-build-env-s1vz6_oc/overlay'
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pykcs11
  Building wheel for pykcs11 (PEP 517) ... done
  Created wheel for pykcs11: filename=PyKCS11-1.5.17-cp39-cp39-macosx_10_9_universal2.whl size=380264 sha256=3ce992dbb9b6ce4e775dc1dd0c96271503d2c3e00ed618682a0c2f3fe2a766b5
  Stored in directory: /Users/lroussea/Library/Caches/pip/wheels/0e/62/54/7668f7244632c7303619d52838a72b8d6b4ead603209d4e2f6
Successfully built pykcs11
Installing collected packages: pykcs11
Successfully installed pykcs11-1.5.17
WARNING: You are using pip version 21.2.4; however, version 24.3.1 is available.
You should consider upgrading via the '/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip' command.

It looks like a problem on your side.

@paris-ci
Copy link
Author

paris-ci commented Dec 3, 2024

Thanks for trying...

I have no idea what the problem could be. I've recently clean-installed my macos, and took the opportunity to update.

I tried with python 3.9 and managed to build the wheel, maybe it's an issue with pyenv? python 3.12...

❯ python3.9 -m pip install pykcs11
Collecting pykcs11
  Downloading pykcs11-1.5.17.tar.gz (82 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.7/82.7 kB 3.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pykcs11
  Building wheel for pykcs11 (pyproject.toml) ... done
  Created wheel for pykcs11: filename=PyKCS11-1.5.17-cp39-cp39-macosx_15_0_arm64.whl size=191416 sha256=1909c988891b238019546483cd83f733d7670435e65c37106fa5ad027b1bd567
  Stored in directory: /Users/arthur/Library/Caches/pip/wheels/0e/62/54/7668f7244632c7303619d52838a72b8d6b4ead603209d4e2f6
Successfully built pykcs11
Installing collected packages: pykcs11
Successfully installed pykcs11-1.5.17

[notice] A new release of pip is available: 23.0.1 -> 24.3.1
[notice] To update, run: pip install --upgrade pip

@paris-ci
Copy link
Author

paris-ci commented Dec 3, 2024

Yup, it's python 3.12 that's causing the error...

❯ pyenv install 3.10 3.11
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.10.15.tar.xz...
-> https://www.python.org/ftp/python/3.10.15/Python-3.10.15.tar.xz
Installing Python-3.10.15...
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.10.15 to /Users/arthur/.pyenv/versions/3.10.15
python-build: use openssl@3 from homebrew
python-build: use readline from homebrew
Downloading Python-3.11.10.tar.xz...
-> https://www.python.org/ftp/python/3.11.10/Python-3.11.10.tar.xz
Installing Python-3.11.10...
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.11.10 to /Users/arthur/.pyenv/versions/3.11.10

    ~                                                                                                                                                                           took 3m 30s   at 17:36:23 
❯ pyenv global 3.12 3.11 3.10

    ~                                                                                                                                                                                           at 17:47:07 
❯ python3.10 -m pip install pykcs11
Collecting pykcs11
  Using cached pykcs11-1.5.17.tar.gz (82 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pykcs11
  Building wheel for pykcs11 (pyproject.toml) ... done
  Created wheel for pykcs11: filename=PyKCS11-1.5.17-cp310-cp310-macosx_15_0_arm64.whl size=191410 sha256=26cd645dc61cc9a6223921dcfc44f0d985aabf97b91532ae5fc2774a042acad3
  Stored in directory: /Users/arthur/Library/Caches/pip/wheels/5e/32/71/96a68e781d506639d9e69eb26481748d01b0e1d0101b59f306
Successfully built pykcs11
Installing collected packages: pykcs11
Successfully installed pykcs11-1.5.17

[notice] A new release of pip is available: 23.0.1 -> 24.3.1
[notice] To update, run: pip install --upgrade pip

    ~                                                                                                                                                                               took 9s   at 17:47:23 
❯ python3.11 -m pip install pykcs11
Collecting pykcs11
  Using cached pykcs11-1.5.17.tar.gz (82 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pykcs11
  Building wheel for pykcs11 (pyproject.toml) ... done
  Created wheel for pykcs11: filename=PyKCS11-1.5.17-cp311-cp311-macosx_15_0_arm64.whl size=191405 sha256=c59457d834018312ba73fc7f0c6d169d8fdf83144a71321c7d499d99466d65e8
  Stored in directory: /Users/arthur/Library/Caches/pip/wheels/3a/11/ff/8e41f4c8852060366be0fcd94fd2d5af0de2a325c038946fe9
Successfully built pykcs11
Installing collected packages: pykcs11
Successfully installed pykcs11-1.5.17

[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip install --upgrade pip

    ~                                                                                                                                                                               took 9s   at 17:47:36 
❯ python3.12 -m pip install pykcs11
Collecting pykcs11
  Using cached pykcs11-1.5.17.tar.gz (82 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pykcs11
  Building wheel for pykcs11 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pykcs11 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      building 'PyKCS11._LowLevel' extension
      swigging src/pykcs11.i to src/pykcs11_wrap.cpp
      swig -python -c++ -o src/pykcs11_wrap.cpp src/pykcs11.i
      creating build/temp.macosx-15.1-arm64-cpython-312/src
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/ck_attribute_smart.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/ck_attribute_smart.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang /usr/bin/cc -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/dyn_unix.c -o build/temp.macosx-15.1-arm64-cpython-312/src/dyn_unix.o
      clang: warning: /usr/bin/cc: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/pkcs11lib.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/pkcs11lib.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/pykcs11.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/pykcs11_wrap.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11_wrap.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/pykcs11string.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11string.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include -Isrc -I/usr/local/include -I/Users/arthur/.pyenv/versions/3.12.7/include/python3.12 -c src/utility.cpp -o build/temp.macosx-15.1-arm64-cpython-312/src/utility.o
      clang++: warning: /usr/bin/c++: 'linker' input unused [-Wunused-command-line-argument]
      creating build/lib.macosx-15.1-arm64-cpython-312/PyKCS11
      /usr/bin/clang++ /usr/bin/c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/postgresql@16/include /usr/bin/c++ -bundle -undefined dynamic_lookup -L/opt/homebrew/opt/ncurses/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/arthur/.pyenv/versions/3.12.7/lib -Wl,-rpath,/Users/arthur/.pyenv/versions/3.12.7/lib -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -L/opt/homebrew/opt/ncurses/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/arthur/.pyenv/versions/3.12.7/lib -Wl,-rpath,/Users/arthur/.pyenv/versions/3.12.7/lib -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -L/opt/homebrew/opt/postgresql@16/lib -I/opt/homebrew/opt/postgresql@16/include build/temp.macosx-15.1-arm64-cpython-312/src/ck_attribute_smart.o build/temp.macosx-15.1-arm64-cpython-312/src/dyn_unix.o build/temp.macosx-15.1-arm64-cpython-312/src/pkcs11lib.o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11.o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11_wrap.o build/temp.macosx-15.1-arm64-cpython-312/src/pykcs11string.o build/temp.macosx-15.1-arm64-cpython-312/src/utility.o -L/usr/local/lib -L/Users/arthur/.pyenv/versions/3.12.7/lib -o build/lib.macosx-15.1-arm64-cpython-312/PyKCS11/_LowLevel.cpython-312-darwin.so
      ld: warning: duplicate -rpath '/Users/arthur/.pyenv/versions/3.12.7/lib' ignored
      ld: warning: duplicate -rpath '/opt/homebrew/lib' ignored
      ld: multiple errors: unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked) in '/usr/bin/c++'; unsupported mach-o filetype (only MH_OBJECT and MH_DYLIB can be linked) in '/usr/bin/c++'
      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 pykcs11
Failed to build pykcs11
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pykcs11)

@LudovicRousseau
Copy link
Owner

No problem with Python 3.13.0 on macOS Sonoma 14.7.1.

Problem is for macOS Sequoia 15 and Python 3.13.

It is strange because it looks like a clang issue.
Maybe Python 3.13 is using extra parameters for the compiler or linker?

@paris-ci
Copy link
Author

paris-ci commented Dec 3, 2024

Since the issue in only on 3.12.7 for me, I ended up installing python 3.12.6

❯ pyenv install 3.12.6
python-build: use openssl@3 from homebrew
python-build: use readline from homebrew
Downloading Python-3.12.6.tar.xz...
-> https://www.python.org/ftp/python/3.12.6/Python-3.12.6.tar.xz
Installing Python-3.12.6...
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.12.6 to /Users/arthur/.pyenv/versions/3.12.6

    ~                                                                                                                                                                                                   took 1m 44s   at 19:02:01 
❯ pyenv global 3.12.6

Installing & building pykcs11

❯ python3.12 -m pip install pykcs11
Collecting pykcs11
  Using cached pykcs11-1.5.17.tar.gz (82 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pykcs11
  Building wheel for pykcs11 (pyproject.toml) ... done
  Created wheel for pykcs11: filename=PyKCS11-1.5.17-cp312-cp312-macosx_15_0_arm64.whl size=192018 sha256=afa2bec8aa59427b483287b00db4e08165a06ae3ab5b00923e92b76a716b7c8b
  Stored in directory: /Users/arthur/Library/Caches/pip/wheels/35/bd/2a/5878b0ce8994b334f0eb4f641635ad6863faf0b9edae332594
Successfully built pykcs11
Installing collected packages: pykcs11
Successfully installed pykcs11-1.5.17

Removing python 3.12.6 :

❯ pyenv uninstall 3.12.6
pyenv: remove /Users/arthur/.pyenv/versions/3.12.6? (y/N) y
pyenv: 3.12.6 uninstalled

And installing in 3.12.7 :

❯ pyenv global 3.12

❯ python3 -m pip install pykcs11
Collecting pykcs11
  Using cached PyKCS11-1.5.17-cp312-cp312-macosx_15_0_arm64.whl
Installing collected packages: pykcs11
Successfully installed pykcs11-1.5.17

Welp, that was unsatisfying, but it works...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants