欢迎访问 生活随笔!

凯发k8官方网

当前位置: 凯发k8官方网 > 运维知识 > linux >内容正文

linux

glib 2.0 arm linux,为arm编译glib -凯发k8官方网

发布时间:2024/10/8 linux 0 豆豆
凯发k8官方网 收集整理的这篇文章主要介绍了 glib 2.0 arm linux,为arm编译glib 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

一些有用的参考:

http://gtk-doc-cn.googlecode.com/svn/docs/glib/glib-cross-compiling.html

http://blog.sina.com.cn/s/blog_630dcb970100fxtv.html

glib下载:http://ftp.gnome.org/pub/gnome/sources/glib/2.32/

一、解压,进入源代码目录,新建一个文本文件arm.cache

向文件里写入如下配置:

glib_cv_long_long_format=yes

glib_cv_stack_grows=no

glib_cv_working_bcopy=no

glib_cv_uscore=no

ac_cv_func_posix_getpwuid_r=yes

ac_cv_func_nonposix_getpwuid_r=no

ac_cv_func_posix_getgrgid_r=no

二、配置

cody@debian:~/arm210/glib-2.22.5$ ./configure --cache-file=arm.cache --host=arm-linux

三、编译

make

到目前没出现错误

四、安装

sudo make install

错误1:

/home/cody/arm210/glib-2.22.5/libtool: line 7847: arm-linux-gcc: command not found

libtool: install: error: relink `libgmodule-2.0.la' with the above command before installing it

解决:使用su切换到root再make,发现还是提示

arm-linux-gcc: command not found

在命令行输入arm-linux-gcc试试看,恩,提示没找到命令,看来是root没有把工具链的变量包括起来,

先export工具链的路径:

export path=/opt/friendlyarm/toolschain/4.5.1/bin/:$path

再make,没问题

再make install,没问题

悲剧了,安装在/usr/local/bin里去了,这不是我想要的,先 make uninstall。

再configure一次:

./configure --cache-file=arm.cache --host=arm-linux --prefix=/opt/glib-2.22.5

再make,出现错误,删掉所有源文件,重新从压缩包里解压再来一次,ok了

总结

以上是凯发k8官方网为你收集整理的glib 2.0 arm linux,为arm编译glib的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得凯发k8官方网网站内容还不错,欢迎将凯发k8官方网推荐给好友。

网站地图