* meson -Drust=enabled fails on macOS without GNU sed
@ 2025-12-12 20:00 D. Ben Knoble
2025-12-12 20:32 ` Eric Sunshine
0 siblings, 1 reply; 7+ messages in thread
From: D. Ben Knoble @ 2025-12-12 20:00 UTC (permalink / raw)
To: Git; +Cc: Patrick Steinhardt, Ezekiel Newren, Johannes Schindelin
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?
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: meson -Drust=enabled fails on macOS without GNU sed 2025-12-12 20:00 meson -Drust=enabled fails on macOS without GNU sed D. Ben Knoble @ 2025-12-12 20:32 ` Eric Sunshine 2025-12-15 15:28 ` Patrick Steinhardt 0 siblings, 1 reply; 7+ messages in thread From: Eric Sunshine @ 2025-12-12 20:32 UTC (permalink / raw) To: D. Ben Knoble Cc: Git, Patrick Steinhardt, Ezekiel Newren, Johannes Schindelin On Fri, Dec 12, 2025 at 3:01 PM D. Ben Knoble <ben.knoble+github@gmail.com> wrote: > 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) > [...] > host: x86_64-apple-darwin > > (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? Yup, that's a strange one. Indeed: sed -n 's/^host: \(.*\)$/\1/p' would be the correct way to do it, while also being compatible with BSD-lineage `sed` (such as `sed` on macOS). ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: meson -Drust=enabled fails on macOS without GNU sed 2025-12-12 20:32 ` Eric Sunshine @ 2025-12-15 15:28 ` Patrick Steinhardt 2025-12-15 17:51 ` Eric Sunshine 2025-12-18 2:56 ` Ben Knoble 0 siblings, 2 replies; 7+ messages in thread From: Patrick Steinhardt @ 2025-12-15 15:28 UTC (permalink / raw) To: Eric Sunshine; +Cc: D. Ben Knoble, Git, Ezekiel Newren, Johannes Schindelin On Fri, Dec 12, 2025 at 03:32:30PM -0500, Eric Sunshine wrote: > On Fri, Dec 12, 2025 at 3:01 PM D. Ben Knoble > <ben.knoble+github@gmail.com> wrote: > > 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) > > [...] > > host: x86_64-apple-darwin > > > > (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? > > Yup, that's a strange one. Indeed: > > sed -n 's/^host: \(.*\)$/\1/p' > > would be the correct way to do it, while also being compatible with > BSD-lineage `sed` (such as `sed` on macOS). Ah, indeed. Would one of you want to turn this into a patch? Thanks for the report! Patrick ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: meson -Drust=enabled fails on macOS without GNU sed 2025-12-15 15:28 ` Patrick Steinhardt @ 2025-12-15 17:51 ` Eric Sunshine 2025-12-18 2:56 ` Ben Knoble 1 sibling, 0 replies; 7+ messages in thread From: Eric Sunshine @ 2025-12-15 17:51 UTC (permalink / raw) To: Patrick Steinhardt Cc: D. Ben Knoble, Git, Ezekiel Newren, Johannes Schindelin On Mon, Dec 15, 2025 at 10:28 AM Patrick Steinhardt <ps@pks.im> wrote: > On Fri, Dec 12, 2025 at 03:32:30PM -0500, Eric Sunshine wrote: > > On Fri, Dec 12, 2025 at 3:01 PM D. Ben Knoble > > <ben.knoble+github@gmail.com> wrote: > > > 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? > > > > Yup, that's a strange one. Indeed: > > > > sed -n 's/^host: \(.*\)$/\1/p' > > > > would be the correct way to do it, while also being compatible with > > BSD-lineage `sed` (such as `sed` on macOS). > > Ah, indeed. Would one of you want to turn this into a patch? I'm not likely to have the time, presently. Ben is welcome to attack the task if he desires. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: meson -Drust=enabled fails on macOS without GNU sed 2025-12-15 15:28 ` Patrick Steinhardt 2025-12-15 17:51 ` Eric Sunshine @ 2025-12-18 2:56 ` Ben Knoble 2025-12-18 6:57 ` Patrick Steinhardt 1 sibling, 1 reply; 7+ messages in thread From: Ben Knoble @ 2025-12-18 2:56 UTC (permalink / raw) To: Patrick Steinhardt Cc: Eric Sunshine, D. Ben Knoble, Git, Ezekiel Newren, Johannes Schindelin > Le 15 déc. 2025 à 10:28, Patrick Steinhardt <ps@pks.im> a écrit : > > On Fri, Dec 12, 2025 at 03:32:30PM -0500, Eric Sunshine wrote: >>> On Fri, Dec 12, 2025 at 3:01 PM D. Ben Knoble >>> <ben.knoble+github@gmail.com> wrote: >>> 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) >>> [...] >>> host: x86_64-apple-darwin >>> >>> (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? >> >> Yup, that's a strange one. Indeed: >> >> sed -n 's/^host: \(.*\)$/\1/p' >> >> would be the correct way to do it, while also being compatible with >> BSD-lineage `sed` (such as `sed` on macOS). > > Ah, indeed. Would one of you want to turn this into a patch? > > Thanks for the report! > > Patrick Work is ugly this week. I hope to send a patch this weekend. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: meson -Drust=enabled fails on macOS without GNU sed 2025-12-18 2:56 ` Ben Knoble @ 2025-12-18 6:57 ` Patrick Steinhardt 2025-12-18 23:26 ` D. Ben Knoble 0 siblings, 1 reply; 7+ messages in thread From: Patrick Steinhardt @ 2025-12-18 6:57 UTC (permalink / raw) To: Ben Knoble Cc: Eric Sunshine, D. Ben Knoble, Git, Ezekiel Newren, Johannes Schindelin On Wed, Dec 17, 2025 at 09:56:02PM -0500, Ben Knoble wrote: > > > Le 15 déc. 2025 à 10:28, Patrick Steinhardt <ps@pks.im> a écrit : > > > > On Fri, Dec 12, 2025 at 03:32:30PM -0500, Eric Sunshine wrote: > >>> On Fri, Dec 12, 2025 at 3:01 PM D. Ben Knoble > >>> <ben.knoble+github@gmail.com> wrote: > >>> 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) > >>> [...] > >>> host: x86_64-apple-darwin > >>> > >>> (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? > >> > >> Yup, that's a strange one. Indeed: > >> > >> sed -n 's/^host: \(.*\)$/\1/p' > >> > >> would be the correct way to do it, while also being compatible with > >> BSD-lineage `sed` (such as `sed` on macOS). > > > > Ah, indeed. Would one of you want to turn this into a patch? > > > > Thanks for the report! > > > > Patrick > > Work is ugly this week. I hope to send a patch this weekend. Thanks! Let me know in case you don't get to it and I'll be happy to send a patch myself. Patrick ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: meson -Drust=enabled fails on macOS without GNU sed 2025-12-18 6:57 ` Patrick Steinhardt @ 2025-12-18 23:26 ` D. Ben Knoble 0 siblings, 0 replies; 7+ messages in thread From: D. Ben Knoble @ 2025-12-18 23:26 UTC (permalink / raw) To: Patrick Steinhardt Cc: Eric Sunshine, Git, Ezekiel Newren, Johannes Schindelin On Thu, Dec 18, 2025 at 1:57 AM Patrick Steinhardt <ps@pks.im> wrote: > > On Wed, Dec 17, 2025 at 09:56:02PM -0500, Ben Knoble wrote: > > > > > Le 15 déc. 2025 à 10:28, Patrick Steinhardt <ps@pks.im> a écrit : [snip] > > > Ah, indeed. Would one of you want to turn this into a patch? > > > > > > Thanks for the report! > > > > > > Patrick > > > > Work is ugly this week. I hope to send a patch this weekend. > > Thanks! Let me know in case you don't get to it and I'll be happy to > send a patch myself. > > Patrick Should come in as <a33f4e5118938300bcd5b2991feeee855a1c8f86.1766100330.git.ben.knoble+github@gmail.com> -- D. Ben Knoble ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-12-18 23:27 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-12 20:00 meson -Drust=enabled fails on macOS without GNU sed D. Ben Knoble 2025-12-12 20:32 ` Eric Sunshine 2025-12-15 15:28 ` Patrick Steinhardt 2025-12-15 17:51 ` Eric Sunshine 2025-12-18 2:56 ` Ben Knoble 2025-12-18 6:57 ` Patrick Steinhardt 2025-12-18 23:26 ` D. Ben Knoble
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).