【发布时间】:2016-04-24 14:31:58
【问题描述】:
我正在尝试在 Mac OS X 上构建 libpipeline,但我遇到了其他使用 autotools 的程序没有遇到的错误。
这是我得到的第一个错误:
/Developer/usr/bin/ranlib: file: .libs/libgnu.a(sig-handler.o) has no symbols
第二个错误更神秘:
warning: /Developer/usr/bin/nm: no name list
最后,我得到了这个错误,推测这是以前错误的结果。
Undefined symbols for architecture x86_64:
"_program_name", referenced from:
_error in libgnu.a(error.o)
_error_at_line in libgnu.a(error.o)
ld: symbol(s) not found for architecture x86_64
完整日志:https://gist.github.com/ahyattdev/7e4da95d48a6d25ad77aad926a14e7b0
重现步骤:获取libpipeline 1.4.1的源代码,运行configure; make。
【问题讨论】:
-
第一个不是错误,它是一个简单的信息性消息。但是,据我所知,OS X 不支持
libpipeline和libgnu。 -
program_name是外部符号。试试CFLAGS="-Wl,-flat_namespace,-undefined,suppress"。 -
这些论点为我解决了这个问题。然后引入了一个特定于库的问题,我用一个虚拟标题修复了这个问题。
标签: c macos autotools libtool gnulib