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

Re: [PATCH] rust: build correctly without GNU sed

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Dec 19, 2025, 00:53 UTC
Message-ID
<CAPig+cSJa8JQRBATOYoizE4-Li_zO5o4FkFR7okiVDYdndSWZQ@mail.gmail.com>
In-Reply-To
<a33f4e5118938300bcd5b2991feeee855a1c8f86.1766100330.git.ben.knoble+github@gmail.com>

On Thu, Dec 18, 2025 at 6:26 PM D. Ben Knoble <ben.knoble+github@gmail.com> wrote:

Show 23 quoted lines
> From e509b5b8be (rust: support for Windows, 2025-10-15), we check
> cargo's information to decide which library to build. However, that
> check mistakenly used "sed -s" ("consider files as separate rather than
> as a single, continuous long stream"), which is a GNU extension. The
> build thus fails on macOS with "meson -Drust=enabled", which comes with
> BSD-derived sed.
>
> Instead, use the intended "sed -n" and print the matching section of the
> output. This failure mode likely went unnoticed on systems with GNU sed
> (common for developer machines and CI) because, in those instances, the
> output being matched by case is the full cargo output (which either
> contains the string "-windows-" or doesn't).
>
> Helped-by: Eric Sunshine <sunshine@sunshineco.com>
> Helped-by: Patrick Steinhardt <ps@pks.im>
> Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
> ---
> diff --git a/src/cargo-meson.sh b/src/cargo-meson.sh
> @@ -26,7 +26,7 @@
> -case "$(cargo -vV | sed -s 's/^host: \(.*\)$/\1/')" in
> +case "$(cargo -vV | sed -n 's/^host: \(.*\)$/\1/p')" in
>         *-windows-*)
>                 LIBNAME=gitcore.lib;;
This change looks good to me. Thanks for tackling this.
Previous: D. Ben KnobleNext: Patrick Steinhardt
Message 2 of 3 in “rust: build correctly without GNU sed”
  1. rust: build correctly without GNU sedD. Ben Knoble, Dec 18, 2025
  2. Eric SunshineDec 19, 2025
  3. Patrick SteinhardtDec 19, 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.