【已解决】cygwin下用arm-xscale-linux-gnueabi-gcc交叉编译xmlrpc出错:xmltok.c:83:10: error: ‘namingBitmap’ undeclared (first use in this function)

【问题】

折腾:

【记录】Cygwin下用arm-xscale-linux-gnueabi交叉编译xmlrpc

期间,之前已经解决了:

【已解决】cygwin下用arm-xscale-linux-gnueabi-gcc交叉编译xmlrpc出错:xmltok.c:9:21: fatal error: nametab.h: No such file or directory

但是此处又出现错误:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ make
make -C include/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/./include/Makefile \
    all
make[1]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/include'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/include'
make -C lib/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/./lib/Makefile \
    all
make[1]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib'
make -C util/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/util/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/util'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/util'
make -C libutil/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/libutil/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/libutil'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/libutil'
make -C abyss/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/abyss/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss'
make -C src/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss/../../lib/abyss/src/Makefile \
    all
make[3]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss/src'
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss'
make -C curl_transport/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/curl_transport/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/curl_transport'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/curl_transport'
make -C expat/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/expat/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat'
make -C gennmtab/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/../../lib/expat/gennmtab/Makefile \
    all
make[3]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/gennmtab'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/gennmtab'
make -C xmlparse/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/../../lib/expat/xmlparse/Makefile \
    all
make[3]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmlparse'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmlparse'
make -C xmltok/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/../../lib/expat/xmltok/Makefile \
    all
make[3]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok'
/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../libtool --mode=compile arm-xscale-linux-gnueabi-gcc -c -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../.. -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../lib/util/include  \
  -DNDEBUG -Wall -Wundef -Wimplicit -W -Winline -Wundef  -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -fno-common -g -O3 -DXML_BYTE_ORDER=0   xmltok.c
rm -f .libs/xmltok.lo
arm-xscale-linux-gnueabi-gcc -c -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../.. -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../lib/util/include -DNDEBUG -Wall -Wundef -Wimplicit -W -Winline -Wundef -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -fno-common -g -O3 -DXML_BYTE_ORDER=0 xmltok.c  -fPIC -DPIC -o .libs/xmltok.lo
xmltok.c: In function 'utf8_isName2':
xmltok.c:83:10: error: 'namingBitmap' undeclared (first use in this function)
xmltok.c:83:10: note: each undeclared identifier is reported only once for each function it appears in
xmltok.c:83:10: error: 'namePages' undeclared (first use in this function)
xmltok.c: In function 'utf8_isName3':
xmltok.c:89:10: error: 'namingBitmap' undeclared (first use in this function)
xmltok.c:89:10: error: 'namePages' undeclared (first use in this function)
xmltok.c: In function 'utf8_isNmstrt2':
xmltok.c:97:10: error: 'namingBitmap' undeclared (first use in this function)
xmltok.c:97:10: error: 'nmstrtPages' undeclared (first use in this function)
xmltok.c: In function 'utf8_isNmstrt3':
xmltok.c:103:10: error: 'namingBitmap' undeclared (first use in this function)
xmltok.c:103:10: error: 'nmstrtPages' undeclared (first use in this function)
In file included from xmltok.c:640:0:
xmltok_impl.c: In function 'little2_scanPi':
xmltok_impl.c:231:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:231:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:238:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'little2_scanEndTag':
xmltok_impl.c:391:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:391:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:398:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'little2_scanRef':
xmltok_impl.c:503:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:503:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:512:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'little2_scanAtts':
xmltok_impl.c:535:5: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:535:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c:650:4: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c: In function 'little2_scanLt':
xmltok_impl.c:696:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:696:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:722:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'little2_scanPercent':
xmltok_impl.c:891:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:891:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:901:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'little2_scanPoundName':
xmltok_impl.c:920:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:920:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:927:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'little2_prologTok':
xmltok_impl.c:1127:9: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:1127:9: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:1132:9: error: 'namePages' undeclared (first use in this function)
In file included from xmltok.c:779:0:
xmltok_impl.c: In function 'big2_scanPi':
xmltok_impl.c:231:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:231:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:238:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'big2_scanEndTag':
xmltok_impl.c:391:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:391:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:398:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'big2_scanRef':
xmltok_impl.c:503:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:503:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:512:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'big2_scanAtts':
xmltok_impl.c:535:5: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:535:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c:650:4: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c: In function 'big2_scanLt':
xmltok_impl.c:696:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:696:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:722:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'big2_scanPercent':
xmltok_impl.c:891:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:891:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:901:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'big2_scanPoundName':
xmltok_impl.c:920:3: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:920:3: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:927:5: error: 'namePages' undeclared (first use in this function)
xmltok_impl.c: In function 'big2_prologTok':
xmltok_impl.c:1127:9: error: 'namingBitmap' undeclared (first use in this function)
xmltok_impl.c:1127:9: error: 'nmstrtPages' undeclared (first use in this function)
xmltok_impl.c:1132:9: error: 'namePages' undeclared (first use in this function)
xmltok.c: In function 'unknown_isName':
xmltok.c:1195:10: error: 'namingBitmap' undeclared (first use in this function)
xmltok.c:1195:10: error: 'namePages' undeclared (first use in this function)
xmltok.c: In function 'unknown_isNmstrt':
xmltok.c:1205:10: error: 'namingBitmap' undeclared (first use in this function)
xmltok.c:1205:10: error: 'nmstrtPages' undeclared (first use in this function)
xmltok.c: In function 'xmlrpc_XmlInitUnknownEncoding':
xmltok.c:1321:11: error: 'namingBitmap' undeclared (first use in this function)
xmltok.c:1321:11: error: 'nmstrtPages' undeclared (first use in this function)
xmltok.c:1323:16: error: 'namePages' undeclared (first use in this function)
xmltok.c: In function 'utf8_isNmstrt3':
xmltok.c:104:1: warning: control reaches end of non-void function [-Wreturn-type]
xmltok.c: In function 'utf8_isNmstrt2':
xmltok.c:98:1: warning: control reaches end of non-void function [-Wreturn-type]
xmltok.c: In function 'utf8_isName3':
xmltok.c:90:1: warning: control reaches end of non-void function [-Wreturn-type]
xmltok.c: In function 'utf8_isName2':
xmltok.c:84:1: warning: control reaches end of non-void function [-Wreturn-type]
xmltok.c: In function 'unknown_isNmstrt':
xmltok.c:1206:1: warning: control reaches end of non-void function [-Wreturn-type]
xmltok.c: In function 'unknown_isName':
xmltok.c:1196:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/../../lib/expat/xmltok/Makefile:52: recipe for target `xmltok.lo' failed
make[3]: *** [xmltok.lo] Error 1
make[3]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok'
/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/../../Makefile.common:147: recipe for target `xmltok/all' failed
make[2]: *** [xmltok/all] Error 2
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat'
/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../Makefile.common:147: recipe for target `expat/all' failed
make[1]: *** [expat/all] Error 2
make[1]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib'
/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/Makefile.common:147: recipe for target `lib/all' failed
make: *** [lib/all] Error 2

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$

即:

xmltok.c:83:10: error: ‘namingBitmap’ undeclared (first use in this function)

 

【解决过程】

1.参考:

Re: Compile error

说到,好像是,之前生成的nametab.h中,应该包含此函数namingBitmap的。

所以,就去看看:

xmlrpc\xmlrpc-c-1.06.31\lib\expat\xmltok\nametab.h

结果发现竟然是空的。

所以,后续编译xmltok.c出错,也就在情理之中了。

2.所以,再手动去尝试生成该文件,看看是否成功,结果竟然是gennmtab又变成arm,无法执行了:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok
$ ../gennmtab/gennmtab > nametab_new.h
bash: ../gennmtab/gennmtab: cannot execute binary file

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok
$ file ../gennmtab/gennmtab
../gennmtab/gennmtab: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.19, not stripped

3.所以,重新去执行一遍:

结果发现,竟然还是arm的:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ gcc -I. lib/expat/gennmtab/gennmtab.c -o lib/expat/gennmtab/gennmtab

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ file lib/expat/gennmtab/gennmtab
lib/expat/gennmtab/gennmtab: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.19, not stripped

4.所以,删掉,重新编译一个新的,然后才是x86的:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ rm lib/expat/gennmtab/gennmtab

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ gcc -I. lib/expat/gennmtab/gennmtab.c -o lib/expat/gennmtab/gennmtab

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ file lib/expat/gennmtab/gennmtab
lib/expat/gennmtab/gennmtab: PE32 executable (console) Intel 80386, for MS Windows

然后再去手动生成一下那个头文件:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ cd lib/expat/xmltok/

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok
$ ../gennmtab/gennmtab.exe > nametab.h

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok
$ cat nametab.h
static const unsigned namingBitmap[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0x00000000, 0x04000000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF,
0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFE00F, 0xFC31FFFF,
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF0003, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x000007FE, 0xFFFE0000,
0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060,
0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003,
0xFFF99FE0, 0x03C5FDFF, 0xB0000000, 0x00030003,
0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000,
0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001,
0xFFF99FE0, 0x23CDFDFF, 0xB0000000, 0x00000003,
0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000,
0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003,
0xFFFDDFE0, 0x03EFFDFF, 0x40000000, 0x00000003,
0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x000D7FFF, 0x0000003F, 0x00000000,
0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000,
0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF,
0x0007DAED, 0x50000000, 0x82315001, 0x002C62AB,
0x40000000, 0xF580C900, 0x00000007, 0x02010800,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0x0FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF,
0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF,
0x00000000, 0x00004C40, 0x00000000, 0x00000000,
0x00000007, 0x00000000, 0x00000000, 0x00000000,
0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF,
0x001FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x07FFFFFF,
0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x0000000F, 0x00000000, 0x00000000,
0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF,
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003,
0xFFFFD7C0, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF,
0xFFFFFFFF, 0x7CFFFFFF, 0xFFEF7FFF, 0x03FF3DFF,
0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF,
0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF,
0xFFF987E4, 0xD36DFDFF, 0x5E003987, 0x001FFFC0,
0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1,
0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3,
0xD63DC7EC, 0xC3BFC718, 0x00803DC7, 0x0000FF80,
0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3FFFDFF, 0x00803DCF, 0x0000FFC3,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000,
0xFEF02596, 0x3BFF6CAE, 0x03FF3F5F, 0x00000000,
0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF,
0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x1FFF0000, 0x00000002,
0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF,
0x661FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x77FFFFFF,
};
static const unsigned char nmstrtPages[] = {
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00,
0x00, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static const unsigned char namePages[] = {
0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00,
0x00, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
0x26, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok
$

5.然后接着重新编译试试,终于可以继续正常编译了:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok
$ cd ../../..

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ make
make -C include/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/./include/Makefile \
    all
make[1]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/include'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/include'
make -C lib/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/./lib/Makefile \
    all
make[1]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib'
make -C util/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/util/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/util'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/util'
make -C libutil/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/libutil/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/libutil'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/libutil'
make -C abyss/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/abyss/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss'
make -C src/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss/../../lib/abyss/src/Makefile \
    all
make[3]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss/src'
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/abyss'
make -C curl_transport/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/curl_transport/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/curl_transport'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/curl_transport'
make -C expat/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/../lib/expat/Makefile \
    all
make[2]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat'
make -C gennmtab/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/../../lib/expat/gennmtab/Makefile \
    all
make[3]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/gennmtab'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/gennmtab'
make -C xmlparse/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/../../lib/expat/xmlparse/Makefile \
    all
make[3]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmlparse'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmlparse'
make -C xmltok/ -f /home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/../../lib/expat/xmltok/Makefile \
    all
make[3]: Entering directory `/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok'
/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../libtool --mode=compile arm-xscale-linux-gnueabi-gcc -c -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../.. -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../lib/util/include  \
  -DNDEBUG -Wall -Wundef -Wimplicit -W -Winline -Wundef  -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -fno-common -g -O3 -DXML_BYTE_ORDER=0   xmltok.c
rm -f .libs/xmltok.lo
arm-xscale-linux-gnueabi-gcc -c -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../.. -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../lib/util/include -DNDEBUG -Wall -Wundef -Wimplicit -W -Winline -Wundef -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -fno-common -g -O3 -DXML_BYTE_ORDER=0 xmltok.c  -fPIC -DPIC -o .libs/xmltok.lo
arm-xscale-linux-gnueabi-gcc -c -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../.. -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../lib/util/include -DNDEBUG -Wall -Wundef -Wimplicit -W -Winline -Wundef -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -fno-common -g -O3 -DXML_BYTE_ORDER=0 xmltok.c -o xmltok.o >/dev/null 2>&1
mv -f .libs/xmltok.lo xmltok.lo
/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../libtool --mode=compile arm-xscale-linux-gnueabi-gcc -c -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../.. -I/home/CLi/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok/../../../lib/util/include  \
  -DNDEBUG -Wall -Wundef -Wimplicit -W -Winline -Wundef  -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -fno-common -g -O3 -DXML_BYTE_ORDER=0   xmlrole.c

 

【总结】

之前用:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ gcc -I. lib/expat/gennmtab/gennmtab.c -o lib/expat/gennmtab/gennmtab

生成的gennmtab,竟然无法覆盖旧文件,即,仍然是arm的,而不是x86的:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ file lib/expat/gennmtab/gennmtab
lib/expat/gennmtab/gennmtab: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.19, not stripped

这点,很是诡异。

此点,导致后续,无法用(可执行的)x86的gennmtab去生成所需的nametab.h,而导致后续代码编译时,找不到对应的namingBitmap,才报错的。

 

解决办法是:

手动删除旧的gennmtab,重新用gcc生成一个x86的gennmtab,然后执行gennmtab,生成nametab.h:

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ rm lib/expat/gennmtab/gennmtab

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ gcc -I. lib/expat/gennmtab/gennmtab.c -o lib/expat/gennmtab/gennmtab

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ file lib/expat/gennmtab/gennmtab
lib/expat/gennmtab/gennmtab: PE32 executable (console) Intel 80386, for MS Windows

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31
$ cd lib/expat/xmltok/

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok
$ ../gennmtab/gennmtab.exe > nametab.h

CLi@PC-CLI-1 ~/develop/xmlrpc/xmlrpc-c-1.06.31/lib/expat/xmltok
$ cat nametab.h
static const unsigned namingBitmap[] = {
...

其中nametab.h中包含了所需的namingBitmap,后续就可以正常编译了。



发表评论

电子邮件地址不会被公开。 必填项已用*标注

无觅相关文章插件,快速提升流量