当我尝试制作pkg-config时,出现错误。我想在我的mac上安装一个生物信息学工具。我对此很新,所以我可能会犯一个致命的错误。非常感谢任何帮助!谢谢!
制作日志
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in glib
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in .
Making all in m4macros
/Library/Developer/CommandLineTools/usr/bin/make all-am
make[5]: Nothing to be done for all-am'. Making all in glib GEN glibconfig-stamp config.status: executing glib/glibconfig.h commands config.status: glib/glibconfig.h is unchanged /Library/Developer/CommandLineTools/usr/bin/make all-recursive Making all in libcharset /Library/Developer/CommandLineTools/usr/bin/make all-am make[7]: Nothing to be done forall-am'.
Making all in .
echo > glib-public-headers.txt.tmp && mv glib-public-headers.txt.tmp glib-public-headers.txt
Making all in .
CCLD pkg-config
Undefined symbols for architecture x86_64:
"_CFRelease", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFStringGetCString", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFStringGetCStringPtr", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFStringGetLength", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFURLCopyFileSystemPath", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_CFURLCreateFromFSRef", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_FSFindFolder", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
"_kCFAllocatorSystemDefault", referenced from:
_find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [pkg-config] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
答案 0 :(得分:7)
我猜您正在尝试使用选项--with-internal-glib
构建pkg-config。如果是这样,那么你必须将以下链接器(在LDFLAGS中)选项添加到配置脚本-framework CoreFoundation
和-framework Carbon
,因此你将构建glib静态然后pgk-config可以使用它
简历中:env LDFLAGS="-framework CoreFoundation -framework Carbon" ./configure --with-internal-glib
。
PS:考虑编辑问题描述并为问题插入更多上下文。
PPS:Pkg-Config version 0.29.1解决了这个问题。