Opened 2 years ago

Closed 20 months ago

#64306 closed defect (fixed)

julia @1.7.0_0+gccdevel: Break on macOS 11.6.2 aarch64

Reported by: sainnhe (Sainnhe Park) Owned by: essandess (Steve Smith)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: sainnhe (Sainnhe Park), i0ntempest
Port: julia

Description

~/Downloads                                                                                                                                             0.88s sainnhe@sainnhe-mba
❯ port installed julia
The following ports are currently installed:
  julia @1.7.0_0+gccdevel (active)
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~/Downloads                                                                                                                                             0.10s sainnhe@sainnhe-mba
❯ uname -v
Darwin Kernel Version 20.6.0: Wed Nov 10 22:23:05 PST 2021; root:xnu-7195.141.14~1/RELEASE_ARM64_T8101
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~/Downloads                                                                                                                                             0.01s sainnhe@sainnhe-mba
❯ julia --version
zsh: killed     julia --version

Attachments (1)

julia-2022-01-16-162648.ips (9.3 KB) - added by kenniskoldewyn (Kennis Koldewyn) 2 years ago.
Crash log

Download all attachments as: .zip

Change History (10)

comment:1 Changed 2 years ago by sainnhe (Sainnhe Park)

Summary: Break on macOS 11.6.2 aarch64julia @1.7.0_0+gccdevel: Break on macOS 11.6.2 aarch64
Version: 1.7.02.7.1

comment:2 Changed 2 years ago by sainnhe (Sainnhe Park)

Cc: sainnhe added
Owner: set to essandess
Status: newassigned

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Please attach the crash log so that we can see why it's crashing.

comment:4 Changed 2 years ago by sainnhe (Sainnhe Park)

Very strange, the process get killed in zsh but if I use lldb to launch it, then it won't get killed and entered into REPL environment as expected.

I tried to search for related issues in their repository and found that the possible reason might be

“Julia-1.2” can’t be opened because Apple cannot check it for malicious software.

But I didn't see such prompt window when the process get killed. And I also tried to navigate to /opt/local/bin and right click the binary and select open, still no success.

Related issues here:

Any ideas?

Changed 2 years ago by kenniskoldewyn (Kennis Koldewyn)

Attachment: julia-2022-01-16-162648.ips added

Crash log

comment:5 Changed 2 years ago by kenniskoldewyn (Kennis Koldewyn)

See attached crash log. TLDR; SIGKILL (Code Signature Invalid). (I built with +gcc11, so it's not gccdevel, and I'm on MacOS 12.1, but I'm guessing it's the same problem.)

Last edited 2 years ago by kenniskoldewyn (Kennis Koldewyn) (previous) (diff)

comment:6 Changed 2 years ago by bosmacs (Craig Bosma)

Same issue; codesign shows the signature for libjulia is borked:

> codesign --verbose=4 /opt/local/lib/libjulia.1.7.dylib                                                                                 
/opt/local/lib/libjulia.1.7.dylib: invalid signature (code or signature have been modified)
In architecture: arm64

I worked around it by resigning (adhoc) the .dylib:

> codesign -s - /opt/local/lib/libjulia.1.7.dylib

This happened with a source build as well, so I'm guessing something is modifying the dylib after (linker) signing as part of the build.

Last edited 2 years ago by bosmacs (Craig Bosma) (previous) (diff)

comment:7 Changed 20 months ago by i0ntempest

The portfile calls install_name_tool after destroot on the binary which might be the reason of this. We could adhoc sign the dylib and binary after destroot, like what I'm doing with my qbittorrent ports.
Shall I add it in?

comment:8 Changed 20 months ago by i0ntempest

Cc: i0ntempest added

comment:9 Changed 20 months ago by i0ntempest

Resolution: fixed
Status: assignedclosed

In 9c943cbd836a698469555a568ec3593d39d5d4b4/macports-ports (master):

julia: manually fix code signature on arm

Closes: #64306

Note: See TracTickets for help on using tickets.