* Bug: build is broken on FreeBSD if libsysinfo is installed @ 2025-06-23 14:09 Renato Botelho 2025-07-01 16:05 ` Renato Botelho 0 siblings, 1 reply; 14+ messages in thread From: Renato Botelho @ 2025-06-23 14:09 UTC (permalink / raw) To: git FreeBSD has a libsysinfo package which contains GNU libc's sysinfo port. Some users reported git 2.50.0 was failing to build when this port is installed and it happened because configure script detected libsysinfo but -lsysinfo was not added to LDFLAGS, ending up with following error: scalar.o common-main.o libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lz -pthread ld: error: undefined symbol: sysinfo This patch [1] was added to git port adding a user option to enable/disable libsysinfo dependency and fix LDFLAGS when it's enabled. I'm not sure about what is best approach for git project in this case. [1] https://github.com/freebsd/freebsd-ports/blob/main/devel/git/files/patch-configure.ac -- Renato Botelho ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-06-23 14:09 Bug: build is broken on FreeBSD if libsysinfo is installed Renato Botelho @ 2025-07-01 16:05 ` Renato Botelho 2025-07-01 20:03 ` Eric Sunshine 2025-07-01 20:03 ` Ramsay Jones 0 siblings, 2 replies; 14+ messages in thread From: Renato Botelho @ 2025-07-01 16:05 UTC (permalink / raw) To: git On 23/06/25 11:09, Renato Botelho wrote: > FreeBSD has a libsysinfo package which contains GNU libc's sysinfo port. > Some users reported git 2.50.0 was failing to build when this port is > installed and it happened because configure script detected libsysinfo > but -lsysinfo was not added to LDFLAGS, ending up with following error: > > scalar.o common-main.o libgit.a xdiff/lib.a reftable/libreftable.a > libgit.a -lz -pthread > ld: error: undefined symbol: sysinfo > > This patch [1] was added to git port adding a user option to enable/ > disable libsysinfo dependency and fix LDFLAGS when it's enabled. > > I'm not sure about what is best approach for git project in this case. > > [1] https://github.com/freebsd/freebsd-ports/blob/main/devel/git/files/ > patch-configure.ac If someone let me know what would be the desired approach here I can work on a patch. Would you like to make that option conditional as the patch did? Or detect if OS is FreeBSD and do something different? -- Renato Botelho ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-01 16:05 ` Renato Botelho @ 2025-07-01 20:03 ` Eric Sunshine 2025-07-01 20:03 ` Ramsay Jones 1 sibling, 0 replies; 14+ messages in thread From: Eric Sunshine @ 2025-07-01 20:03 UTC (permalink / raw) To: Renato Botelho; +Cc: git On Tue, Jul 1, 2025 at 12:09 PM Renato Botelho <garga@freebsd.org> wrote: > On 23/06/25 11:09, Renato Botelho wrote: > > FreeBSD has a libsysinfo package which contains GNU libc's sysinfo port. > > Some users reported git 2.50.0 was failing to build when this port is > > installed and it happened because configure script detected libsysinfo > > but -lsysinfo was not added to LDFLAGS, ending up with following error: > > > > scalar.o common-main.o libgit.a xdiff/lib.a reftable/libreftable.a > > libgit.a -lz -pthread > > ld: error: undefined symbol: sysinfo > > > > This patch [1] was added to git port adding a user option to enable/ > > disable libsysinfo dependency and fix LDFLAGS when it's enabled. > > > > I'm not sure about what is best approach for git project in this case. > > > > [1] https://github.com/freebsd/freebsd-ports/blob/main/devel/git/files/ > > patch-configure.ac > > If someone let me know what would be the desired approach here I can > work on a patch. Would you like to make that option conditional as the > patch did? Or detect if OS is FreeBSD and do something different? It depends upon how much effort you want to put into the patch. If the primary goal is to just get FreeBSD building again, then the least amount of work probably would be to use AC_LINK_IFELSE (with whatever tweaking that requires) instead of AC_COMPILE_IFELSE in configure.ac for the sysinfo check. With that change, HAVE_SYSINFO would not get defined if the link fails due to the missing `-lsysinfo`. If you do want sysinfo functionality to be used by Git on FreeBSD, then probably the most correct approach would be as follows: (1) Add a NEEDS_LIBSYSINFO to Makefile (patterned after existing "NEEDS_" definitions in that file). This would involve documenting it alongside HAVE_SYSINFO, and adding something along the lines of: ifdef NEEDS_LIBSYSINFO EXTLIBS += -lsysinfo endif (2) For people who build the project directly without utilizing the "configure" script, optionally update the FreeBSD section of config.make.uname to define HAVE_SYSINFO and NEEDS_LIBSYSINFO as appropriate. Those definitions probably ought to be conditional based upon some criteria that you determine so that compilation doesn't break on older versions of FreeBSD (if they were lacking the sysinfo() call or "libsysinfo"). (3) Update configure.ac to check whether `-lsysinfo` is needed, and define NEEDS_LIBSYSINFO appropriately. This may mean employing both AC_COMPILE_IFELSE and AC_LINK_IFELSE for determining HAVE_SYSINFO and NEEDS_LIBSYSINFO, respectively, though there might be a cleaner way to do so (I haven't put much thought into it). ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-01 16:05 ` Renato Botelho 2025-07-01 20:03 ` Eric Sunshine @ 2025-07-01 20:03 ` Ramsay Jones 2025-07-02 11:28 ` Renato Botelho 2025-07-02 18:32 ` Eli Schwartz 1 sibling, 2 replies; 14+ messages in thread From: Ramsay Jones @ 2025-07-01 20:03 UTC (permalink / raw) To: Renato Botelho; +Cc: Patrick Steinhardt, Junio C Hamano, GIT Mailing-list On 01/07/2025 17:05, Renato Botelho wrote: > On 23/06/25 11:09, Renato Botelho wrote: >> FreeBSD has a libsysinfo package which contains GNU libc's sysinfo port. Some users reported git 2.50.0 was failing to build when this port is installed and it happened because configure script detected libsysinfo but -lsysinfo was not added to LDFLAGS, ending up with following error: >> >> scalar.o common-main.o libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lz -pthread >> ld: error: undefined symbol: sysinfo >> >> This patch [1] was added to git port adding a user option to enable/ disable libsysinfo dependency and fix LDFLAGS when it's enabled. >> >> I'm not sure about what is best approach for git project in this case. >> >> [1] https://github.com/freebsd/freebsd-ports/blob/main/devel/git/files/ patch-configure.ac > > If someone let me know what would be the desired approach here I can work on a patch. Would you like to make that option conditional as the patch did? Or detect if OS is FreeBSD and do something different? > Ah, Sorry for the late reply, but I was away ... :) Hmm, I can think of several approaches we could take, but I can't test any of them (since I don't have access to a FreeBSD system). - it would not be difficult to add a 'library-check' to the configure.ac file, so that '-lsysinfo' would be added to the link. (We would also have to make a similar change to meson.build). However, I don't think this is the right solution; I'm guessing that the compat sysinfo library is implemented in terms of sysctl() anyway, so ... - we could simply change the order of the preprocessor conditionals in 'builtin/gc.c' L530-541 so that the 'HAVE_SYSINFO' block comes after the 'HAVE_BSD_SYSCTL' block. (BTW, I assume that the HW_ symbols are defined whenever the 'sysinfo compat library' is installed; i.e. old versions of FreeBSD which don't define them are also too old to support the compat library). - we could suppress the setting of HAVE_SYSINFO if HAVE_BSD_SYSCTL has been defined (in both configure.ac and meson.build). I very quickly knocked up a patch to do the last option above (I moved the setting of HAVE_SYSINFO down the file rather that HAVE_BSD_SYSCTL up. I guess it doesn't matter, but I gave it *no* thought!). The patch is below. (I didn't write a commit message ;) ). Does this work for you? ATB, Ramsay Jones ---- >8 ---- From: Ramsay Jones <ramsay@ramsayjones.plus.com> Date: Tue, 1 Jul 2025 20:33:44 +0100 Subject: [PATCH] build: fix FreeBSD sysinfo build failure Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> --- configure.ac | 61 ++++++++++++++++++++++++++++++---------------------- meson.build | 10 +++++---- 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac index f6caab919a..bf710ac91a 100644 --- a/configure.ac +++ b/configure.ac @@ -1067,32 +1067,6 @@ AC_CHECK_LIB([iconv], [locale_charset], [CHARSET_LIB=-lcharset])]) GIT_CONF_SUBST([CHARSET_LIB]) -# -# Define HAVE_SYSINFO=YesPlease if sysinfo is available. -# -AC_DEFUN([HAVE_SYSINFO_SRC], [ -AC_LANG_PROGRAM([[ -#include <stdint.h> -#include <sys/sysinfo.h> -]], [[ -struct sysinfo si; -uint64_t t = 0; -if (!sysinfo(&si)) { - t = si.totalram; - if (si.mem_unit > 1) - t *= (uint64_t)si.mem_unit; -} -return t; -]])]) - -AC_MSG_CHECKING([for sysinfo]) -AC_COMPILE_IFELSE([HAVE_SYSINFO_SRC], - [AC_MSG_RESULT([yes]) - HAVE_SYSINFO=YesPlease], - [AC_MSG_RESULT([no]) - HAVE_SYSINFO=]) -GIT_CONF_SUBST([HAVE_SYSINFO]) - # # Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available. GIT_CHECK_FUNC(clock_gettime, @@ -1221,6 +1195,41 @@ AC_COMPILE_IFELSE([BSD_SYSCTL_SRC], HAVE_BSD_SYSCTL=]) GIT_CONF_SUBST([HAVE_BSD_SYSCTL]) +# +# Define HAVE_SYSINFO=YesPlease if sysinfo is available. +# + +HAVE_SYSINFO= +# on a *BSD system, sysctl() takes precedence over the +# sysinfo() compatibility library (if installed). + +if test -z "$HAVE_BSD_SYSCTL"; then + + AC_DEFUN([HAVE_SYSINFO_SRC], [ + AC_LANG_PROGRAM([[ + #include <stdint.h> + #include <sys/sysinfo.h> + ]], [[ + struct sysinfo si; + uint64_t t = 0; + if (!sysinfo(&si)) { + t = si.totalram; + if (si.mem_unit > 1) + t *= (uint64_t)si.mem_unit; + } + return t; + ]])]) + + AC_MSG_CHECKING([for sysinfo]) + AC_COMPILE_IFELSE([HAVE_SYSINFO_SRC], + [AC_MSG_RESULT([yes]) + HAVE_SYSINFO=YesPlease], + [AC_MSG_RESULT([no]) + HAVE_SYSINFO=]) + GIT_CONF_SUBST([HAVE_SYSINFO]) + +fi + ## Other checks. # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link. # Enable it on Windows. By default, symrefs are still used. diff --git a/meson.build b/meson.build index 7fea4a34d6..355cad730c 100644 --- a/meson.build +++ b/meson.build @@ -1331,10 +1331,6 @@ if host_machine.system() != 'windows' endif endif -if compiler.has_member('struct sysinfo', 'totalram', prefix: '#include <sys/sysinfo.h>') - libgit_c_args += '-DHAVE_SYSINFO' -endif - if compiler.has_member('struct stat', 'st_mtimespec.tv_nsec', prefix: '#include <sys/stat.h>') libgit_c_args += '-DUSE_ST_TIMESPEC' elif not compiler.has_member('struct stat', 'st_mtim.tv_nsec', prefix: '#include <sys/stat.h>') @@ -1449,6 +1445,12 @@ if compiler.has_header('sys/sysctl.h') endif endif +if not has_bsd_sysctl + if compiler.has_member('struct sysinfo', 'totalram', prefix: '#include <sys/sysinfo.h>') + libgit_c_args += '-DHAVE_SYSINFO' + endif +endif + if not meson.is_cross_build() and compiler.run(''' #include <stdio.h> -- 2.50.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-01 20:03 ` Ramsay Jones @ 2025-07-02 11:28 ` Renato Botelho 2025-07-02 17:08 ` Junio C Hamano 2025-07-02 22:33 ` Ramsay Jones 2025-07-02 18:32 ` Eli Schwartz 1 sibling, 2 replies; 14+ messages in thread From: Renato Botelho @ 2025-07-02 11:28 UTC (permalink / raw) To: Ramsay Jones; +Cc: Patrick Steinhardt, Junio C Hamano, GIT Mailing-list On 01/07/25 17:03, Ramsay Jones wrote: > > > On 01/07/2025 17:05, Renato Botelho wrote: >> On 23/06/25 11:09, Renato Botelho wrote: >>> FreeBSD has a libsysinfo package which contains GNU libc's sysinfo port. Some users reported git 2.50.0 was failing to build when this port is installed and it happened because configure script detected libsysinfo but -lsysinfo was not added to LDFLAGS, ending up with following error: >>> >>> scalar.o common-main.o libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lz -pthread >>> ld: error: undefined symbol: sysinfo >>> >>> This patch [1] was added to git port adding a user option to enable/ disable libsysinfo dependency and fix LDFLAGS when it's enabled. >>> >>> I'm not sure about what is best approach for git project in this case. >>> >>> [1] https://github.com/freebsd/freebsd-ports/blob/main/devel/git/files/ patch-configure.ac >> >> If someone let me know what would be the desired approach here I can work on a patch. Would you like to make that option conditional as the patch did? Or detect if OS is FreeBSD and do something different? >> > > Ah, Sorry for the late reply, but I was away ... :) > > Hmm, I can think of several approaches we could take, but I can't test any > of them (since I don't have access to a FreeBSD system). > > - it would not be difficult to add a 'library-check' to the configure.ac > file, so that '-lsysinfo' would be added to the link. (We would also > have to make a similar change to meson.build). However, I don't think > this is the right solution; I'm guessing that the compat sysinfo library > is implemented in terms of sysctl() anyway, so ... > > - we could simply change the order of the preprocessor conditionals in > 'builtin/gc.c' L530-541 so that the 'HAVE_SYSINFO' block comes after > the 'HAVE_BSD_SYSCTL' block. (BTW, I assume that the HW_ symbols are > defined whenever the 'sysinfo compat library' is installed; i.e. old > versions of FreeBSD which don't define them are also too old to support > the compat library). > > - we could suppress the setting of HAVE_SYSINFO if HAVE_BSD_SYSCTL has > been defined (in both configure.ac and meson.build). > > I very quickly knocked up a patch to do the last option above (I moved > the setting of HAVE_SYSINFO down the file rather that HAVE_BSD_SYSCTL > up. I guess it doesn't matter, but I gave it *no* thought!). > > The patch is below. (I didn't write a commit message ;) ). > > Does this work for you? Your patch works just fine for FreeBSD. I tried it with libsysinfo installed and it just ignored it, as expected. I didn't test meson build since FreeBSD ports is based on autotools yet. BTW, should I start moving the port to meson? Is it the default build method now? Is there a plan to remove autotools? Thank you! -- Renato Botelho ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-02 11:28 ` Renato Botelho @ 2025-07-02 17:08 ` Junio C Hamano 2025-07-02 19:48 ` Renato Botelho 2025-07-02 22:33 ` Ramsay Jones 1 sibling, 1 reply; 14+ messages in thread From: Junio C Hamano @ 2025-07-02 17:08 UTC (permalink / raw) To: Renato Botelho; +Cc: Ramsay Jones, Patrick Steinhardt, GIT Mailing-list Renato Botelho <garga@FreeBSD.org> writes: >> I very quickly knocked up a patch to do the last option above (I >> moved >> the setting of HAVE_SYSINFO down the file rather that HAVE_BSD_SYSCTL >> up. I guess it doesn't matter, but I gave it *no* thought!). >> The patch is below. (I didn't write a commit message ;) ). >> Does this work for you? > > Your patch works just fine for FreeBSD. I tried it with libsysinfo > installed and it just ignored it, as expected. > > I didn't test meson build since FreeBSD ports is based on autotools yet. > > BTW, should I start moving the port to meson? Is it the default build > method now? Is there a plan to remove autotools? > > Thank you! So we have a bit of loose end that needs a finishing touch, but otherwise we are good to go? Thanks, both. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-02 17:08 ` Junio C Hamano @ 2025-07-02 19:48 ` Renato Botelho 2025-07-02 22:37 ` Ramsay Jones 0 siblings, 1 reply; 14+ messages in thread From: Renato Botelho @ 2025-07-02 19:48 UTC (permalink / raw) To: Junio C Hamano; +Cc: Ramsay Jones, Patrick Steinhardt, GIT Mailing-list On 02/07/25 14:08, Junio C Hamano wrote: > Renato Botelho <garga@FreeBSD.org> writes: > >>> I very quickly knocked up a patch to do the last option above (I >>> moved >>> the setting of HAVE_SYSINFO down the file rather that HAVE_BSD_SYSCTL >>> up. I guess it doesn't matter, but I gave it *no* thought!). >>> The patch is below. (I didn't write a commit message ;) ). >>> Does this work for you? >> >> Your patch works just fine for FreeBSD. I tried it with libsysinfo >> installed and it just ignored it, as expected. >> >> I didn't test meson build since FreeBSD ports is based on autotools yet. >> >> BTW, should I start moving the port to meson? Is it the default build >> method now? Is there a plan to remove autotools? >> >> Thank you! > > So we have a bit of loose end that needs a finishing touch, but > otherwise we are good to go? From my side, yes. -- Renato Botelho ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-02 19:48 ` Renato Botelho @ 2025-07-02 22:37 ` Ramsay Jones 2025-07-02 23:08 ` Junio C Hamano 0 siblings, 1 reply; 14+ messages in thread From: Ramsay Jones @ 2025-07-02 22:37 UTC (permalink / raw) To: Renato Botelho, Junio C Hamano; +Cc: Patrick Steinhardt, GIT Mailing-list On 02/07/2025 20:48, Renato Botelho wrote: > On 02/07/25 14:08, Junio C Hamano wrote: >> Renato Botelho <garga@FreeBSD.org> writes: >> >>>> I very quickly knocked up a patch to do the last option above (I >>>> moved >>>> the setting of HAVE_SYSINFO down the file rather that HAVE_BSD_SYSCTL >>>> up. I guess it doesn't matter, but I gave it *no* thought!). >>>> The patch is below. (I didn't write a commit message ;) ). >>>> Does this work for you? >>> >>> Your patch works just fine for FreeBSD. I tried it with libsysinfo >>> installed and it just ignored it, as expected. >>> >>> I didn't test meson build since FreeBSD ports is based on autotools yet. >>> >>> BTW, should I start moving the port to meson? Is it the default build >>> method now? Is there a plan to remove autotools? >>> >>> Thank you! >> >> So we have a bit of loose end that needs a finishing touch, but >> otherwise we are good to go? > From my side, yes. OK, I will write a commit message and submit the patch to the list some time soon (I'm a little busy atm, sorry!). ATB, Ramsay Jones ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-02 22:37 ` Ramsay Jones @ 2025-07-02 23:08 ` Junio C Hamano 0 siblings, 0 replies; 14+ messages in thread From: Junio C Hamano @ 2025-07-02 23:08 UTC (permalink / raw) To: Ramsay Jones; +Cc: Renato Botelho, Patrick Steinhardt, GIT Mailing-list Ramsay Jones <ramsay@ramsayjones.plus.com> writes: >>> So we have a bit of loose end that needs a finishing touch, but >>> otherwise we are good to go? >> From my side, yes. > > OK, I will write a commit message and submit the patch to the list > some time soon (I'm a little busy atm, sorry!). No need to hurry, and thank you very much. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-02 11:28 ` Renato Botelho 2025-07-02 17:08 ` Junio C Hamano @ 2025-07-02 22:33 ` Ramsay Jones 2025-07-03 8:40 ` Patrick Steinhardt 1 sibling, 1 reply; 14+ messages in thread From: Ramsay Jones @ 2025-07-02 22:33 UTC (permalink / raw) To: Renato Botelho; +Cc: Patrick Steinhardt, Junio C Hamano, GIT Mailing-list On 02/07/2025 12:28, Renato Botelho wrote: > On 01/07/25 17:03, Ramsay Jones wrote: [snip] >> The patch is below. (I didn't write a commit message ;) ). >> >> Does this work for you? > > Your patch works just fine for FreeBSD. I tried it with libsysinfo installed and it just ignored it, as expected. Thank you very much for testing this, much appreciated! > I didn't test meson build since FreeBSD ports is based on autotools yet. OK, no problem. > BTW, should I start moving the port to meson? Is it the default build method now? The git project only provides source code (i.e. the project does not produce any binary distribution packages). So, each 'distributor' can use whatever tools they prefer to create their packages. [A long time ago, we had some support for producing Red Hat and Debian packages (if my memory serves me correctly), but that didn't last long!] If such a thing as a 'default build method' exists, then I would say that the Makefile (without configure) is it! (Meson is the *latest* build system used in the project, not the default). > Is there a plan to remove autotools? At present there are no such plans. ATB, Ramsay Jones ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-02 22:33 ` Ramsay Jones @ 2025-07-03 8:40 ` Patrick Steinhardt 2025-07-03 12:35 ` Renato Botelho 0 siblings, 1 reply; 14+ messages in thread From: Patrick Steinhardt @ 2025-07-03 8:40 UTC (permalink / raw) To: Ramsay Jones; +Cc: Renato Botelho, Junio C Hamano, GIT Mailing-list On Wed, Jul 02, 2025 at 11:33:23PM +0100, Ramsay Jones wrote: > On 02/07/2025 12:28, Renato Botelho wrote: > > On 01/07/25 17:03, Ramsay Jones wrote: > [snip] > > BTW, should I start moving the port to meson? Is it the default build method now? > > The git project only provides source code (i.e. the project does not > produce any binary distribution packages). So, each 'distributor' can > use whatever tools they prefer to create their packages. > > [A long time ago, we had some support for producing Red Hat and Debian > packages (if my memory serves me correctly), but that didn't last long!] > > If such a thing as a 'default build method' exists, then I would say that > the Makefile (without configure) is it! (Meson is the *latest* build system > used in the project, not the default). Right now Meson is still considered experimental, as there are still some things missing compared to our Makefiles. I will address those missing pieces this release cycle, and once done our Makefile and Meson build instructions will both be considered officially supported ways to build Git. > > Is there a plan to remove autotools? > > At present there are no such plans. There are no plans to remove our Makefile right now, but there is intent to remove autotools once Meson reaches feature parity with our Makefile. It will probably still be a couple releases before that happens, and we of course still have to make the final decision to actually go through with the removal. But it likely is to happen in the not-too-distant future. Patrick ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-03 8:40 ` Patrick Steinhardt @ 2025-07-03 12:35 ` Renato Botelho 2025-07-03 13:02 ` Patrick Steinhardt 0 siblings, 1 reply; 14+ messages in thread From: Renato Botelho @ 2025-07-03 12:35 UTC (permalink / raw) To: Patrick Steinhardt, Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list On 03/07/25 05:40, Patrick Steinhardt wrote: > On Wed, Jul 02, 2025 at 11:33:23PM +0100, Ramsay Jones wrote: >> On 02/07/2025 12:28, Renato Botelho wrote: >>> On 01/07/25 17:03, Ramsay Jones wrote: >> [snip] >>> BTW, should I start moving the port to meson? Is it the default build method now? >> >> The git project only provides source code (i.e. the project does not >> produce any binary distribution packages). So, each 'distributor' can >> use whatever tools they prefer to create their packages. >> >> [A long time ago, we had some support for producing Red Hat and Debian >> packages (if my memory serves me correctly), but that didn't last long!] >> >> If such a thing as a 'default build method' exists, then I would say that >> the Makefile (without configure) is it! (Meson is the *latest* build system >> used in the project, not the default). > > Right now Meson is still considered experimental, as there are still > some things missing compared to our Makefiles. I will address those > missing pieces this release cycle, and once done our Makefile and Meson > build instructions will both be considered officially supported ways to > build Git. > >>> Is there a plan to remove autotools? >> >> At present there are no such plans. > > There are no plans to remove our Makefile right now, but there is intent > to remove autotools once Meson reaches feature parity with our Makefile. > It will probably still be a couple releases before that happens, and we > of course still have to make the final decision to actually go through > with the removal. But it likely is to happen in the not-too-distant > future. Thank you for the explanation. I'll keep an eye on the announcements and as soon as meson is considered "feature-complete" I'll start experimenting with it on FreeBSD ports to be ready to flip the switch when the time comes. -- Renato Botelho ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-03 12:35 ` Renato Botelho @ 2025-07-03 13:02 ` Patrick Steinhardt 0 siblings, 0 replies; 14+ messages in thread From: Patrick Steinhardt @ 2025-07-03 13:02 UTC (permalink / raw) To: Renato Botelho; +Cc: Ramsay Jones, Junio C Hamano, GIT Mailing-list On Thu, Jul 03, 2025 at 09:35:47AM -0300, Renato Botelho wrote: > On 03/07/25 05:40, Patrick Steinhardt wrote: > > There are no plans to remove our Makefile right now, but there is intent > > to remove autotools once Meson reaches feature parity with our Makefile. > > It will probably still be a couple releases before that happens, and we > > of course still have to make the final decision to actually go through > > with the removal. But it likely is to happen in the not-too-distant > > future. > > Thank you for the explanation. I'll keep an eye on the announcements and as > soon as meson is considered "feature-complete" I'll start experimenting with > it on FreeBSD ports to be ready to flip the switch when the time comes. Thanks, that would be highly appreciated. The more testing we get from different platforms the more solid it becomes :) Patrick ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Bug: build is broken on FreeBSD if libsysinfo is installed 2025-07-01 20:03 ` Ramsay Jones 2025-07-02 11:28 ` Renato Botelho @ 2025-07-02 18:32 ` Eli Schwartz 1 sibling, 0 replies; 14+ messages in thread From: Eli Schwartz @ 2025-07-02 18:32 UTC (permalink / raw) To: Ramsay Jones, Renato Botelho Cc: Patrick Steinhardt, Junio C Hamano, GIT Mailing-list [-- Attachment #1.1: Type: text/plain, Size: 1796 bytes --] On 7/1/25 4:03 PM, Ramsay Jones wrote: > The patch is below. (I didn't write a commit message ;) ). > > Does this work for you? > > ATB, > Ramsay Jones > > ---- >8 ---- > From: Ramsay Jones <ramsay@ramsayjones.plus.com> > Date: Tue, 1 Jul 2025 20:33:44 +0100 > Subject: [PATCH] build: fix FreeBSD sysinfo build failure > > Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> > --- > configure.ac | 61 ++++++++++++++++++++++++++++++---------------------- > meson.build | 10 +++++---- > 2 files changed, 41 insertions(+), 30 deletions(-) > diff --git a/meson.build b/meson.build > index 7fea4a34d6..355cad730c 100644 > --- a/meson.build > +++ b/meson.build > @@ -1331,10 +1331,6 @@ if host_machine.system() != 'windows' > endif > endif > > -if compiler.has_member('struct sysinfo', 'totalram', prefix: '#include <sys/sysinfo.h>') > - libgit_c_args += '-DHAVE_SYSINFO' > -endif > - > if compiler.has_member('struct stat', 'st_mtimespec.tv_nsec', prefix: '#include <sys/stat.h>') > libgit_c_args += '-DUSE_ST_TIMESPEC' > elif not compiler.has_member('struct stat', 'st_mtim.tv_nsec', prefix: '#include <sys/stat.h>') > @@ -1449,6 +1445,12 @@ if compiler.has_header('sys/sysctl.h') > endif > endif > > +if not has_bsd_sysctl > + if compiler.has_member('struct sysinfo', 'totalram', prefix: '#include <sys/sysinfo.h>') > + libgit_c_args += '-DHAVE_SYSINFO' > + endif > +endif > + > if not meson.is_cross_build() and compiler.run(''' > #include <stdio.h> This seems reasonable to me. has_member only does a compile-check, not linkage, so we can't know if it's a BSD port. Only using it when a previously checked interface can't be found, lets us avoid doing extraneous work though. -- Eli Schwartz [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 236 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-07-03 13:02 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-23 14:09 Bug: build is broken on FreeBSD if libsysinfo is installed Renato Botelho 2025-07-01 16:05 ` Renato Botelho 2025-07-01 20:03 ` Eric Sunshine 2025-07-01 20:03 ` Ramsay Jones 2025-07-02 11:28 ` Renato Botelho 2025-07-02 17:08 ` Junio C Hamano 2025-07-02 19:48 ` Renato Botelho 2025-07-02 22:37 ` Ramsay Jones 2025-07-02 23:08 ` Junio C Hamano 2025-07-02 22:33 ` Ramsay Jones 2025-07-03 8:40 ` Patrick Steinhardt 2025-07-03 12:35 ` Renato Botelho 2025-07-03 13:02 ` Patrick Steinhardt 2025-07-02 18:32 ` Eli Schwartz
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).