在macOS Sierra上构建guile-2.0.11失败:体系结构x86_64的未定义符号 [英] Build of guile-2.0.11 on macOS Sierra fails: Undefined symbols for architecture x86_64

查看:129
本文介绍了在macOS Sierra上构建guile-2.0.11失败:体系结构x86_64的未定义符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是经验丰富的程序员/开发人员/软件工程师,但我需要手动构建此旧版本的guile-2.0.11,而不要使用自制软件(安装了最新版本的guile).我从GitHub存储库下载了guile-2.0.11的压缩包,将其解压缩并运行了shell脚本autogen.sh.这产生了一个配置可执行文件,该可执行文件运行完毕并生成了一个Makefile.当我运行make时,构建将继续进行,直到出现以下错误:

I am not an experienced programmer/developer/software engineer, but I need to get this older version of guile-2.0.11 built "by hand" rather than using home-brew (which installs the latest version of guile). I downloaded the tarball for guile-2.0.11 from the GitHub repository, extracted it and ran the shell script autogen.sh. This produced a configure executable which ran to completion and generated a Makefile. When I run make, the build continues until I get the this error:

Undefined symbols for architecture x86_64:
"_clock_getcpuclockid", referenced from:
_scm_init_stime in libguile_2.0_la-stime.o
"_ffi_call", referenced from:
 _scm_i_foreign_call in libguile_2.0_la-foreign.o

和另外16条" ffi "类似消息.然后错误消息结束

and 16 more "ffi" similar messages. Then the error messages finishes

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see      invocation)
make[3]: *** [libguile-2.0.la] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1

链接器显然找不到这些符号.显式链接命令相当广泛..如果我使用"make V = 1",它将显示所有选项,包含和库路径.这是开始,显示了选项和路径:

The linker apparently can't find these symbols. The explicit link command is quite extensive..it shows all the options, include and library paths if I use "make V=1". Here is the beginning, showing the options and paths:

Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
/bin/sh ../libtool  --tag=CC   --mode=link gcc -  I/usr/local/opt/gettext/include -I/usr/local/include -  I/usr/local/opt/readline/include -  I/usr/local/Cellar/gettext/0.19.8.1/include -D_THREAD_SAFE  -Wall -  Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wswitch-  enum -fno-strict-aliasing -fwrapv -fvisibility=hidden -  I/usr/local/Cellar/bdw-gc/7.6.0/include -g -O2 -L/usr/local/Cellar/bdw-  gc/7.6.0/lib -lgc -L/usr/local/opt/libffi/lib                -liconv -  L/usr/local/opt/gettext/lib -lintl -R/usr/local/opt/gettext/lib -Wl,-  framework -Wl,CoreFoundation -L/usr/local/lib -lunistring -R/usr/local/lib        -version-info 29:2:7 -export-dynamic -no-undefined   -L/usr/local/opt/gettext/lib -L/usr/local/lib -L/usr/local/opt/readline/lib     -L/usr/local/Cellar/gettext/0.19.8.1/lib -o libguile-2.0.la -rpath /usr/local/lib

然后有libtool.

Then there is libtool.

libtool: link: gcc -dynamiclib  -o .libs/libguile-2.0.22.dylib    .libs/libguile_2.0_la-alist.o .libs/libguile_2.0_la-arbiters.o   .libs/libguile_2.0_la-array-handle.o

还有更多的xxxx.o

and many many more xxxx.o

然后

-Wl,-force_load,../lib/.libs/libgnu.a  -L/usr/local/Cellar/bdw-  gc/7.6.0/lib -lgc -L/usr/local/opt/libffi/lib -L/usr/local/opt/gettext/lib   -L/usr/local/lib -L/usr/local/opt/readline/lib -  L/usr/local/Cellar/gettext/0.19.8.1/lib -lintl -lunistring -liconv -lgmp -  lltdl -lm  -g -O2 -Wl,-framework -Wl,CoreFoundation   -install_name    /usr/local/lib/libguile-2.0.22.dylib -compatibility_version 30 - current_version 30.2 -Wl,-single_module

ffilib的最新版本位于ld路径中的symlink/usr/local/opt/libffi/lib中,因此我认为链接器可以找到它.任何帮助将不胜感激.

The up-to-date version of ffilib is in the symlink /usr/local/opt/libffi/lib which is in the ld path, so I would think that the linker could find it. Any help would be greatly appreciated.

推荐答案

此问题实际上是两个问题:(1)未定义的符号"_clock_getcpuclockid"和(2)所有未定义的" ffi "符号.第二个问题的答案是此处,而第一个问题的答案是此处.可能还有其他解决方案,但这些解决方案导致在我的macOS Sierra(10.12.5)上安装了guile-2.0.11,

This problem is really two problems: (1) the undefined symbol "_clock_getcpuclockid" and (2) all the "ffi" undefined symbols. The answer to the second problem is here and the answer to the first problem is here. There may be other solutions but these resulted in the installation of guile-2.0.11 on my macOS Sierra (10.12.5),

这篇关于在macOS Sierra上构建guile-2.0.11失败:体系结构x86_64的未定义符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆