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,即master的HEAD )都失败了
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由于
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
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来确定。
发布于 2019-01-23 00:31:58
尝试应用这个补丁。它是一个OpenEmbedded生成的上游补丁的后端。
发布于 2018-12-08 15:36:15
如果您想要从源构建m4,那么首先从存储库获取其构建依赖关系:
software-properties-gtk)中启用源代码m4二进制包获得必要的构建依赖关系( sudo - get build m4 )m4二进制包的源代码(包含Debian和/或Ubuntu提供的所有所需修补程序):apt-get源m4 cd m4-*https://askubuntu.com/questions/1099392
复制相似问题