glib交叉编译时的问题,提示缺少zlib的lib和头文件,求教.

yexiaoyun43 2011-03-04 11:00:30
HI各位,我现在在用sourcery g++交叉编译glib,卡在zlib库这里,不知道怎么解决,求助。错误如下。

===============================================
root@ubuntu:/home/ye/gstreamer_lib_for_arm/glib-2.28.1# CC=arm-none-linux-gnueabi-gcc ./configure --build=i686-linux --host=arm-none-linux-gnueabi --prefix=/home/ye/gstreamer_lib_for_arm glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes ac_cv_lib_rt_clock_gettime=no glib_cv_monotonic_clock=yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-linux-gnueabi-strip... arm-none-linux-gnueabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-none-linux-gnueabi-gcc accepts -g... yes
checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of arm-none-linux-gnueabi-gcc... gcc3
checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E
checking build system type... i686-pc-linux-gnu
checking host system type... arm-none-linux-gnueabi
checking for the BeOS... no
checking for Win32... no
checking for Mac OS X Carbon support... no
checking whether to enable garbage collector friendliness... no
checking whether to disable memory pools... no
checking for arm-none-linux-gnueabi-c++... arm-none-linux-gnueabi-c++
checking whether we are using the GNU C++ compiler... yes
checking whether arm-none-linux-gnueabi-c++ accepts -g... yes
checking dependency style of arm-none-linux-gnueabi-c++... gcc3
checking for arm-none-linux-gnueabi-gcc... (cached) arm-none-linux-gnueabi-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether arm-none-linux-gnueabi-gcc accepts -g... (cached) yes
checking for arm-none-linux-gnueabi-gcc option to accept ISO C89... (cached) none needed
checking dependency style of arm-none-linux-gnueabi-gcc... (cached) gcc3
checking whether arm-none-linux-gnueabi-gcc and cc understand -c and -o together... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for arm-none-linux-gnueabi-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: using cross tools not prefixed with host triplet
checking pkg-config is at least version 0.16... yes
checking for gawk... (cached) gawk
checking for perl5... no
checking for perl... perl
checking for indent... no
checking for perl... /usr/bin/perl
checking for a Python interpreter with version >= 2.4... python
checking for python... /usr/bin/python
checking for python version... 2.6
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.6/site-packages
checking for iconv_open... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether we are using the GNU C Library 2.1 or newer... yes
checking Whether to cache iconv descriptors... no
checking for ZLIB... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for inflate in -lz... no
configure: error: *** Working zlib library and headers not found ***

===============================

到这里就报错了,请问如何解决,确认已经装了zlib1g和zlib1g-dev了,各种办法都试了。
...全文
1531 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
mymtom 2011-08-20
  • 打赏
  • 举报
回复
glib-2.23开始就需要zlib
yexiaoyun43 2011-03-04
  • 打赏
  • 举报
回复
自己解决了,方法是将zlib升级到1.2.5.原因是因为glib太新了.

4,436

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧