build error with glibc > 2.28 in m4-1.4.18/lib/freadahead.c

Marius Hasselbach <[email protected]>
Newsgroups gmane.comp.gnu.m4.bugs
Message-ID <DB8PR03MB617186B4752B13751A580429F4970@DB8PR03MB6171.eurprd03.prod.outlook.com>
Hello,

in order to build sedutil (https://github.com/ChubbyAnt/sedutil) on 
Fedora 30 I encountered a build error in m4-1.4.18.


Error Message:

freadahead.c: In function 'freadahead':
freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to 
your platform! Look at the definition of fflush, fread, ungetc on your 
system, then report this to bug-gnulib."
    92 |  #error "Please port gnulib freadahead.c to your platform! Look 
at the definition of fflush, fread, ungetc on your system, then report 
this to bug-gnulib."
       |   ^~~~~
   CC       mbrtowc.o
make[5]: *** [Makefile:1915: freadahead.o] Error 1
make[5]: *** Waiting for unfinished jobs....
fseeko.c: In function 'rpl_fseeko':
fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your 
platform! Look at the code in fseeko.c, then report this to bug-gnulib."
   110 |   #error "Please port gnulib fseeko.c to your platform! Look at 
the code in fseeko.c, then report this to bug-gnulib."
       |    ^~~~~
make[5]: *** [Makefile:1915: fseeko.o] Error 1
make[4]: *** [Makefile:1674: all] Error 2
make[3]: *** [Makefile:1572: all-recursive] Error 1
make[2]: *** [Makefile:1528: all] Error 2
make[1]: *** [package/pkg-generic.mk:230: 
/home/relentless/Playground/sedutil/images/scratch/buildroot/64bit/build/host-m4-1.4.18/.stamp_built] 
Error 2
make: *** [Makefile:79: _all] Error 2


This error occurs because I have glibc-2.29 installed on my Fedora 30 
system instead of glibc-2.27 on e.g. Ubuntu 18.04 LTS.

Apparently this is a known issue introduced by a change in glibc-2.28. I 
guess it can be patched similar to these two commits in gnulib.

https://github.com/coreutils/gnulib/commit/4af4a4a71827c0bc5e0ec67af23edef4f15cee8e#diff-5bcce8ce55246264586c4aed2a45ff89

https://github.com/coreutils/gnulib/commit/74d9d6a293d7462dea8f83e7fc5ac792e956a0ad#diff-5bcce8ce55246264586c4aed2a45ff89


Although I am very new two building from source, I hope I can could help.

Best regards,
Marius
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.