【问题】
折腾:
【记录】在Cygwin上用Buildroot为xscale建立交叉工具链
期间,已经解决了:
【已解决】Cygwin下make编译Buildroot出错:./stdio.h:477:66: error: missing binary operator before token "("
但是接着又出现了错误:
make[4]: Entering directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16/lib' /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT clean-temp.o -MD -MP -MF .deps/clean-temp.Tpo -c -o clean-temp.o clean-temp.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT freadahead.o -MD -MP -MF .deps/freadahead.Tpo -c -o freadahead.o freadahead.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT freading.o -MD -MP -MF .deps/freading.Tpo -c -o freading.o freading.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT gl_linkedhash_list.o -MD -MP -MF .deps/gl_linkedhash_list.Tpo -c -o gl_linkedhash_list.o gl_linkedhash_list.c mv -f .deps/gl_linkedhash_list.Tpo .deps/gl_linkedhash_list.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT gl_list.o -MD -MP -MF .deps/gl_list.Tpo -c -o gl_list.o gl_list.c mv -f .deps/gl_list.Tpo .deps/gl_list.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT localcharset.o -MD -MP -MF .deps/localcharset.Tpo -c -o localcharset.o localcharset.c mv -f .deps/freading.Tpo .deps/freading.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT lock.o -MD -MP -MF .deps/lock.Tpo -c -o lock.o `test -f 'glthread/lock.c' || echo './'`glthread/lock.c mv -f .deps/freadahead.Tpo .deps/freadahead.Po mv -f .deps/lock.Tpo .deps/lock.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT malloca.o -MD -MP -MF .deps/malloca.Tpo -c -o malloca.o malloca.c mv -f .deps/clean-temp.Tpo .deps/clean-temp.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT memchr2.o -MD -MP -MF .deps/memchr2.Tpo -c -o memchr2.o memchr2.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT gl_oset.o -MD -MP -MF .deps/gl_oset.Tpo -c -o gl_oset.o gl_oset.c mv -f .deps/malloca.Tpo .deps/malloca.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT pipe2.o -MD -MP -MF .deps/pipe2.Tpo -c -o pipe2.o pipe2.c mv -f .deps/gl_oset.Tpo .deps/gl_oset.Po mv -f .deps/memchr2.Tpo .deps/memchr2.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT pipe2-safer.o -MD -MP -MF .deps/pipe2-safer.Tpo -c -o pipe2-safer.o pipe2-safer.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT printf-frexp.o -MD -MP -MF .deps/printf-frexp.Tpo -c -o printf-frexp.o printf-frexp.c mv -f .deps/pipe2-safer.Tpo .deps/pipe2-safer.Po mv -f .deps/printf-frexp.Tpo .deps/printf-frexp.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT printf-frexpl.o -MD -MP -MF .deps/printf-frexpl.Tpo -c -o printf-frexpl.o printf-frexpl.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT progname.o -MD -MP -MF .deps/progname.Tpo -c -o progname.o progname.c mv -f .deps/localcharset.Tpo .deps/localcharset.Po mv -f .deps/printf-frexpl.Tpo .deps/printf-frexpl.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT spawn-pipe.o -MD -MP -MF .deps/spawn-pipe.Tpo -c -o spawn-pipe.o spawn-pipe.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT threadlib.o -MD -MP -MF .deps/threadlib.Tpo -c -o threadlib.o `test -f 'glthread/threadlib.c' || echo './'`glthread/threadlib.c mv -f .deps/spawn-pipe.Tpo .deps/spawn-pipe.Po mv -f .deps/pipe2.Tpo .deps/pipe2.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT tls.o -MD -MP -MF .deps/tls.Tpo -c -o tls.o `test -f 'glthread/tls.c' || echo './'`glthread/tls.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT tmpdir.o -MD -MP -MF .deps/tmpdir.Tpo -c -o tmpdir.o tmpdir.c mv -f .deps/threadlib.Tpo .deps/threadlib.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT verror.o -MD -MP -MF .deps/verror.Tpo -c -o verror.o verror.c mv -f .deps/verror.Tpo .deps/verror.Po mv -f .deps/tls.Tpo .deps/tls.Po mv -f .deps/progname.Tpo .deps/progname.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT version-etc.o -MD -MP -MF .deps/version-etc.Tpo -c -o version-etc.o version-etc.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT version-etc-fsf.o -MD -MP -MF .deps/version-etc-fsf.Tpo -c -o version-etc-fsf.o version-etc-fsf.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT wait-process.o -MD -MP -MF .deps/wait-process.Tpo -c -o wait-process.o wait-process.c mv -f .deps/wait-process.Tpo .deps/wait-process.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT xalloc-die.o -MD -MP -MF .deps/xalloc-die.Tpo -c -o xalloc-die.o xalloc-die.c mv -f .deps/tmpdir.Tpo .deps/tmpdir.Po mv -f .deps/xalloc-die.Tpo .deps/xalloc-die.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT gl_xlist.o -MD -MP -MF .deps/gl_xlist.Tpo -c -o gl_xlist.o gl_xlist.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT xmalloca.o -MD -MP -MF .deps/xmalloca.Tpo -c -o xmalloca.o xmalloca.c mv -f .deps/version-etc-fsf.Tpo .deps/version-etc-fsf.Po mv -f .deps/xmalloca.Tpo .deps/xmalloca.Po mv -f .deps/gl_xlist.Tpo .deps/gl_xlist.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT gl_xoset.o -MD -MP -MF .deps/gl_xoset.Tpo -c -o gl_xoset.o gl_xoset.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT xprintf.o -MD -MP -MF .deps/xprintf.Tpo -c -o xprintf.o xprintf.c mv -f .deps/version-etc.Tpo .deps/version-etc.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT xstrndup.o -MD -MP -MF .deps/xstrndup.Tpo -c -o xstrndup.o xstrndup.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT xvasprintf.o -MD -MP -MF .deps/xvasprintf.Tpo -c -o xvasprintf.o xvasprintf.c mv -f .deps/gl_xoset.Tpo .deps/gl_xoset.Po mv -f .deps/xstrndup.Tpo .deps/xstrndup.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT xasprintf.o -MD -MP -MF .deps/xasprintf.Tpo -c -o xasprintf.o xasprintf.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT asnprintf.o -MD -MP -MF .deps/asnprintf.Tpo -c -o asnprintf.o asnprintf.c mv -f .deps/xasprintf.Tpo .deps/xasprintf.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT asprintf.o -MD -MP -MF .deps/asprintf.Tpo -c -o asprintf.o asprintf.c mv -f .deps/asnprintf.Tpo .deps/asnprintf.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT basename.o -MD -MP -MF .deps/basename.Tpo -c -o basename.o basename.c mv -f .deps/xprintf.Tpo .deps/xprintf.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT basename-lgpl.o -MD -MP -MF .deps/basename-lgpl.Tpo -c -o basename-lgpl.o basename-lgpl.c mv -f .deps/basename.Tpo .deps/basename.Po mv -f .deps/xvasprintf.Tpo .deps/xvasprintf.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT cloexec.o -MD -MP -MF .deps/cloexec.Tpo -c -o cloexec.o cloexec.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT close-stream.o -MD -MP -MF .deps/close-stream.Tpo -c -o close-stream.o close-stream.c mv -f .deps/basename-lgpl.Tpo .deps/basename-lgpl.Po mv -f .deps/cloexec.Tpo .deps/cloexec.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT closein.o -MD -MP -MF .deps/closein.Tpo -c -o closein.o closein.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT closeout.o -MD -MP -MF .deps/closeout.Tpo -c -o closeout.o closeout.c mv -f .deps/asprintf.Tpo .deps/asprintf.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT dirname.o -MD -MP -MF .deps/dirname.Tpo -c -o dirname.o dirname.c mv -f .deps/dirname.Tpo .deps/dirname.Po mv -f .deps/close-stream.Tpo .deps/close-stream.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT dirname-lgpl.o -MD -MP -MF .deps/dirname-lgpl.Tpo -c -o dirname-lgpl.o dirname-lgpl.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT dup-safer.o -MD -MP -MF .deps/dup-safer.Tpo -c -o dup-safer.o dup-safer.c mv -f .deps/dirname-lgpl.Tpo .deps/dirname-lgpl.Po mv -f .deps/dup-safer.Tpo .deps/dup-safer.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT fd-safer.o -MD -MP -MF .deps/fd-safer.Tpo -c -o fd-safer.o fd-safer.c mv -f .deps/closeout.Tpo .deps/closeout.Po mv -f .deps/closein.Tpo .deps/closein.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT filenamecat.o -MD -MP -MF .deps/filenamecat.Tpo -c -o filenamecat.o filenamecat.c mv -f .deps/fd-safer.Tpo .deps/fd-safer.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT filenamecat-lgpl.o -MD -MP -MF .deps/filenamecat-lgpl.Tpo -c -o filenamecat-lgpl.o filenamecat-lgpl.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT fopen-safer.o -MD -MP -MF .deps/fopen-safer.Tpo -c -o fopen-safer.o fopen-safer.c /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT fpending.o -MD -MP -MF .deps/fpending.Tpo -c -o fpending.o fpending.c mv -f .deps/filenamecat.Tpo .deps/filenamecat.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT frexpl.o -MD -MP -MF .deps/frexpl.Tpo -c -o frexpl.o frexpl.c mv -f .deps/filenamecat-lgpl.Tpo .deps/filenamecat-lgpl.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT isnanl.o -MD -MP -MF .deps/isnanl.Tpo -c -o isnanl.o isnanl.c mv -f .deps/frexpl.Tpo .deps/frexpl.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT mkstemp-safer.o -MD -MP -MF .deps/mkstemp-safer.Tpo -c -o mkstemp-safer.o mkstemp-safer.c mv -f .deps/isnanl.Tpo .deps/isnanl.Po /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include -MT obstack.o -MD -MP -MF .deps/obstack.Tpo -c -o obstack.o obstack.c mv -f .deps/mkstemp-safer.Tpo .deps/mkstemp-safer.Po fpending.c:27:1: error: redefinition of '__fpending' In file included from fpending.h:30:0, from fpending.c:22: /usr/include/stdio_ext.h:47:1: note: previous definition of '__fpending' was here make[4]: *** [fpending.o] Error 1 make[4]: *** Waiting for unfinished jobs.... mv -f .deps/fopen-safer.Tpo .deps/fopen-safer.Po mv -f .deps/obstack.Tpo .deps/obstack.Po make[4]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16/lib' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16' make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16/.stamp_built] Error 2 CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05 $
如图:
即:
/usr/include/stdio_ext.h:47:1: note: previous definition of ‘__fpending’ was here |
【解决过程】
1.去看了看对应文件:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\lib\fpending.c
包含:
#include "fpending.h" /* Return the number of pending (aka buffered, unflushed) bytes on the stream, FP, that is open for writing. */ size_t __fpending (FILE *fp) { return PENDING_OUTPUT_N_BYTES; }
然后:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\lib\fpending.h
包含:
#include <stddef.h> #include <stdio.h> #ifndef HAVE_DECL___FPENDING "this configure-time declaration test was not run" #endif #if HAVE_DECL___FPENDING # if HAVE_STDIO_EXT_H # include <stdio_ext.h> # endif #else size_t __fpending (FILE *); #endif
而对应的
/usr/include/stdio_ext.h: |
估计是stdio.h所包含进来的。
2.另外,关于__fpending,也查到了:
http://www.delorie.com/gnu/docs/glibc/libc_226.html
中的解释:
|
3.然后去查查
HAVE_DECL___FPENDING
(和 HAVE_STDIO_EXT_H )
是干啥的。
然后参考:
得知,这个是cygwin中的bug,是由于gnulib有问题导致的。
而gnulib后续版本已解决此问题。
但是此刻,貌似只能通过手动定义 HAVE_DECL___FPENDING而解决此问题?
4.参考:
去修改:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\lib\fpending.h
改为:
#include <stddef.h> #include <stdio.h> #if HAVE_STDIO_EXT_H # include <stdio_ext.h> #endif //#ifndef HAVE_DECL___FPENDING //"this configure-time declaration test was not run" //#endif //#if HAVE_DECL___FPENDING //# if HAVE_STDIO_EXT_H //# include <stdio_ext.h> //# endif //#else #ifndef __fpending size_t __fpending (FILE *); #endif
然后去编译试试,结果错误依旧。
5.想到了,去make clean后再make,看看相关的m4的的configure时,关于__fpending输出是啥。
然后后来搜到了,相关的之前看到的那个makefile:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\Makefile.in
中的:
$(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpending.m4 \
然后再去看:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\output\build\host-m4-1.4.16\m4\fpending.m4
看到有:
dnl Find out how to determine the number of pending output bytes on a stream. dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems, dnl we have to grub around in the FILE struct. AC_DEFUN([gl_FUNC_FPENDING], [ AC_CHECK_HEADERS_ONCE([stdio_ext.h]) AC_CHECK_FUNCS_ONCE([__fpending]) fp_headers=' # include <stdio.h> # if HAVE_STDIO_EXT_H # include <stdio_ext.h> # endif ' AC_CHECK_DECLS([__fpending], , , $fp_headers) if test $ac_cv_func___fpending = no; then
所以,重新参考之前的:
重新修改,结果改着改着,发现不太对劲,因为涉及到生成makefile之前的,configure阶段之前的,内容的修改,
而此处在make编译出错后,configure就已完成,所以无法影响到之前的configure的过程。
所以,感觉是需要:
重新针对当前patch的内容,尝试制作出针对于当前的
m4-1.4.16.tar.bz2
的源码,去制作出对应的补丁。
然后再把补丁,放到对应的buildroot中(针对于m4)打补丁的地方去。
这样才可以实现,完整的,buildroot去解压源码,打上此处自己制作的补丁,然后才能configure,其中包含了正确检测fpending的内容,然后后续才能正常的编译。
6.然后就是去参考:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\m4\m4-1.4.16-no-gets.patch
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\m4\m4-1.4.16-001-MB_CUR_MAX.patch
去制作对应的patch:
【记录】尝试为了Buildroot编译期间涉及到的m4-1.4.16的fpending在Cygwin下的问题去制作diff和patch补丁包
7.已经弄出一个,估计也不能用,但是可以先去试试的一个patch文件:
m4-1.4.16-fpending.patch
然后看看,如何添加到Buildroot的逻辑中。
参考了:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\pkg-generic.mk
中的:
# Patch # # The RAWNAME variable is the lowercased package name, which allows to # find the package directory (typically package/<pkgname>) and the # prefix of the patches $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) $(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME) $(BUILD_DIR)/%/.stamp_patched: @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)") $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) $(foreach p,$($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $(p)$(sep)) $(Q)( \ for D in $(PATCH_BASE_DIRS); do \ if test -d $${D}; then \ if test -d $${D}/$($(PKG)_VERSION); then \ support/scripts/apply-patches.sh $(@D) $${D}/$($(PKG)_VERSION) \*.patch \*.patch.$(ARCH) || exit 1; \ else \ support/scripts/apply-patches.sh $(@D) $${D} \*.patch \*.patch.$(ARCH) || exit 1; \ fi; \ fi; \ done; \ ) $(foreach hook,$($(PKG)_POST_PATCH_HOOKS),$(call $(hook))$(sep)) $(Q)touch $@
没完全看懂,但是感觉像是把patch文件:
m4-1.4.16-fpending.patch
其已经符合package name和版本号的前提下,将其放到对应的:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\m4
应该就可以自动去打上对应的patch了。
所以去试试:
make clean -> 以便删除所有的,包括m4解压的(之前打过别的patch的)内容。
再去make -> 估计或许会由于上述的patch内容有误,而无法正常执行的。
看到其中输出是:
>>> host-m4 1.4.16 Extracting bzcat /home/CLi/develop/buildroot/buildroot-2013.05/dl/m4-1.4.16.tar.bz2 | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16 -xf - >>> host-m4 1.4.16 Patching package//m4 Applying m4-1.4.16-001-MB_CUR_MAX.patch using patch: patching file lib/regcomp.c Hunk #1 succeeded at 887 (offset 16 lines). Applying m4-1.4.16-no-gets.patch using patch: patching file lib/stdio.in.h >>> host-m4 1.4.16 Updating config.sub and config.guess for file in config.guess config.sub; do for i in $(find /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16 -name $file); do cp support/gnuconfig/$file $i; done; done >>> host-m4 1.4.16 Patching libtool >>> host-m4 1.4.16 Configuring
很明显,是没用到我的path文件。
8.然后才注意到,当前根本没把m4-1.4.16-fpending.patch放到:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\m4
里面。。。。
所以,去确认,放过去。
然后重新执行一遍:
make clean再make:
make clean & make
然后看到输出,有打上自己的patch了:
>>> host-m4 1.4.16 Extracting bzcat /home/CLi/develop/buildroot/buildroot-2013.05/dl/m4-1.4.16.tar.bz2 | tar --strip-components=1 -C /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16 -xf - >>> host-m4 1.4.16 Patching package//m4 Applying m4-1.4.16-001-MB_CUR_MAX.patch using patch: patching file lib/regcomp.c Hunk #1 succeeded at 887 (offset 16 lines). Applying m4-1.4.16-fpending.patch using patch: patching file ChangeLog patching file lib/fpending.h patching file m4/fpending.m4 Applying m4-1.4.16-no-gets.patch using patch: patching file lib/stdio.in.h >>> host-m4 1.4.16 Updating config.sub and config.guess for file in config.guess config.sub; do for i in $(find /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16 -name $file); do cp support/gnuconfig/$file $i; done; done >>> host-m4 1.4.16 Patching libtool >>> host-m4 1.4.16 Configuring
所以,说明之前的理解和猜测是对的:
只要符合
包名-版本名-xxx.patch
放到了对应的package/包名 路径下,是可以被执行到的。
9.而此处,对应的m4的configure过程中的输出是:
>>> host-m4 1.4.16 Configuring (cd /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16/ && rm -rf config.cache; PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/bin:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin:/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include:/opt/gcc-4.0.4-glibc-2.3.6-kernel-2.6.17/sysroot-arm-xscale-linux-gnu/usr/include/linux" AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm" CC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc" GCC="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc" CXX="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/g++" CPP="/usr/bin/cpp" CPPFLAGS="-I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" CXXFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/pkgconfig:/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/share/pkgconfig" PERLLIB="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/include" LDFLAGS="-L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/lib -L/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib -Wl,-rpath,/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/lib" ./configure --prefix="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr" --sysconfdir="/home/CLi/develop/buildroot/buildroot-2013.05/output/host/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-static ) configure: WARNING: unrecognized options: --enable-shared, --disable-static, --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop, --disable-static checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc accepts -g... yes checking for /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc... gcc3 checking for ranlib... ranlib checking whether /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc and cc understand -c and -o together... yes checking build system type... i686-pc-cygwin checking host system type... i686-pc-cygwin checking how to run the C preprocessor... /usr/bin/cpp checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for _LARGEFILE_SOURCE value needed for large files... no checking for /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc option to accept ISO C99... -std=gnu99 checking for /home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99 configure: autobuild project... GNU M4 configure: autobuild revision... 1.4.16 configure: autobuild hostname... PC-CLI-1 configure: autobuild timestamp... 20130828T061535Z checking for unsigned long long int... yes checking for long long int... yes checking for unsigned long long int... (cached) yes checking for working alloca.h... yes checking for alloca... yes checking whether <wchar.h> uses 'inline' correctly... yes checking for btowc... yes checking for setrlimit... yes checking for sigaltstack... no checking for canonicalize_file_name... yes checking for getcwd... yes checking for readlink... yes checking for realpath... yes checking for dup2... yes checking for fcntl... yes checking for mempcpy... yes checking for __fpending... no checking for fpurge... yes checking for __fpurge... yes checking for __freading... no checking for getdtablesize... yes checking for gettimeofday... yes checking for lstat... yes checking for mbsinit... yes checking for mbrtowc... yes checking for mprotect... yes checking for memchr... yes checking for mkstemp... yes checking for nl_langinfo... yes checking for pathconf... yes checking for pipe2... yes checking for posix_spawn... no checking for isblank... yes checking for iswctype... yes checking for wcscoll... yes checking for sigaction... yes checking for siginterrupt... yes checking for strndup... yes checking for pipe... yes checking for vasnprintf... yes checking for wcrtomb... yes checking for iswcntrl... yes checking for link... yes checking for newlocale... no checking for setenv... yes checking for strdup... yes checking for symlink... yes checking for wctob... yes checking for nl_langinfo and CODESET... yes checking for a traditional french locale... fr_FR.ISO-8859-1 checking for ucontext.h... no checking for unistd.h... (cached) yes checking for sys/param.h... yes checking for stdio_ext.h... yes checking for getopt.h... yes checking for sys/time.h... yes checking for langinfo.h... yes checking for math.h... yes checking for sys/mman.h... yes checking for sched.h... yes checking for spawn.h... no checking for wchar.h... yes checking for stdint.h... (cached) yes checking for sys/socket.h... yes checking for sys/stat.h... (cached) yes checking for sys/wait.h... yes checking for features.h... yes checking for wctype.h... yes checking for xlocale.h... no checking for working C stack overflow detection... no checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for libsigsegv... yes checking how to link with libsigsegv... -lsigsegv checking whether // is distinct from /... yes checking whether realpath works... yes checking if environ is properly declared... yes checking whether the preprocessor supports include_next... yes checking whether system header files limit the line length... no checking for complete errno.h... yes checking whether strerror_r is declared... yes checking for strerror_r... yes checking whether strerror_r returns char *... yes checking for inline... inline checking for mode_t... yes checking for sig_atomic_t... yes checking for working fcntl.h... yes checking for fseeko... yes checking whether frexp() can be used without linking with libm... yes checking whether stdin defaults to large file offsets... yes checking whether fseeko is declared... yes checking whether ftello is declared... yes checking for getopt.h... (cached) yes checking for getopt_long_only... yes checking whether getopt is POSIX compatible... yes checking for working GNU getopt function... yes checking whether getenv is declared... yes checking for C/C++ restrict keyword... __restrict checking for struct timeval... yes noecking where to find the exponent in a 'float'... word 0 bit 23 checking whether getc_unlocked is declared... yes checking whether we are using the GNU C Library >= 2.1 or uClibc... no checking for multithread API to use... none checking whether lstat correctly handles trailing slash... yes checking whether malloc, realloc, calloc are POSIX compliant... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for mbstate_t... yes checking for a traditional japanese locale... ja_JP.EUC-JP checking for a transitional chinese locale... none checking for a french Unicode locale... fr_FR.UTF-8 checking for mmap... yes checking for MAP_ANONYMOUS... yes checking whether memchr works... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for promoted mode_t type... mode_t checking for uid_t in sys/types.h... yes checking whether snprintf returns a byte count as in C99... yes checking whether snprintf is declared... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for wchar_t... yes checking for working strerror function... yes checking whether strndup is declared... yes checking whether strnlen is declared... yes checking whether strsignal is declared... yes checking whether sys_siglist is declared... yes checking whether strstr works... yes checking whether strtod is declared... yes checking whether ldexp() can be used without linking with libm... yes checking whether stat file-mode macros are broken... no checking for struct timespec in <time.h>... yes checking whether clearerr_unlocked is declared... no checking whether feof_unlocked is declared... no checking whether ferror_unlocked is declared... no checking whether fflush_unlocked is declared... no checking whether fgets_unlocked is declared... no checking whether fputc_unlocked is declared... no checking whether fputs_unlocked is declared... no checking whether fread_unlocked is declared... no checking whether fwrite_unlocked is declared... no checking whether getchar_unlocked is declared... yes checking whether putc_unlocked is declared... yes checking whether putchar_unlocked is declared... yes checking for wint_t... yes checking for size_t... yes checking for inttypes.h... yes checking for stdint.h... yes checking for intmax_t... yes checking for snprintf... yes checking for strnlen... yes checking for wcslen... yes checking for wcsnlen... yes checking for mbrtowc... (cached) yes checking for wcrtomb... (cached) yes checking whether _snprintf is declared... no checking whether printf supports size specifiers as in C99... yes checking whether printf supports 'long double' arguments... yes checking whether printf supports infinite 'double' arguments... yes checking whether printf supports infinite 'long double' arguments... no checking whether printf supports the 'a' and 'A' directives... yes checking whether printf supports the 'F' directive... yes checking whether printf supports the 'n' directive... yes checking whether printf supports the 'ls' directive... yes checking whether printf supports POSIX/XSI format strings with positions... yes checking whether printf supports the grouping flag... yes checking whether printf supports the left-adjust flag correctly... yes checking whether printf supports the zero flag correctly... yes checking whether printf supports large precisions... yes checking whether printf survives out-of-memory conditions... guessing no checking whether to use C++... no checking whether ungetc works on arbitrary bytes... yes checking for LC_MESSAGES... yes checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking whether setenv is declared... yes checking whether setenv validates arguments... yes checking search.h usability... yes checking search.h presence... yes checking for search.h... yes checking for tsearch... yes checking whether strdup is declared... yes checking whether alarm is declared... yes checking whether unsetenv is declared... yes checking for alloca as a compiler built-in... yes checking whether to enable assertions... yes checking whether btowc(0) is correct... yes checking whether btowc(EOF) is correct... yes checking whether sigaltstack is declared... no checking for stack_t... no checking whether // is distinct from /... (cached) yes checking whether dup2 works... yes checking for error_at_line... yes checking whether fcntl handles F_DUPFD correctly... yes checking whether fcntl understands F_DUPFD_CLOEXEC... yes checking whether fflush works on input streams... yes checking whether fopen recognizes a trailing slash... yes checking whether __fpending is declared... yes checking how to determine the number of pending output bytes on a stream... fp->_p - fp->_bf._base checking whether fpurge is declared... yes checking whether fpurge works... yes checking whether frexp works... yes checking whether frexpl is declared... no checking for ftello... yes checking whether ftello works... yes checking whether gettimeofday clobbers localtime buffer... no checking for gettimeofday with POSIX signature... yes checking whether the compiler generally respects inline... yes checking whether isnan(double) can be used without linking with libm... yes checking whether isnan(float) can be used without linking with libm... yes checking whether isnan(float) works... yes checking whether isnan(long double) can be used without linking with libm... yes checking whether isnanl works... no checking where to find the exponent in a 'long double'... word 2 bit 0 checking whether langinfo.h defines CODESET... yes checking whether langinfo.h defines T_FMT_AMPM... yes checking whether langinfo.h defines ERA... yes checking whether langinfo.h defines YESEXPR... yes checking for libsigsegv... (cached) yes checking how to link with libsigsegv... -lsigsegv checking whether lseek detects pipes... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... (cached) yes checking whether NAN macro works... yes checking whether HUGE_VAL works... yes checking whether mbrtowc handles incomplete characters... yes checking whether mbrtowc works as well as mbtowc... guessing yes checking whether mbrtowc handles a NULL pwc argument... yes checking whether mbrtowc handles a NULL string argument... yes checking whether mbrtowc has a correct return value... yes checking whether mbrtowc returns 0 when parsing a NUL character... guessing yes checking whether mbrtowc handles incomplete characters... (cached) yes checking whether mbrtowc works as well as mbtowc... (cached) guessing yes checking for mkdtemp... yes checking for working mkstemp... yes checking whether YESEXPR works... yes checking for obstacks... no checking whether open recognizes a trailing slash... yes checking paths.h usability... yes checking paths.h presence... yes checking for paths.h... yes checking for confstr... yes checking for sched_setparam... yes checking for sched_setscheduler... yes checking for setegid... yes checking for seteuid... yes checking for vfork... yes checking whether frexp works... (cached) yes checking whether ldexp can be used without linking with libm... (cached) yes checking whether frexpl() can be used without linking with libm... no checking whether ldexpl() can be used without linking with libm... no checking whether program_invocation_name is declared... yes checking whether program_invocation_short_name is declared... yes checking for rawmemchr... yes checking whether readlink signature is correct... yes checking whether readlink handles trailing slash correctly... yes checking for working re_compile_pattern... no checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking whether isblank is declared... yes checking whether rename honors trailing slash on destination... yes checking whether rename honors trailing slash on source... yes checking whether rename manages hard links correctly... yes checking whether rename manages existing destinations correctly... yes checking whether rmdir works... yes checking for struct sigaction.sa_sigaction... yes checking for volatile sig_atomic_t... yes checking for signbit macro... yes checking for signbit compiler built-ins... yes checking for sigprocmask... yes checking for stdint.h... (cached) yes checking for SIZE_MAX... yes checking for snprintf... (cached) yes checking whether snprintf respects a size of 1... yes checking for ssize_t... yes checking whether stat handles trailing slashes on directories... yes checking whether stat handles trailing slashes on files... yes checking for va_copy... yes checking whether NULL can be used in arbitrary expressions... yes checking whether stdint.h conforms to C99... yes checking for strchrnul... yes checking for working strndup... yes checking for working strnlen... yes checking for strsignal... yes checking whether strsignal always returns a string... yes checking whether strstr works in linear time... yes checking whether strstr works... (cached) yes checking whether strtod obeys C99... no checking for strtol... yes checking for nlink_t... yes checking for __secure_getenv... no checking for vasprintf... yes checking for vasprintf... (cached) yes checking for ptrdiff_t... yes checking for waitid... no checking whether mbrtowc handles incomplete characters... (cached) yes checking whether mbrtowc works as well as mbtowc... (cached) guessing yes checking whether wcrtomb return value is correct... yes checking whether iswcntrl works... yes checking for wctype_t... yes checking for wctrans_t... yes checking for stdint.h... (cached) yes checking for a traditional french locale... (cached) fr_FR.ISO-8859-1 checking for a french Unicode locale... (cached) fr_FR.UTF-8 checking for a traditional french locale... (cached) fr_FR.ISO-8859-1 checking for a turkish Unicode locale... none checking for getpagesize... yes checking whether getpagesize is declared... yes checking where to find the exponent in a 'double'... word 1 bit 20 checking where to find the exponent in a 'float'... (cached) word 0 bit 23 checking where to find the exponent in a 'long double'... (cached) word 2 bit 0 checking whether link handles trailing slash correctly... yes checking whether locale.h conforms to POSIX:2001... yes checking for setlocale... yes checking for uselocale... no checking for a traditional french locale... (cached) fr_FR.ISO-8859-1 checking for a french Unicode locale... (cached) fr_FR.UTF-8 checking for a traditional japanese locale... (cached) ja_JP.EUC-JP checking for a transitional chinese locale... (cached) none checking for a french Unicode locale... (cached) fr_FR.UTF-8 checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking for a traditional french locale... (cached) fr_FR.ISO-8859-1 checking for a french Unicode locale... (cached) fr_FR.UTF-8 checking for putenv compatible with GNU and SVID... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking for a traditional french locale... (cached) fr_FR.ISO-8859-1 checking for a french Unicode locale... (cached) fr_FR.UTF-8 checking for a traditional japanese locale... (cached) ja_JP.EUC-JP checking for a transitional chinese locale... (cached) none checking for wchar_t... (cached) yes checking for wint_t... (cached) yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking for mmap... (cached) yes checking for MAP_ANONYMOUS... yes checking whether symlink handles trailing slash correctly... yes checking for unsetenv... yes checking for unsetenv() return type... int checking whether unsetenv obeys POSIX... yes checking for a traditional french locale... (cached) fr_FR.ISO-8859-1 checking for a french Unicode locale... (cached) fr_FR.UTF-8 checking for a traditional japanese locale... (cached) ja_JP.EUC-JP checking for a transitional chinese locale... (cached) none checking whether wctob works... yes checking whether wctob is declared... yes checking whether an open file can be renamed... yes checking if changeword is wanted... no checking which shell to use for syscmd... /bin/sh checking if malloc debugging is wanted... no configure: creating ./config.status config.status: creating Makefile config.status: creating doc/Makefile config.status: creating lib/Makefile config.status: creating src/Makefile config.status: creating tests/Makefile config.status: creating checks/Makefile config.status: creating examples/Makefile config.status: creating lib/config.h config.status: executing depfiles commands config.status: executing stamp-h commands configure: WARNING: unrecognized options: --enable-shared, --disable-static, --disable-gtk-doc, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --with-fop, --disable-static
其中和fpending相关的是:
checking for __fpending… no checking whether __fpending is declared… yes |
但是接下来的去编译,结果检测到了我修改后的fpending.m4有问题:
make[1]: Entering directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16' CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16/build-aux/missing --run aclocal-1.11 -I m4 /usr/bin/m4:m4/fpending.m4:16: ERROR: end of file in argument list autom4te-2.69: /usr/bin/m4 failed with exit status: 1 aclocal-1.11: autom4te failed with exit status: 1 make[1]: *** [aclocal.m4] Error 1 make[1]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16' make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/build/host-m4-1.4.16/.stamp_built] Error 2 [1]+ Exit 2 make clean
所以,感觉还是要想办法,去搞清楚,如何修改那个
fpending.m4
才行。
10.注意到,m4-1.4.16对应的m4/fpending.m4是:
# serial 15 |
的,然后网上很多找到都是更低版本的,比如:
http://stuff.mit.edu/afs/sipb/user/ssen/src/coreutils-5.2.1/m4/fpending.m4
的#serial 3
http://old.nabble.com/Re%3A-fpending-issues-on-LSB-p6532069.html
的:
-#serial 9 |
后来终于找到一个高版本的:
# serial 19 |
的fpending.m4:
所以,参考其内容,去修改当前的fpending.m4。
即,先把serial 19的内容拿过来,然后再参考:
去修改,最后为:
# serial 19 # Copyright (C) 2000-2001, 2004-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. dnl From Jim Meyering dnl Using code from emacs, based on suggestions from Paul Eggert dnl and Ulrich Drepper. dnl Find out how to determine the number of pending output bytes on a stream. dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems, dnl we have to grub around in the FILE struct. dnl Crifan Li do some update according to dnl http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00030.html AC_DEFUN([gl_FUNC_FPENDING], [ AC_CHECK_HEADERS_ONCE([stdio_ext.h]) AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <stdio.h> #if HAVE_STDIO_EXT_H # include <stdio_ext.h> #endif ]], [[return ! __fpending (stdin);]])], [gl_cv_func___fpending=yes], [gl_cv_func___fpending=no]) ]) ]) AC_DEFUN([gl_PREREQ_FPENDING], [ AC_CACHE_CHECK( [how to determine the number of pending output bytes on a stream], ac_cv_sys_pending_output_n_bytes, [ for ac_expr in \ \ '# glibc2' \ 'fp->_IO_write_ptr - fp->_IO_write_base' \ \ '# traditional Unix' \ 'fp->_ptr - fp->_base' \ \ '# BSD' \ 'fp->_p - fp->_bf._base' \ \ '# SCO, Unixware' \ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ \ '# QNX' \ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ \ '# old glibc?' \ 'fp->__bufp - fp->__buffer' \ \ '# old glibc iostream?' \ 'fp->_pptr - fp->_pbase' \ \ '# emx+gcc' \ 'fp->_ptr - fp->_buffer' \ \ '# Minix' \ 'fp->_ptr - fp->_buf' \ \ '# Plan9' \ 'fp->wp - fp->buf' \ \ '# VMS' \ '(*fp)->_ptr - (*fp)->_base' \ \ '# e.g., DGUX R4.11; the info is not available' \ 1 \ ; do # Skip each embedded comment. case "$ac_expr" in '#'*) continue;; esac AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[FILE *fp = stdin; (void) ($ac_expr);]])], [fp_done=yes] ) test "$fp_done" = yes && break done ac_cv_sys_pending_output_n_bytes=$ac_expr ] ) AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES], $ac_cv_sys_pending_output_n_bytes, [the number of pending output bytes on stream 'fp']) ])
然后再回去:
【记录】尝试为了Buildroot编译期间涉及到的m4-1.4.16的fpending在Cygwin下的问题去制作diff和patch补丁包
去制作patch:
m4-1.4.16-no-fpending-redefinition.patch
11.把m4-1.4.16-no-fpending-redefinition.patch拷贝到:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\m4
且删除之前的:
m4-1.4.16-fpending.patch
重新去make clean。
另外,此处为了直接解决后面的错误:
【已解决】Cygwin下make编译Buildroot出错:./stdio.h:477:66: error: missing binary operator before token "("
而直接去修改了此处的:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\m4\m4-1.4.16-no-gets.patch
结果还改出问题了:
【已解决】patch打补丁时出错:patch: **** malformed patch at line
然后就解决了所有的问题了。
Buildroot可以正常编译了。
【总结】
此处,cygwin下make编译Buildroot,期间会去编译m4,结果出现:
/usr/include/stdio_ext.h:47:1: note: previous definition of ‘__fpending’ was here |
的错误,
原因是:
此处的(gnulib中的)m4有bug,导致无法正常检测出来环境变量中,已经定义的__fpending,导致后续的:
m4-1.4.16/lib/fpending.h
(Buildroot编译期间,已变成:
host-m4-1.4.16/lib/fpending.h
)中的:
#include <stddef.h> #include <stdio.h> #ifndef HAVE_DECL___FPENDING "this configure-time declaration test was not run" #endif #if HAVE_DECL___FPENDING # if HAVE_STDIO_EXT_H # include <stdio_ext.h> # endif #else size_t __fpending (FILE *); #endif
由于HAVE_DECL___FPENDING为0,而使得重新定义了__fpending,导致报错。
解决办法是:
其实本来是可以直接手动简单的修改此处的
host-m4-1.4.16/lib/fpending.h
但是,很明显,不是好做法。
好的做法是:
找到根本出错的原因:
m4中,有几处需要修改,才能使得,此处不会出现__fpending重定义的问题。
对应的改动,我已经通过:
【记录】尝试为了Buildroot编译期间涉及到的m4-1.4.16的fpending在Cygwin下的问题去制作diff和patch补丁包
去做成了patch了:
m4-1.4.16-no-__fpending-redefine.patch
放到Buildroot中,合适的位置,即:
package\m4\
下面,此处的物理路径是:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\m4\m4-1.4.16-no-__fpending-redefine.patch
patch文件的内容为:
diff -purN host-m4-1.4.16.orig/ChangeLog host-m4-1.4.16/ChangeLog --- host-m4-1.4.16.orig/ChangeLog 2011-03-02 02:39:40.000000000 +0800 +++ host-m4-1.4.16/ChangeLog 2013-08-28 13:25:09.128914000 +0800 @@ -1,3 +1,8 @@ +2013-08-28 Crifan Li <[email protected]> + + maint: merge Paul Eggert's bugfix for v1.7.11.7 to current version + * fpending: http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00030.html + 2011-03-01 Eric Blake <[email protected]> Release Version 1.4.16. diff -purN host-m4-1.4.16.orig/lib/fpending.h host-m4-1.4.16/lib/fpending.h --- host-m4-1.4.16.orig/lib/fpending.h 2011-03-02 00:39:27.000000000 +0800 +++ host-m4-1.4.16/lib/fpending.h 2013-08-28 13:26:14.216914000 +0800 @@ -20,15 +20,10 @@ #include <stddef.h> #include <stdio.h> - -#ifndef HAVE_DECL___FPENDING -"this configure-time declaration test was not run" +#if HAVE_STDIO_EXT_H +# include <stdio_ext.h> #endif -#if HAVE_DECL___FPENDING -# if HAVE_STDIO_EXT_H -# include <stdio_ext.h> -# endif -#else +#ifndef __fpending size_t __fpending (FILE *); #endif diff -purN host-m4-1.4.16.orig/m4/fpending.m4 host-m4-1.4.16/m4/fpending.m4 --- host-m4-1.4.16.orig/m4/fpending.m4 2011-03-02 00:39:30.000000000 +0800 +++ host-m4-1.4.16/m4/fpending.m4 2013-08-28 14:36:20.664237800 +0800 @@ -1,6 +1,6 @@ -# serial 15 +# serial 19 -# Copyright (C) 2000-2001, 2004-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2004-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,72 +12,86 @@ dnl and Ulrich Drepper. dnl Find out how to determine the number of pending output bytes on a stream. dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems, dnl we have to grub around in the FILE struct. +dnl Crifan Li do some update according to +dnl http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00030.html AC_DEFUN([gl_FUNC_FPENDING], [ AC_CHECK_HEADERS_ONCE([stdio_ext.h]) - AC_CHECK_FUNCS_ONCE([__fpending]) - fp_headers=' -# include <stdio.h> -# if HAVE_STDIO_EXT_H -# include <stdio_ext.h> -# endif -' - AC_CHECK_DECLS([__fpending], , , $fp_headers) - if test $ac_cv_func___fpending = no; then - AC_CACHE_CHECK( + AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <stdio.h> + #if HAVE_STDIO_EXT_H + # include <stdio_ext.h> + #endif + ]], + [[return ! __fpending (stdin);]])], + [gl_cv_func___fpending=yes], + [gl_cv_func___fpending=no]) + ]) +]) + +AC_DEFUN([gl_PREREQ_FPENDING], +[ + AC_CACHE_CHECK( [how to determine the number of pending output bytes on a stream], - ac_cv_sys_pending_output_n_bytes, - [ - for ac_expr in \ - \ - '# glibc2' \ - 'fp->_IO_write_ptr - fp->_IO_write_base' \ - \ - '# traditional Unix' \ - 'fp->_ptr - fp->_base' \ - \ - '# BSD' \ - 'fp->_p - fp->_bf._base' \ - \ - '# SCO, Unixware' \ - '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ - \ - '# QNX' \ - '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ - \ - '# old glibc?' \ - 'fp->__bufp - fp->__buffer' \ - \ - '# old glibc iostream?' \ - 'fp->_pptr - fp->_pbase' \ - \ - '# emx+gcc' \ - 'fp->_ptr - fp->_buffer' \ - \ - '# VMS' \ - '(*fp)->_ptr - (*fp)->_base' \ - \ - '# e.g., DGUX R4.11; the info is not available' \ - 1 \ - ; do - - # Skip each embedded comment. - case "$ac_expr" in '#'*) continue;; esac - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], - [[FILE *fp = stdin; (void) ($ac_expr);]])], - [fp_done=yes] - ) - test "$fp_done" = yes && break - done - - ac_cv_sys_pending_output_n_bytes=$ac_expr - ] - ) - AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES], - $ac_cv_sys_pending_output_n_bytes, - [the number of pending output bytes on stream `fp']) - AC_LIBOBJ([fpending]) - fi + ac_cv_sys_pending_output_n_bytes, + [ + for ac_expr in \ + \ + '# glibc2' \ + 'fp->_IO_write_ptr - fp->_IO_write_base' \ + \ + '# traditional Unix' \ + 'fp->_ptr - fp->_base' \ + \ + '# BSD' \ + 'fp->_p - fp->_bf._base' \ + \ + '# SCO, Unixware' \ + '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ + \ + '# QNX' \ + '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ + \ + '# old glibc?' \ + 'fp->__bufp - fp->__buffer' \ + \ + '# old glibc iostream?' \ + 'fp->_pptr - fp->_pbase' \ + \ + '# emx+gcc' \ + 'fp->_ptr - fp->_buffer' \ + \ + '# Minix' \ + 'fp->_ptr - fp->_buf' \ + \ + '# Plan9' \ + 'fp->wp - fp->buf' \ + \ + '# VMS' \ + '(*fp)->_ptr - (*fp)->_base' \ + \ + '# e.g., DGUX R4.11; the info is not available' \ + 1 \ + ; do + + # Skip each embedded comment. + case "$ac_expr" in '#'*) continue;; esac + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], + [[FILE *fp = stdin; (void) ($ac_expr);]])], + [fp_done=yes] + ) + test "$fp_done" = yes && break + done + + ac_cv_sys_pending_output_n_bytes=$ac_expr + ] + ) + AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES], + $ac_cv_sys_pending_output_n_bytes, + [the number of pending output bytes on stream 'fp']) ])
然后,重新去编译buildroot,即:
make clean
后,再去
make
即可。
Buildroot会自动重新解压
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\dl\m4-1.4.16.tar.bz2
自动将:
D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\buildroot\buildroot-2013.05\package\m4\
中的patch都打上,然后就修复了此问题。
后续就可以继续正常编译m4了。
才算彻底的解决此问题。
感慨:
搞定这个问题,花了我大半天时间,真的是涉及到千头万绪的事情,尤其是:
(1)搞清楚此处的fpending所需要做如何修改,这种事情,只能参考网络,一点点收集出来,相对还是很麻烦的。
(2)后面的,搞懂Buildroot的patch等方面的逻辑,用diff制作出正确的patch,相对不难,但是也是要很细心,和清除diff和patch的细节,才可以的。
转载请注明:在路上 » 【已解决】Cygwin下make编译Buildroot期间编译m4-1.4.16出错:/usr/include/stdio_ext.h:47:1: note: previous definition of ‘__fpending’ was here