Skip to content

appbundler CLI fails to build QMLApp while julia -m AppBundler build succeeds (identical arguments) #33

Description

@JanisErdmanis

Building the examples/QMLApp example with the juliaimg bundler works when invoked via julia -m AppBundler build ..., but fails with ERROR: Unknown package: QMLApp when invoked through the appbundler CLI entry point using the same arguments.

Environment

  • AppBundler: ~/.julia/packages/AppBundler/CNmKH
  • Platform: macOS aarch64
  • Julia (sysimg target): 1.12.5

Steps to reproduce

Works:

julia -m AppBundler build examples/QMLApp -Dbundler="juliaimg" --selfsign

Fails:

appbundler build examples/QMLApp -Dbundler="juliaimg" --selfsign

Expected behavior

Both invocations should produce an identical DMG. The appbundler CLI should be a thin wrapper over julia -m AppBundler build and should resolve the project/package context the same way.

Actual behavior

During compile_sysimg, the bundled Julia is invoked with --project pointing at the example directory, but Pkg.precompile(["QMLApp"]) fails because Pkg does not see QMLApp as part of the active project:

Fetching sources for julia-1.12.5-Pkg.BinaryPlatforms.MacOS(Platform("aarch64", "macos"; ))
Compiling sysimage for ["QMLApp"]...
Precompiling Pkg finished.
  1 dependency successfully precompiled in 21 seconds
ERROR: Unknown package: QMLApp
ERROR: failed process: Process(`.../QMLApp.app/Contents/Libraries/bin/julia --startup-file=no --pkgimages=no --project=/Users/jerdmanis/BtSync/PeaceFounder/Github/AppBundler/examples/QMLApp --eval 'import Pkg; Pkg.precompile(["QMLApp"])'`, ProcessExited(1))

Full stacktrace points to JuliaImg.compile_sysimg at src/bundlers/JuliaImg/JuliaImg.jl:245.

Analysis / hypothesis

Likely a DEPOT_PATH / LOAD_PATH discrepancy between the two entry points. The appbundler CLI probably alters (or fails to propagate) these env vars when spawning the sysimg-compilation subprocess, so the child Julia ends up without the depot/load context needed to resolve QMLApp from the example's project.

Workaround

Use julia -m AppBundler build ... directly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions