Skip to content

Flare not building on macOS 27.2 #43

Closed

Description

@adnlz

Hi! Just reporting what I think is a bug on macOS 27.2

Running mojo build server.mojo gives the following output:

(mojo-webserver)  ~/Documents/Development/mojo-webserver/ mojo build server.mojo
ld: warning: object file (/private/var/folders/fg/vb9nsv8x5mb3ksbb25lr0r7r0000gn/T/mojo_archive-3060cb8.a) was built for newer 'macOS' version (27.2) than being linked (27.0)
Undefined symbols for architecture arm64:
  "_eventfd_write", referenced from:
      _flare::http::_unified_reactor_impl::_accept_loop_unified_fd(::SIMD[DType.int, 1],flare::runtime::reactor::Reactor,::Dict[::SIMD[DType.int, 1], ::SIMD[DType.int, 1], ::AHasher[::SIMD[DType.uint64, 4](0)]],flare::runtime::timer_wheel::TimerWheel,::Dict[::SIMD[DType.int, 1], ::SIMD[DType.uint64, 1], ::AHasher[::SIMD[DType.uint64, 4](0)]],::SIMD[DType.int, 1],::SIMD[DType.int, 1],::SIMD[DType.int, 1],flare::runtime::_balance::Balancer) in mojo_archive-3060cb8.a
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mojo: error: failed to link executable

Where server.mojo is the following basic example:

from flare.prelude import *

def home(req: Request) -> Response:
	return ok("flare is up")

def health(req: Request) -> Response:
	return ok_json('{"status":"ok"}')

def greet(req: Request) raises -> Response:        # raises: req.param() can
	return ok("hello, " + req.param("name"))

def main() raises:
	var r = Router()
	r.get("/", home)
	r.get("/hi/:name", greet)
	r.get("/health", health)
	var srv = HttpServer.bind(SocketAddr.localhost(8080))
	srv.serve(r^)

Similarly, JIT compiling using mojo run server.mojo gives JIT session error: Symbols not found: [ _eventfd_write ]

Activity

  1. ehsanmok commented on Oct 30, 2026

    @ehsanmok
    Owner

    Thanks for reporting. It's strange! does hello world work on 27.2? I'll try to see if I can repro.

  2. adnlz commented on Oct 30, 2026

    @adnlz
    Author

    Yeah it's quite odd! Not sure what's causing it, cleaning the build didn't help either, and same error with the hello example from the GitHub readme:

    (mojo-webserver)  ~/Documents/Development/mojo-webserver/ mojo build server.mojo
    ld: warning: object file (/private/var/folders/fg/vb9nsv8x5mb3ksbb25lr0r7r0000gn/T/mojo_archive-178a6f3.a) was built for newer 'macOS' version (27.2) than being linked (27.0)
    Undefined symbols for architecture arm64:
      "_eventfd_write", referenced from:
          _flare::http::_reactor::lifecycle::_hand_off_stream(flare::tcp::stream::TcpStream$,::SIMD[DType.int, 1],flare::runtime::_balance::Balancer) in mojo_archive-178a6f3.a
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    mojo: error: failed to link executable
    
  3. adnlz commented on Oct 31, 2026

    @adnlz
    Author

    update: I had forgotten to update Xcode command line tools to 27.2, so the following line no longer shows up in the error: ld: warning: object file (/private/var/folders/fg/vb9nsv8x5mb3ksbb25lr0r7r0000gn/T/mojo_archive-178a6f3.a) was built for newer 'macOS' version (27.2) than being linked (27.0)
    The rest of the error remains though (undefined symbols for architecture arm64).
    It shows that error for both tag = "v0.13.0" and branch = "main" like in the following pixi.toml

    [workspace]
    authors = ["Adrian Lorenzana  <email>"]
    channels = ["conda-forge", "https://conda.modular.com/max/"]
    name = "mojo-webserver"
    platforms = ["osx-arm64"]
    version = "0.1.0"
    preview = ["pixi-build"]
    
    [tasks]
    
    [dependencies]
    mojo = ">=1.0.0,<2"
    flare = { git = "https://github.com/ehsanmok/flare.git", tag = "v0.13.0" }
    
  4. adnlz commented on Nov 1, 2026

    @adnlz
    Author

    #45 and #44 have fixed this issue :)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions