Hi Ian, Thanks for following up on this, comments below.
Ian Lance Taylor <i...@golang.org> wrote: > I see uses of loff_t but I don't see any uses of off64_t. The off64_t type is used for defining Offset_t: https://github.com/golang/gofrontend/blob/4bdff733a0c2a9ddc3eff104b1be03df058a79c4/libgo/mksysinfo.sh#L406-L410 On musl, _HAVE_OFF64_T is defined since autoconf doesn't mind it being defined as a macro but -fdump-go-spec does, hence you end up with the following compilation error (even with your patch applied): sysinfo.go:7896:15: error: use of undefined type '_off64_t' 7896 | type Offset_t _off64_t > We don't have to treat loff_t differently based on whether it is a > macro, we can just use a different name. Sounds good to me. > Does this patch work for you? Apart from off64_t stuff, there is only one minor issue (see below). > index 7e2b98ba6..487099a33 100644 > --- a/libgo/configure.ac > +++ b/libgo/configure.ac > @@ -579,7 +579,7 @@ AC_C_BIGENDIAN > + > +CFLAGS_hold="$CFLAGS" > +CFLAGS="$OSCFLAGS $CFLAGS" > AC_CHECK_TYPES([loff_t]) > +CFLAGS="$CFLAGS_hold" The AC_CHECK_TYPES invocation is missing an include of fcntl.h (which defines loff_t in musl) and as such fails and causes libgo compilation to fail with "reference to undefined name '_libgo_loff_t_type'" as HAVE_LOFF_T is not defined. The invocation needs to be changed to: AC_CHECK_TYPES([loff_t], [], [], [[#include <fcntl.h>]]) and this needs to be adjusted accordingly in configure as well. Sincerely, Sören