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

Build failure: pythonPackages.cffi on x86_64-darwin #322191

Closed
theCapypara opened this issue Jun 24, 2024 · 5 comments
Closed

Build failure: pythonPackages.cffi on x86_64-darwin #322191

theCapypara opened this issue Jun 24, 2024 · 5 comments
Labels
0.kind: build failure A package fails to build

Comments

@theCapypara
Copy link
Member

Steps To Reproduce

Steps to reproduce the behavior:

  1. build cffi (from 24.05, but unstable is the same at the moment) on x86_64-darwin (macOS 13.6.6)

Build log

building '/nix/store/1rbs81pi4axxxpj64lvc9x6vdwkp4q7i-python3.11-cffi-1.16.0.drv'...
error: builder for '/nix/store/1rbs81pi4axxxpj64lvc9x6vdwkp4q7i-python3.11-cffi-1.16.0.drv' failed with exit code 1;
              last 25 log lines:
              >      /nix/store/jnc0a7fgq1k8zgflgjkmkijghkmps6ha-python3.11-pytest-8.1.1/lib/python3.11/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function TestNewFFI1.test_callback_decorator.<locals>.cb at 0x104d3ef20>, trying to convert the result back to C: None
              >
              >      Traceback (most recent call last):
              >          File "/private/tmp/nix-build-python3.11-cffi-1.16.0.drv-0/cffi-1.16.0/testing/cffi1/test_new_ffi_1.py", line 1341, in test_callback_decorator
              >              assert cb((1 << (sz*8-1)) - 1, -10) == 42
              >      OverflowError: int too big to convert
              >
              >          warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
              >
              > testing/cffi1/test_recompiler.py::test_macro_var_callback
              >      /nix/store/jnc0a7fgq1k8zgflgjkmkijghkmps6ha-python3.11-pytest-8.1.1/lib/python3.11/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function test_macro_var_callback.<locals>.get_my_value at 0x105a15580>, trying to convert the result back to C: None
              >
              >      Traceback (most recent call last):
              >          File "/nix/store/jnc0a7fgq1k8zgflgjkmkijghkmps6ha-python3.11-pytest-8.1.1/lib/python3.11/site-packages/_pytest/python_api.py", line 960, in raises
              >              func(*args[1:], **kwargs)
              >      TypeError: initializer for ctype 'int *' must be a cdata pointer, not str
              >
              >          warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
              >
              > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
              > =========================== short test summary info ============================
              > FAILED testing/cffi1/test_verify1.py::test_enum_usage - cffi.VerificationError: CompileError: command '/nix/store/h0a61pim6lj25qnnw...
              > FAILED testing/cffi1/test_verify1.py::test_named_pointer_as_argument - cffi.VerificationError: CompileError: command '/nix/store/h0a61pim6lj25qnnw...
              > = 2 failed, 1888 passed, 150 skipped, 4 xfailed, 11 warnings in 366.64s (0:06:06) =

Additional context

The Mac is an emulated system in KVM/QEMU, in case that is somehow relevant.

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

marco@Marcos-iMac-Pro all % nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-darwin"`
 - host os: `Darwin 22.6.0, macOS 10.16`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.23.0`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a 👍 reaction to issues you find important.

@theCapypara theCapypara added the 0.kind: build failure A package fails to build label Jun 24, 2024
@theCapypara
Copy link
Member Author

I forgot to ping the maintainers. I don't seem to be able to ping a team, so I hope it's OK I ping @mweinelt, you updated it last.

@theCapypara
Copy link
Member Author

Oh, I just noticed: These are the two tests fixed by 0b499eb

So I guess somehow this patch isn't applied here even though it should be. I will investigate.

@theCapypara
Copy link
Member Author

I couldn't really figure out why the tests are still failing, the patches are applied. I will leave this for somebody more experienced with C and Clang to investigate.

@theCapypara
Copy link
Member Author

Okay I got it.
Instead of the patch in the commit above, pulling in this commit as a patch for all compilers fixes the issue:
python-cffi/cffi@39bdab2

I don't really get why the patch that disables the warning doesn't work, but this commit just fixes why the warning is even raised.
This will be included in 1.17.0.

@theCapypara
Copy link
Member Author

Seems to have been fixed via #322388

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant