OpenWRT 编译 error GNU libiconv not in use but included iconv.h is from libiconv

编译的时候碰到一个常见的错误,但是却在一个陌生的地方爆出来:

gconvert.c:55:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv

google 了一下资料还挺多,总之就是没搜到 OpenWRT 相关的,于是各种想法都有。后来才发现确实是自己不注意被绕进去了。其实依旧是用很常规的手段解决,

cd /home/lellansin/OpenWRT/svn/trunk/build_dir/host/pkg-config-0.28/glib
./configure --enable-iconv=no --with-libiconv=gnu
make
cd /home/lellansin/OpenWRT/svn/trunk/
make # 继续编译 OpenWRT

开始一下没绕过来,因为在 trunk 目录下没有 configure 文件。纠结了半天,还试过删除自带的 iconv 等等各种黑操作,最后想,这 gconvert.o 编译不出来。咱去下载一个编译成功后拷贝过来就是。想到这里才突然意识到 OpenWRT 里面应该是有源码的,然后找过去果然找到了 glib 的 configure。

总结:以后编译大一点项目报错,第一时间先跑去看报错子项的 configure

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s