您的位置:首页 > 其它

MacOSX编译coreutils出错的修改

2013-07-03 17:35 393 查看
coreutils版本coreutils-8.20

configure参数为:
./configure --prefix=/mnt/work/sdk/coreutils

make时,出错:

Undefined symbols for architecture x86_64:
"_iconv", referenced from:

_mem_cd_iconv in libcoreutils.a(striconv.o)

_str_cd_iconv in libcoreutils.a(striconv.o)
(maybe
you meant: _str_iconv, _mem_cd_iconv , _xstr_cd_iconv , _xstr_iconv
, _str_cd_iconv , _xmem_cd_iconv )
"_iconv_close", referenced from:

_str_iconv in libcoreutils.a(striconv.o)
"_iconv_open", referenced from:

_str_iconv in libcoreutils.a(striconv.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [src/factor] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

看上去是有一个库找不到了。make distclean清空目录,重新configure
./configure --prefix=/mnt/work/sdk/coreutils
--cache-file=config.cache
--enable-no-install-program=kill,uptime
--enable-install-program=hostname LDFLAGS="-liconv"
其实主要目的是加LDFLAGS,别的都是从LFS脚本里拷着用的。

然后,顺利的编过了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: