NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.06k stars 13.38k forks source link

libtesseract from Hydra is unsigned on Darwin #266778

Open winterqt opened 9 months ago

winterqt commented 9 months ago

Describe the bug

libtesseract from Hydra is unsigned on Darwin, causing binaries that use it to segfault.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-build -A tesseract
  2. Run any binary that uses libtesseract, or run the command below

Expected behavior

For it to be properly codesigned

Additional context

$ codesign -vv /nix/store/xnh14k032s1y2jbp27c46bszi5lgr9hn-tesseract-5.3.3/lib/libtesseract.5.dylib
/nix/store/xnh14k032s1y2jbp27c46bszi5lgr9hn-tesseract-5.3.3/lib/libtesseract.5.dylib: invalid signature (code or signature have been modified)
In architecture: arm64

This may just be a transient Hydra issue, as seen in https://github.com/NixOS/nixpkgs/issues/162795#issuecomment-1081406101, but I have no idea how this could be happening transiently.

Notify maintainers

@schuelermine @NixOS/darwin-maintainers

Metadata

Nixpkgs version: 02f05fceedefc00f90ecf27bda9e94ed2318aa50

Et7f3 commented 9 months ago

Do you use other library without this issue ? So they can be used as comparison.

winterqt commented 9 months ago
$ codesign -vv /nix/store/ycsnhmhjj1xwgx2ljqxnifgc8id3y4yy-zlib-1.3/lib/libz.1.3.dylib
/nix/store/ycsnhmhjj1xwgx2ljqxnifgc8id3y4yy-zlib-1.3/lib/libz.1.3.dylib: valid on disk
/nix/store/ycsnhmhjj1xwgx2ljqxnifgc8id3y4yy-zlib-1.3/lib/libz.1.3.dylib: satisfies its Designated Requirement
schuelermine commented 9 months ago

I can’t comment on this in a useful manner because the Darwin update when I updated it to Tesseract 5 was very much half-assed since I know nothing about Darwin and don’t have a way to test it.

winterqt commented 9 months ago

I found the issue 🎉

Unfortunately, it looks like this has caused libtesseract to not work on aarch64-darwin for... a very long time, possibly never.

PR incoming soon-ish.