首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >编译m4 1.4.10到1.4.18失败的原因是“请将gnulib freadahead.c .c移植到您的平台上!”关于Ubuntu 18.10

编译m4 1.4.10到1.4.18失败的原因是“请将gnulib freadahead.c .c移植到您的平台上!”关于Ubuntu 18.10
EN

Ask Ubuntu用户
提问于 2018-12-08 15:26:23
回答 2查看 27.3K关注 0票数 9

m4 1.4.10到1.4.18版本的tarball版本的构建(没有测试所有修补程序版本,但我假设此范围内的错误是一致的)与./configure && make -j1和带有./bootstrap && ./configure && make -j1的git git存储库http://git.savannah.gnu.org/r/m4.git (commit cvs-readonly-359-gd69fa528,即masterHEAD )都失败了

代码语言:javascript
复制
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."
  #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."
   ^~~~~
make[3]: *** [Makefile:1910: freadahead.o] Error 1
make[3]: Leaving directory '/mnt/data/sources/m4-1.4.18/lib'

我对这个错误感到非常困惑,根据谷歌表面搜索的结果,问题是太长时间被忽视的上游更新的结果,例如https://bugzilla.redhat.com/show_bug.cgi?id=1573342与修复的天才文档“感谢错误报告,修复!”--如果这对其他人没有帮助.

我尝试从源代码构建glibc,并将其安装到自定义前缀1中。2.28和2.27展示了同样的问题,而2.26由于

代码语言:javascript
复制
make[2]: Verzeichnis „/mnt/data/sources/glibc-2.26/inet“ wird betreten
gcc ../sysdeps/unix/sysv/linux/if_index.c -c -std=gnu11 -fgnu89-inline  -O2 -Wall -Werror -Wundef -Wwrite-strings -fmerge-all-constants -fno-stack-protector -frounding-math -g -Wstrict-prototypes -Wold-style-definition     -ftls-model=initial-exec   -U_FORTIFY_SOURCE   -I../include -I/mnt/data/sources/glibc-2.26-build/inet  -I/mnt/data/sources/glibc-2.26-build  -I../sysdeps/unix/sysv/linux/x86_64/64  -I../sysdeps/unix/sysv/linux/x86_64  -I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/x86/nptl  -I../sysdeps/unix/sysv/linux/wordsize-64  -I../sysdeps/x86_64/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/x86_64  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/x86_64/64  -I../sysdeps/x86_64/fpu/multiarch  -I../sysdeps/x86_64/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu  -I../sysdeps/x86_64/multiarch  -I../sysdeps/x86_64  -I../sysdeps/x86  -I../sysdeps/ieee754/float128  -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64/wordsize-64  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/wordsize-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I.   -D_LIBC_REENTRANT -include /mnt/data/sources/glibc-2.26-build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC     -DTOP_NAMESPACE=glibc -o /mnt/data/sources/glibc-2.26-build/inet/if_index.o -MD -MP -MF /mnt/data/sources/glibc-2.26-build/inet/if_index.o.dt -MT /mnt/data/sources/glibc-2.26-build/inet/if_index.o
../sysdeps/unix/sysv/linux/if_index.c: In function ‘__if_nametoindex’:
../sysdeps/unix/sysv/linux/if_index.c:46:3: error: ‘strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
   strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [/mnt/data/sources/glibc-2.26-build/sysd-rules:213: /mnt/data/sources/glibc-2.26-build/inet/if_index.o] Fehler 1
make[2]: Verzeichnis „/mnt/data/sources/glibc-2.26/inet“ wird verlassen
make[1]: *** [Makefile:215: inet/subdir_lib] Fehler 2
make[1]: Verzeichnis „/mnt/data/sources/glibc-2.26“ wird verlassen
make: *** [Makefile:9: all] Fehler 2

和2.25

代码语言:javascript
复制
strftime_l.c: In function ‘__strftime_internal’:
strftime_l.c:719:4: error: macro expands to multiple statements [-Werror=multistatement-macros]
    digits = d > width ? d : width;          \
    ^~~~~~
strftime_l.c:1260:6: note: in expansion of macro ‘DO_NUMBER’
      DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE);
      ^~~~~~~~~
strftime_l.c:1259:4: note: some parts of macro expansion are not guarded by this ‘else’ clause
    else
    ^~~~
In file included from wcsftime_l.c:23:
strftime_l.c: In function ‘__strftime_internal’:
strftime_l.c:719:4: error: macro expands to multiple statements [-Werror=multistatement-macros]
    digits = d > width ? d : width;          \
    ^~~~~~
strftime_l.c:1260:6: note: in expansion of macro ‘DO_NUMBER’
      DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE);
      ^~~~~~~~~
strftime_l.c:1259:4: note: some parts of macro expansion are not guarded by this ‘else’ clause
    else
    ^~~~
cc1: all warnings being treated as errors
make[2]: *** [../o-iterator.mk:9: /mnt/data/sources/glibc-2.25-build/time/strftime_l.os] Fehler 1

这让我决定不再尝试更多的版本。

关于财务报告中类似问题的讨论建议从最新的gnulib源根覆盖freadahead.{c,h}。这会导致一连串的问题,因为我不知道自己在做什么,所以没有必要在这里文档化。

如何开始修复、报告和/或解决这一问题?

我正在为用户没有特权使用包管理器的系统构建一个引导脚本,从源代码中构建m4。我真正感兴趣的只是从发布源tarball构建原始的GNU m4。

https://gitlab.com/krichter/m4/pipelines/36977411上提供了在其他类似裸系统上构建结果的概述。

如果您正在调查这个问题,1总是将glibc安装到自定义前缀中,因为默认前缀/usr/local中的安装肯定会破坏您的系统。考虑使用checkinstall来确定。

EN

回答 2

Ask Ubuntu用户

发布于 2019-01-23 00:31:58

尝试应用这个补丁。它是一个OpenEmbedded生成的上游补丁的后端。

票数 5
EN

Ask Ubuntu用户

发布于 2018-12-08 15:36:15

如果您想要从源构建m4,那么首先从存储库获取其构建依赖关系:

  1. 在软件和更新(software-properties-gtk)中启用源代码
  2. 安装所需的构建工具
  3. 为当前的m4二进制包获得必要的构建依赖关系( sudo - get build m4 )
  4. 获取当前m4二进制包的源代码(包含Debian和/或Ubuntu提供的所有所需修补程序):apt-get源m4 cd m4-*
  5. 然后像往常一样编译它。
票数 4
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1099392

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档