在Ubuntu 16.10 x64上配置Meschach的问题

时间:2017-08-01 04:30:49

标签: c configure meschach

我是C的新手。我正在尝试在JavaScript中进行一些矩阵操作,并希望将C库嵌入到Node JS模块中。我完成了一个概念验证模块,它可以做到这一点并且工作正常。

我从here (mesch12b.tar.gz)下载了Meschach来进行矩阵操作。它看起来是我需要的一个很好的选择(尽管我在C或C ++中对其他选项开放)。

出于某种原因,当我运行./configure脚本时,它无法找到任何内容:

$ ./configure
loading cache ./config.cache
checking for acc... no
checking for cc... (cached) no
checking for gcc... (cached) no
checking for cc... (cached) no
configure: error: no acceptable cc found in $PATH

我的路径似乎很好,ccgcc在我的系统上可用(我已永远安装了build-essential):

$ which cc
/usr/bin/cc
$ which gcc
/usr/bin/gcc

我看了很多,但没有找到任何帮助。有什么提示吗?

更新

我发现如果我设置CC环境变量,我们就会解决第一个问题,但会出现更多问题。我会尝试一次一个地完成它们,但是如果有人能指出我做错的重要事情,我会很感激。

$ CC=/usr/bin/gcc ./configure
loading cache ./config.cache
checking for acc... /usr/bin/gcc
checking for cc... (cached) /usr/bin/gcc
checking for gcc... (cached) /usr/bin/gcc
checking whether the C compiler (/usr/bin/gcc  ) works... yes
checking whether the C compiler (/usr/bin/gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether /usr/bin/gcc accepts -g... yes
checking how to run the C preprocessor... /usr/bin/gcc -E
checking for AIX... no
./configure: 957: ./configure: AC_HPUX: not found
checking for minix/config.h... no
checking for POSIXized ISC... no
checking for ranlib... ranlib
checking for memory.h... yes
checking for ANSI C header files... yes
checking for complex.h... yes
checking for malloc.h... yes
checking for varargs.h... no
checking for size_t... yes
checking for working const... yes
checking whether byte ordering is bigendian... no
computing machine epsilon(s)
/usr/bin/gcc -o macheps dmacheps.c
dmacheps.c:37:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main()
 ^
/usr/bin/gcc -o macheps fmacheps.c
fmacheps.c:37:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main()
 ^
computing M_MAX_INT
/usr/bin/gcc -o maxint maxint.c
maxint.c:27:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main()
 ^
maxint.c: In function 'main':
maxint.c:37:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
     printf("%d\n", old_i);
     ^
maxint.c:37:5: warning: incompatible implicit declaration of built-in function 'printf'
maxint.c:37:5: note: include '<stdio.h>' or provide a declaration of 'printf'
checking char \0 vs. float zeros
checking for bcopy... yes
checking for bzero... yes
./configure: 1697: ./configure: Syntax error: "(" unexpected (expecting "fi")

1 个答案:

答案 0 :(得分:0)

我最终修复了配置错误(在声明中添加了CC=/usr/bin一些所需类型的方法,等等。

然后构建有大约一百个警告/错误,我注意到文件中许可证的非标准和可能不自由的第三个条款,所以我放弃了它,我将使用不同的矩阵库。