git/list[1] front-page[2] threads[3] people[4] search[5] about
 

meson -Drust=enabled fails on macOS without GNU sed

From
D. Ben Knoble <ben.knoble+github@gmail.com>
Date
Dec 12, 2025, 20:00 UTC
Message-ID
<CALnO6CCu7A7mkLy==K9a-u-z0kYBKLiyBz+Qq8c7PWLHO-YuNw@mail.gmail.com>

I think it's due to e509b5b8be (rust: support for Windows, 2025-10-15) [relevant folks CC'd], where we assume sed can take "-s" (which AFAICT is a GNU extension). But perhaps "-n" was intended with a "p" flag on the substitution?

I've been building with Rust enabled on Gentoo now for a minute and haven't hit any issues, but that's perhaps because the command is running with "-s" and not working as intended (yet still producing the expected results).

The relevant snippet is this (reformatted slightly by GMail, apologies):
case "$(cargo -vV | sed -s 's/^host: \(.*\)$/\1/')" in
  *-windows-*) LIBNAME=gitcore.lib;;
  *) LIBNAME=libgitcore.a;;
esac
but "cargo -vV" produces something like

cargo 1.89.0 (c24e10642 2025-06-23) release: 1.89.0 commit-hash: c24e1064277fe51ab72011e2612e556ac56addf7 commit-date: 2025-06-23 host: x86_64-apple-darwin libgit2: 1.9.0 (sys:0.20.2 vendored) libcurl: 8.7.1 (sys:0.4.80+curl-8.12.1 system ssl:(SecureTransport) LibreSSL/3.3.6) ssl: OpenSSL 3.5.0 8 Apr 2025 os: Mac OS 12.7.6 [64-bit]

(on my older system, on which I haven't tried the build; the failure is on my newer system with close-enough-to-the-same output). I'm sure you can see why I don't understand why we need GNU's "-s" ("consider files as separate rather than as a single, continuous long stream") here?

Next: Eric Sunshine
Message 1 of 7 in “meson -Drust=enabled fails on macOS without GNU sed”
  1. D. Ben KnobleDec 12, 2025
  2. Eric SunshineDec 12, 2025
  3. Patrick SteinhardtDec 15, 2025
  4. Eric SunshineDec 15, 2025
  5. Ben KnobleDec 18, 2025
  6. Patrick SteinhardtDec 18, 2025
  7. D. Ben KnobleDec 18, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.