Conversation
Assisted-by: Cursor Grok 4.6
Assisted-by: Cursor Grok 4.6
Assisted-by: Cursor Grok 4.6
Assisted-by: Cursor Grok 4.6
|
@samuela I looked into the question you raised on #559250 — whether GPU/MAX could be added to this source build. It cannot, at least not from the public Modular tree. The MAX C++ runtime ( So I think #559250 is the better first |
Ah, that's a bummer esp considering the press around the open source release. I was not aware of this.
Another option would be to do a |
|
@samuela Yes, a I would keep this PR as the source-built One caveat on the jaxlib/tensorflow analogy: source will not grow GPU/MAX until Modular publishes the closed pieces (MLRT / device codegen). That is an upstream availability gap, not something this derivation can close by packaging work. Until then the two packages would stay complementary rather than on a path to parity. Happy to keep maintaining the source package on that basis. |
|
sg, enabled github actions on this pr and renamed derivation to mojo-bin in #559250 |
Summary
mojopackage (//KGEN:mojoviabuildBazelPackage) after Modular open-sourced the compiler (Apache-2.0 + LLVM exceptions).Changes
pkgs/by-name/mo/mojo/package.nix--config=build-mojo --compilation_mode=opt.llvm-ifsis nixpkgs LLVM as well.bazel_9. Host Python is nixpkgs CPython (local_runtimeplus install_only-style tarballs forpython.toolchain()).mojois a normalmakeWrapper(nobuildFHSEnv).mojo-fulluses the Nix glibc PT_INTERP.passthru.tests.helloandpassthru.tests.interpreter(Nix glibc PT_INTERP, stripped, nollvm-ifsrunfiles).disallowedReferenceson the fat compile output.pkgs/by-name/mo/mojo/{clang-linux,llvm-ifs-nix,sysroot-nix,python-standalone-nix}.nixmaintainers/maintainer-list.nixhnknkm.Testing
Verified on
x86_64-linux(staging flake using this derivation):mojo --version→Mojo 1.1.0.dev0 (deadbeef)hello.mojoprintsHello, Mojomojo-fullPT_INTERP is Nix glibc (/nix/store/...-glibc-.../lib/ld-linux-x86-64.so.2), not/lib64mojo-fullis stripped; link-timellvm-ifsis not in runfilesCompile of
//KGEN:mojowas ~3h38m (11189 actions) onx86_64-linux. The public unwrapped output is a follow-on derivation that strips DWARF and hardlinks duplicate Bazel runfiles (about 631 MiB on disk, ~1.0 GiB closure). The compile derivation usesrequiredSystemFeatures = [ "big-parallel" ]. ofBorg may not finish a full compile.Notes
x86_64-linuxonly. GPU/MAX/CUDA is out of scope.max/v26.5.0predates compiler OSS, so this pins post-OSS commit577b6b839efa11d750cdf264f1094954cc7d5b25asunstable-2026-08-21.meta.sourceProvenanceincludesbinaryNativeCodebecause the Bazel vendor tarball still contains host tools used during analysis (crashpad, buildifier, Go/Node/uv). The compiler C/C++ toolchain itself is nixpkgs LLVM/glibc; GPU blobs such as nvshmem are not vendored for//KGEN:mojo.ulimit -s unlimitedon the driver wrappers and-O0for NativePDB (SIGSEGV at-O2).Things done
passthru.tests.nixpkgs-reviewon this PR../result/bin/.Assisted by Cursor Grok 4.6 when drafting the derivation and this summary. I built the package and ran the tests above.