[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: [Buildroot & ArchLinux] can not build host-m4 on mac
From: |
郑 祎 |
Subject: |
Re: address@hidden: [Buildroot & ArchLinux] can not build host-m4 on machine with glibc-2.28 installed] |
Date: |
Wed, 8 Aug 2018 21:36:51 +0800 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
lib/freadahead.c Not OK:
freadahead.c:32:26: error: '_IO_IN_BACKUP' undeclared (first use in this
function)
I just fix it by my own patch.
diff -upr a/lib/freadahead.c b/lib/freadahead.c
--- a/lib/freadahead.c 2016-12-31 21:54:41.000000000 +0800
+++ b/lib/freadahead.c 2018-08-08 16:12:40.522952171 +0800
@@ -25,7 +25,13 @@
size_t
freadahead (FILE *fp)
{
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+#if defined __GNU_LIBRARY__ && __GLIBC_PREREQ(2, 28)
+ /* NOTE: */
+ /* glibc-2.28 removed /usr/include/bits/libio.h. */
+ /* The internal symbols not avaliable */
+ return 0;
+
+#elif defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
if (fp->_IO_write_ptr > fp->_IO_write_base)
return 0;
return (fp->_IO_read_end - fp->_IO_read_ptr)
diff -upr a/lib/fseeko.c b/lib/fseeko.c
--- a/lib/fseeko.c 2016-12-31 21:54:41.000000000 +0800
+++ b/lib/fseeko.c 2018-08-08 16:13:12.399618677 +0800
@@ -47,7 +47,14 @@ fseeko (FILE *fp, off_t offset, int when
#endif
/* These tests are based on fpurge.c. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+#if defined __GNU_LIBRARY__ && __GLIBC_PREREQ(2, 28)
+ /* NOTE: */
+ /* glibc-2.28 removed /usr/include/bits/libio.h. */
+ /* The internal symbols not avaliable */
+ if (fp->_IO_read_end == fp->_IO_read_ptr
+ && fp->_IO_write_ptr == fp->_IO_write_base
+ && fp->_IO_save_base == NULL)
+#elif defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
On 2018-08-08 07:33:13, Eric Blake wrote:
> Date: Wed, 8 Aug 2018 07:33:13 -0500
> From: Eric Blake <address@hidden>
> To: 郑 祎 <address@hidden>, address@hidden
> Subject: Re: address@hidden: [Buildroot & ArchLinux] can not build
> host-m4 on machine with glibc-2.28 installed]
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
> Thunderbird/52.8.0
>
> On 08/07/2018 10:45 PM, 郑 祎 wrote:
> > ----- Forwarded message from 郑 祎 <address@hidden> -----
> >
> > Date: Wed, 8 Aug 2018 11:15:02 +0800
> > From: 郑 祎 <address@hidden>
> > To: Gustavo Zacarias <address@hidden>
> > Cc: Peter Korsgaard <address@hidden>, Allan McRae <address@hidden>
> > Subject: [Buildroot & ArchLinux] can not build host-m4 on machine with
> > glibc-2.28 installed
> > User-Agent: Mutt/1.10.1 (2018-07-13)
> >
> > Hi,
> >
> > I found that failure and do some hacking.
> >
> > (1) m4 source, lib/freadahead.c: It use the internal symbols to guess
> > the C runtime lib's type.
>
> Known issue; will be fixed by the next release of m4. In the meantime, you
> can manually apply the gnulib patch mentioned here:
>
> https://lists.gnu.org/archive/html/bug-m4/2018-08/msg00000.html
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
--
Brock Zheng <address@hidden>
郑 祎
北京中科腾越科技发展有限公司
北京市海淀区东北旺西路8号中关村软件园21号楼启明星辰大厦二层六区(邮编:100094)