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

Binaries output by deno compile don't pass strict MachO validation on macOS #17753

Closed
jhheider opened this issue Feb 13, 2023 · 2 comments · Fixed by #24604
Closed

Binaries output by deno compile don't pass strict MachO validation on macOS #17753

jhheider opened this issue Feb 13, 2023 · 2 comments · Fixed by #24604
Labels
bug Something isn't working correctly compile related to the `deno compile` feature

Comments

@jhheider
Copy link

jhheider commented Feb 13, 2023

Apple even warns in the manpage that --strict is a moving target; however, other major language binaries don't exhibit this issue:

$ echo 'console.log("hello")' >foo.js
$ deno compile -o foo foo.js
Compile file:///Users/jacob/foo/foo.js
Emit foo
$ ./foo
hello
$ codesign -fv -s - foo
foo: replacing existing signature
foo: main executable failed strict validation

Google searching, but no actual exploration of the header, suggests that having the wrong segment last is one of the common issues. I'm not sure I have the deep knowledge to dig further into this, but I'll look into as my time permits.

@aapoalas aapoalas added needs investigation requires further investigation before determining if it is an issue or not compile related to the `deno compile` feature labels Feb 16, 2023
@aapoalas
Copy link
Collaborator

This may be related to #575

@mxcl
Copy link

mxcl commented Apr 28, 2023

From Apple docs:

codesign says my main executable failed strict validation.

  • Your Mach-O executable does not conform to modern Mach-O layout rules.
  • You may be using a third party development product that hasn't been brought up to date, or post-processed your file in unsupported ways.

jdoleary added a commit to jdoleary/Eden that referenced this issue Sep 18, 2023
to be distributed so that mac users
can run eden without gatekeeper blocking it.
(Signing does not yet work for Deno executables)
denoland/deno#11154
denoland/deno#17753
denoland/deno#986
@littledivy littledivy added bug Something isn't working correctly and removed needs investigation requires further investigation before determining if it is an issue or not labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly compile related to the `deno compile` feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants