Opened 5 weeks ago
Last modified 13 days ago
#74568 assigned defect
Error in running julia after installation from MacPorts
| Reported by: | materials-prof | Owned by: | essandess (Steve Smith) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | goldengate | Cc: | benz0li (Olivier Benz) |
| Port: | julia |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I installed julia and got this error message when running it:
prompt % julia ERROR: Unable to find compatible target in cached code image. Target 0 (apple-m4): Rejecting this target due to use of runtime-disabled features
I followed a suggestion from a previous defect report and I was able to fix this...
sudo port -ns upgrade --force julia
I have an M5 computer running Golden Gate. I used the port migration (from a very old intel mac) which may or may not have caused issues; but trying multiple clean; uninstalls; installs did not fix the above error...only the force did...
I'm not sure why the regular install didn't work so I'm submitting this if it might help you fix something for others
Change History (7)
comment:1 Changed 5 weeks ago by jmroot (Joshua Root)
| Cc: | benz0li added |
|---|---|
| Owner: | set to essandess |
| Status: | new → assigned |
comment:2 Changed 4 weeks ago by ryandesign (Ryan Carsten Schmidt)
| Description: | modified (diff) |
|---|---|
| Keywords: | goldengate added |
comment:3 Changed 4 weeks ago by materials-prof
I agree that migration should not have been a problem but more information is always better. Since I went from intel to arm64 AND went from Monterey to Golden Gate, a number of ports couldn't be rebuild, but none of those were dependencies for julia. I did (as a check) install julia in my personal user directory directly from their web site and it worked out of the box so I agree that there was most likely a pre-compiled binary issue. I'm a little confused though and I'd like clarification on the pre-compiled binary that I presumably had received before. Are you saying that clean and uninstall would not have removed any previous pre-compiled binaries?
comment:4 Changed 2 weeks ago by bosmacs (Craig Bosma)
I had the same issue, but on a fresh M5 machine that was not migrated. A reinstall from source resolved the issue.
comment:5 follow-up: 6 Changed 13 days ago by benz0li (Olivier Benz)
Hey Steve,
Is there JULIA_CPU_TARGETS set during the build?
-> See https://github.com/JuliaCI/julia-buildkite/blob/180c63086119d51f1279c27726e56e4511cfaaa9/utilities/build_envs.sh#L70-L77
The current Julia port runs fine on my M2 machine but not on my M1 machine.
Cross reference: https://github.com/docker-library/julia/issues/79
Best regards,
Olivier
comment:6 Changed 13 days ago by essandess (Steve Smith)
Replying to benz0li:
Is there
JULIA_CPU_TARGETSset during the build?
Not on any of the machines I’ve used, Apple Silicon and Intel. I haven’t seen this issue myself migrating to Golden Gate.
comment:7 Changed 13 days ago by benz0li (Olivier Benz)
Hi Steve,
Not on any of the machines I’ve used, Apple Silicon and Intel.
It is always guaranteed that Julia built from source will work on the machine on which it was built.
I am talking about the MacPorts build machines that produce the pre-compiled binaries.
-> If JULIA_CPU_TARGET is not set and the MacPorts build machines are M2, the binaries will most likely only run on M2 machines.
IMHO JULIA_CPU_TARGET needs to be set to generic;apple-m1,clone_all in the Portfile in order to produce pre-compiled binaries compatible with all generations of the M-series.
Similar issue:
Cross reference:
Best regards,
Olivier

Migrating from another Mac shouldn't be a problem, provided that means you did reinstall this port and all other ports on the new machine so that they are built for Golden Gate.
If rebuilding from source fixed the problem, that suggests there is a mistake in our pre-compiled binary that you presumably had received before.