gpt4 book ai didi

linux - 在 Ubuntu 18.04 中安装旧版本的 gnu-make

转载 作者:可可西里 更新时间:2023-11-01 11:48:14 47 4
gpt4 key购买 nike

我想在 Ubuntu 18.04 上安装 make 3.81。

所以我下载了这个版本的 make 并运行 ./configure 然后 ma​​ke。但是在编译时它给我这个错误:

./glob/glob.c: In function ‘glob’:
./glob/glob.c:581:23: warning: implicit declaration of function ‘__alloca’; did you mean ‘alloca’? [-Wimplicit-function-declaration]
newp = (char *) __alloca (dirlen + 1);
^~~~~~~~
alloca
./glob/glob.c:581:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
newp = (char *) __alloca (dirlen + 1);
^
./glob/glob.c:709:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
newp = (char *) __alloca (home_len + dirlen);
^
./glob/glob.c:732:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
newp = (char *) __alloca (end_name - dirname);
^
./glob/glob.c:783:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
newp = (char *) __alloca (home_len + rest_len + 1);
^
./glob/glob.c:814:11: warning: implicit declaration of function ‘__stat’; did you mean ‘__xstat’? [-Wimplicit-function-declaration]
: __stat (dirname, &st)) == 0
^~~~~~
__xstat
./glob/glob.c: In function ‘glob_in_dir’:
./glob/glob.c:1256:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
char *fullname = (char *) __alloca (dirlen + 1 + patlen + 1);
^
./glob/glob.c:1283:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
names = (struct globlink *) __alloca (sizeof (struct globlink));
^
./glob/glob.c:1341:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
struct globlink *new = (struct globlink *)
^
./glob/glob.c:1367:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
names = (struct globlink *) __alloca (sizeof (struct globlink));

构建版本 3.82 的情况相同。我当前的 make 版本是 4.1。

有人知道哪里出了问题吗?

谢谢

编辑:

glob/libglob.a(glob.o): In function `glob_in_dir':/opt/make-3.81/glob/glob.c:1361: undefined reference to `__alloca'/opt/make-3.81/glob/glob.c:1336: undefined reference to `__alloca'/opt/make-3.81/glob/glob.c:1277: undefined reference to `__alloca'/opt/make-3.81/glob/glob.c:1250: undefined reference to `__alloca'glob/libglob.a(glob.o): In function `glob':/opt/make-3.81/glob/glob.c:575: undefined reference to `__alloca'glob/libglob.a(glob.o):/opt/make-3.81/glob/glob.c:726: more undefined references to `__alloca' followcollect2: error: ld returned 1 exit statusMakefile:410: recipe for target 'make' failedmake[2]: *** [make] Error 1make[2]: Leaving directory '/opt/make-3.81'Makefile:603: recipe for target 'all-recursive' failedmake[1]: *** [all-recursive] Error 1make[1]: Leaving directory '/opt/make-3.81'Makefile:326: recipe for target 'all' failedmake: *** [all] Error 2

最佳答案

你可以尝试修改glob.c文件:

# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION 

# if _GNU_GLOB_INTERFACE_VERSION >= GLOB_INTERFACE_VERSION

对我来说这是可行的,我可以构建 make 3.82

(信用:http://gnu-make.2324884.n4.nabble.com/undefined-reference-to-alloca-td18308.html)

关于linux - 在 Ubuntu 18.04 中安装旧版本的 gnu-make,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51675200/

47 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com