From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Junio C Hamano <gitster@pobox.com>,
Eric Sunshine <sunshine@sunshineco.com>
Cc: GIT Mailing-list <git@vger.kernel.org>,
Patrick Steinhardt <ps@pks.im>,
Renato Botelho <garga@freebsd.org>,
Eli Schwartz <eschwartz@gentoo.org>
Subject: Re: [PATCH] build: fix FreeBSD build when sysinfo compat library installed
Date: Mon, 7 Jul 2025 17:58:08 +0100 [thread overview]
Message-ID: <77b52fde-e1f7-4193-a1c0-1aea94b22e69@ramsayjones.plus.com> (raw)
In-Reply-To: <ba0a3469-3a4d-44f4-b1b8-d9c1a825cb94@ramsayjones.plus.com>
On 07/07/2025 17:51, Ramsay Jones wrote:
>
>
> On 07/07/2025 16:40, Junio C Hamano wrote:
>> Eric Sunshine <sunshine@sunshineco.com> writes:
>>
>>>> need to link a separate library (-lsysinfo). (This would require
>>>> a similar change to meson.build).
>>>>
>>>> - change the order of the preprocessor conditionals in the total_ram()
>>>> function in 'builtin/gc.c', so that the *BSD sysctl() function
>>>> (in the HAVE_BSD_SYSCTL block) takes priority over the sysinfo()
>>>> function (in the HAVE_SYSINFO block).
>>>>
>>>> - suppress the setting of HAVE_SYSINFO when HAVE_BSD_SYSCTL has been
>>>> defined (in both configure.ac and meson.build).
>>>> ...
>>>> The second solution would only be required by the autoconf and meson
>>>> build systems, the Makefile already sets the build variables to the
>>>> required values (since they are not 'auto-detected').
>>> ...
>>> The final solution is almost certainly good enough (and is definitely
>>> simple), although the second solution has the benefit that it "fixes"
>>> the problem once and for all even if someone defines both
>>> HAVE_BSD_SYSCTL and HAVE_SYSINFO (say, in config.mak), assuming I'm
>>> understanding correctly.
>>
>> Yeah, I think I agree with this assessment.
>
> [Sorry for the late reply - real life keeps getting in the way!]
>
> Yep, I thought about including this fix *in addition to* the solution
> implemented in this patch, but decided that the chances that anyone would
> set both in a Makefile build was practically zero. (famous last words ;) ).
>
> Of course, practically zero is not zero, so we could do this in a
> follow-up patch if we wanted to take a more conservative approach.
> (Carlos has a series in progress which would conflict with such a
Sigh, sorry, Carlo.
ATB,
Ramsay Jones
next prev parent reply other threads:[~2025-07-07 16:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 22:23 [PATCH] build: fix FreeBSD build when sysinfo compat library installed Ramsay Jones
2025-07-04 23:49 ` Eric Sunshine
2025-07-07 15:40 ` Junio C Hamano
2025-07-07 16:51 ` Ramsay Jones
2025-07-07 16:58 ` Ramsay Jones [this message]
2025-07-07 17:12 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77b52fde-e1f7-4193-a1c0-1aea94b22e69@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=eschwartz@gentoo.org \
--cc=garga@freebsd.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox