我正在尝试安装随书附带的代码:https://sites.google.com/site/cinterfacesimplementations/
按照作者在此处发出的指示:http://cii.googlecode.com/svn/trunk/install.html
我的电脑在32位i686架构上有ubuntu 11.04。按照作者对32位linux的说明我尝试:
make CC='cc -DMAXALIGN=4' AS='cc -c -x assembler-with-cpp -traditional'
其中cc是gcc版本4.5.2 这给出了以下警告和错误:
makefile:138: warning: overriding commands for target `maxalign'
makefile:135: warning: ignoring old cc -DMAXALIGN=4 -g -Iinclude -c -o ap.o src/ap.c
In file included from src/thread.c:100:0:
/usr/include/i386-linux-gnu/asm/sigcontext.h:56:8: error: redefinition of ‘struct _fpreg’
/usr/include/bits/sigcontext.h:28:8: note: originally defined here
/usr/include/i386-linux-gnu/asm/sigcontext.h:61:8: error: redefinition of ‘struct _fpxreg’
/usr/include/bits/sigcontext.h:34:8: note: originally defined here
/usr/include/i386-linux-gnu/asm/sigcontext.h:67:8: error: redefinition of ‘struct _xmmreg’
/usr/include/bits/sigcontext.h:41:8: note: originally defined here
/usr/include/i386-linux-gnu/asm/sigcontext.h:71:8: error: redefinition of ‘struct _fpstate’
/usr/include/bits/sigcontext.h:50:8: note: originally defined here
/usr/include/i386-linux-gnu/asm/sigcontext.h:104:8: error: redefinition of ‘struct sigcontext’
/usr/include/bits/sigcontext.h:81:8: note: originally defined here
src/thread.c: In function ‘interrupt’:
src/thread.c:108:2: warning: ‘sigsetmask’ is deprecated (declared at /usr/include/signal.h:199)
make: *** [thread.o] Error 1
不知道该怎么做。 令人费解的是/ usr / include / i386-linux-gnu。因为我做了
uname -m
打印i686而不是i363。 任何人的想法?
干杯, 吉姆
答案 0 :(得分:3)
在thread.c中的第100行 - 删除#include <asm/sigcontext.h>
(或将其注释掉)。那应该删除“重复声明”。它不会修复已弃用接口的使用(十年前编写的书籍问题以及5年前更新的代码),如果您尝试在64位处理器上运行此问题,则会出现其他问题我还没有尝试修复。