构建 UCB 徽标 6 - mathcalls.h 中的错误

构建 UCB 徽标 6 - mathcalls.h 中的错误

听说西摩·派普特的路过,我想安装伯克利徽标 (UCBLogo)。Ubuntu 存储库只有 v5.5。

下载并解压档案、解决其依赖关系(似乎libbsd-dev libx11-dev build-essential libwxgtk3.0-dev libtinfo-dev texinfo texlive)并运行后./configure,运行make出现以下错误:

gcc -g -O   -O0 -DUSE_OLD_TTY   -c -o coms.o coms.c
In file included from coms.c:30:0:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
 __MATHCALL_VEC (exp,, (_Mdouble_ __x));
 ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
 __MATHCALL_VEC (exp,, (_Mdouble_ __x));
 ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
 __MATHCALL_VEC (exp,, (_Mdouble_ __x));
 ^
<builtin>: recipe for target 'coms.o' failed
make: *** [coms.o] Error 1

该软件包在 Raspberry Pi(Raspbian、gcc 4.9.2、armv7l)上可以正确构建,但在这台机器(Ubuntu 16.04、gcc 5.4.0、x86_64)上却不行。我没想到会产生错误里面系统包含文件。 mathcalls.h 标头在两个系统上看起来完全不同,错误行调用了不同的宏。这可能是 gcc-4 到 gcc-5 的问题吗?

答案1

我研究了如何编译此代码:

  • 将行移至coms.c行之前graphics.cinclude <math.h>include "logo.h"
  • 运行后.configure打开文件并使用makefile更改对库的调用。-ltermcap-lncurses

然后您可以运行make并且它应该可以编译成功。

我还没有弄清楚如何使用 wx 工具包进行编译。我的系统上有库,但似乎.configuremake忽略了它。

相关内容