Skip to content

Cannot use ObjectiveC on Julia 1.12-nightly #55

@eschnett

Description

@eschnett

Using ObjectiveC (which is required by Metal) leads to this error:

 $ julia +1.12-nightly
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.12.0-DEV.1976 (2025-02-04)
 _/ |\__'_|_|_|\__'_|  |  Commit 0c1e800dbdc (8 days old master)
|__/                   |

(@v1.12) pkg> add ObjectiveC
   Resolving package versions...
    Updating `~/.julia/environments/v1.12/Project.toml`
  [e86c9b32] + ObjectiveC v3.4.0
    Updating `~/.julia/environments/v1.12/Manifest.toml`
  [fa961155] + CEnum v0.5.0
  [e86c9b32] + ObjectiveC v3.4.0
  [21216c6a] + Preferences v1.4.3
  [ade2ca70] + Dates v1.11.0
  [8f399da3] + Libdl v1.11.0
  [de0858da] + Printf v1.11.0
  [fa267f1f] + TOML v1.0.3
  [4ec0a83e] + Unicode v1.11.0
  ✗ ObjectiveC
Precompiling packages finished.
  0 dependencies successfully precompiled in 2 seconds. 6 already precompiled.
  1 dependency errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

julia> err
PkgPrecompileError: The following 1 direct dependency failed to precompile:

ObjectiveC

Failed to precompile ObjectiveC [e86c9b32-1129-44ac-8ea0-90d5bb39ded9] to "/Users/eschnett/.julia/compiled/v1.12/ObjectiveC/jl_7BI05u".
ERROR: LoadError: MethodError: no method matching is_unavailable(::OncePerProcess{VersionNumber, ObjectiveC.var"#17#18"}, ::ObjectiveC.PlatformAvailability{:macos})
The function `is_unavailable` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  is_unavailable(::Function, ::ObjectiveC.PlatformAvailability)
   @ ObjectiveC ~/.julia/packages/ObjectiveC/FimnA/src/availability.jl:32
  is_unavailable(::ObjectiveC.PlatformAvailability{:darwin})
   @ ObjectiveC ~/.julia/packages/ObjectiveC/FimnA/src/availability.jl:75
  is_unavailable(::ObjectiveC.PlatformAvailability{:macos})
   @ ObjectiveC ~/.julia/packages/ObjectiveC/FimnA/src/availability.jl:75
  ...

Stacktrace:
  [1] is_unavailable(avail::ObjectiveC.PlatformAvailability{:macos})
    @ ObjectiveC ~/.julia/packages/ObjectiveC/FimnA/src/availability.jl:75
  [2] top-level scope
    @ none:1
  [3] eval(m::Module, e::Any)
    @ Core ./boot.jl:486
  [4] var"@static"(__source__::LineNumberNode, __module__::Module, ex::Any)
    @ Base ./osutils.jl:29
  [5] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:308
  [6] top-level scope
    @ ~/.julia/packages/ObjectiveC/FimnA/src/ObjectiveC.jl:41
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:307
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:3004
  [9] top-level scope
    @ stdin:6
 [10] eval(m::Module, e::Any)
    @ Core ./boot.jl:486
 [11] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2855
 [12] include_string
    @ ./loading.jl:2865 [inlined]
 [13] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:327
 [14] _start()
    @ Base ./client.jl:557
in expression starting at /Users/eschnett/.julia/packages/ObjectiveC/FimnA/src/syntax.jl:355
in expression starting at /Users/eschnett/.julia/packages/ObjectiveC/FimnA/src/foundation.jl:1
in expression starting at /Users/eschnett/.julia/packages/ObjectiveC/FimnA/src/ObjectiveC.jl:1
in expression starting at stdin:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions