libjpeg的交叉编译

出自:http://blog.csdn.net/ypist/article/details/8190966


http://www.ijg.org/files/网站下载lib库的源文件.
开工:

[cpp]  view plain copy
  1. tar -xzvf jpeg-6b.tar.gz  
  2. cd jpeg-6b  
  3. mkdir /opt/jpeg/jpeg-6b-release  
  4. ./configure CC=mipsel-linux-gcc --prefix=/opt/jpeg/jpeg-6b-release --enable-shared --enable-static --host=mipsel-linux  
  5. mkdir /opt/jpeg/jpeg-6b-release/bin  
  6. mkdir /opt/jpeg/jpeg-6b-release/include  
  7. mkdir /opt/jpeg/jpeg-6b-release/lib  
  8. mkdir /opt/jpeg/jpeg-6b-release/man  
  9. mkdir /opt/jpeg/jpeg-6b-release/man/man1  
  10. make  


=================================================
出错:

[cpp]  view plain copy
  1. [root@localhost jpeg-6b]# make  
  2. ./libtool --mode=compile mipsel-linux-gcc -O2  -I. -c ./jcapimin.c  
  3. make: ./libtool: Command not found  
  4. make: *** [jcapimin.lo] Error 127  

所以,我们得先安装 libtool工具。
=================================================

 

http://download.chinaunix.net/download/0007000/6039.shtml下载
得到: libtool-2.4.2.tar.xz
放到我们的Linux系统中:

网上说,tar.xz文件解压 有2中办法:
方式1:
    tar xvfJ ***.tar.xz
方式2:
    xz -d ***.tar.xz
    tar -xvf  ***.tar
我用方法1尝试,报错:

[cpp]  view plain copy
  1. [root@localhost jpeg]# tar xvfJ libtool-2.4.2.tar.xz  
  2. tar: invalid option -- J  
  3. Try `tar --help' or `tar --usage' for more information.  
  4. [root@localhost jpeg]# tar xvfj libtool-2.4.2.tar.xz  
  5. bzip2: (stdin) is not a bzip2 file.  
  6. tar: Child returned status 2  
  7. tar: Error exit delayed from previous errors  

于是,我采用方法2:
[root@localhost jpeg]# xz -d libtool-2.4.2.tar.xz
bash: xz: command not found
好吧, 我去给你安装个xz工具,从 http://tukaani.org/xz/xz-4.999.9beta.tar.bz2
上面下载得到 xz-4.999.9beta.tar.bz2。
  1、tar -jxvf xz-4.999.9beta.tar.bz2
  2、cd xz-4.999.9beta
  3、./configure --prefix=/
  4、make && make install
OK, 去之前的目录,然后 xz -d libtool-2.4.2.tar.xz
得到: libtool-2.4.2.tar
然后:tar -xvf libtool-2.4.2.tar
得到: libtool-2.4.2 文件夹。
$ cd libtool-2.2.4/ 

[cpp]  view plain copy
  1. [root@localhost libtool-2.4.2]# ./configure CC=mipsel-linux-gcc --host=mipsel-linux --build=mipsel-linux --prefix=/opt/jpeg/libtool-release   
  2. ## ------------------------- ##  
  3. ## Configuring libtool 2.4.2 ##  
  4. ## ------------------------- ##  
  5.   
  6. checking for a BSD-compatible install... /usr/bin/install -c  
  7. checking whether build environment is sane... yes  
  8. checking for a thread-safe mkdir -p... /bin/mkdir -p  
  9. checking for gawk... gawk  
  10. checking whether make sets $(MAKE)... yes  
  11. checking build system type... mipsel-unknown-linux-gnu  
  12. checking host system type... mipsel-unknown-linux-gnu  
  13. configure: autobuild project... GNU Libtool  
  14. configure: autobuild revision... 2.4.2 ()  
  15. configure: autobuild hostname... localhost.localdomain  
  16. configure: autobuild mode... default  
  17. configure: autobuild timestamp... 20121116T063533Z  
  18. checking for mipsel-linux-gcc... mipsel-linux-gcc  
  19. checking whether the C compiler works... yes  
  20. checking for C compiler default output file name... a.out  
  21. checking for suffix of executables...   
  22. checking whether we are cross compiling... configure: error: in `/opt/jpeg/libtool-2.4.2':  
  23. configure: error: cannot run C compiled programs.  
  24. If you meant to cross compile, use `--host'.  
  25. See `config.log' for more details  
  26.   
  27. 后来改为:   
  28. [root@localhost libtool-2.4.2]# ./configure CC=mipsel-linux-gcc --host=mipsel-linux --prefix=/opt/jpeg/libtool-release   
  29. 配置通过。  

 

[cpp]  view plain copy
  1. $ make && make install    
  2. [root@localhost libtool-2.4.2]# ls ../libtool-release/bin  
  3. libtool  libtoolize  
  4. [root@localhost libtool-2.4.2]# cp ../libtool-release/bin/* ../jpeg-6b/  
  5. [root@localhost libtool-2.4.2]# cd ../jpeg-6b  
  6. ./configure CC=mipsel-linux-gcc --prefix=/opt/jpeg/jpeg-6b-release --enable-shared --enable-static --host=mipsel-linux  
  7. make && mak install  

 

至此,得到我们的文件在 jpeg-6b-release 目录下面。

 

下面我们再延伸一下,将8d版本的库也编译了吧。

[cpp]  view plain copy
  1. [root@localhost jpeg]# cp /mnt/hgfs/jpeg_lib/jpegsrc.v8d.tar.gz ./  
  2. [root@localhost jpeg]# tar zxvf jpegsrc.v8d.tar.gz   
  3. [root@localhost jpeg-8d]# ./configure CC=mipsel-linux-gcc --prefix=/opt/jpeg/jpeg-8d-release --enable-shared --enable-static --host=mipsel-linux  
  4. [root@localhost jpeg-8d]# make && make install  
  5. [root@localhost jpeg-8d]# cd ../jpeg-8d-release/  
  6. [root@localhost jpeg-8d-release]# tree  
  7. .  
  8. |-- bin  
  9. |   |-- cjpeg  
  10. |   |-- djpeg  
  11. |   |-- jpegtran  
  12. |   |-- rdjpgcom  
  13. |   `-- wrjpgcom  
  14. |-- include  
  15. |   |-- jconfig.h  
  16. |   |-- jerror.h  
  17. |   |-- jmorecfg.h  
  18. |   `-- jpeglib.h  
  19. |-- lib  
  20. |   |-- libjpeg.a  
  21. |   |-- libjpeg.la  
  22. |   |-- libjpeg.so -> libjpeg.so.8.4.0  
  23. |   |-- libjpeg.so.8 -> libjpeg.so.8.4.0  
  24. |   `-- libjpeg.so.8.4.0  
  25. |-- man  
  26. |   `-- man1  
  27. |       |-- cjpeg.1  
  28. |       |-- djpeg.1  
  29. |       |-- jpegtran.1  
  30. |       |-- rdjpgcom.1  
  31. |       `-- wrjpgcom.1  
  32. `-- share  
  33.     `-- man  
  34.         `-- man1  
  35.             |-- cjpeg.1  
  36.             |-- djpeg.1  
  37.             |-- jpegtran.1  
  38.             |-- rdjpgcom.1  
  39.             `-- wrjpgcom.1  
  40.   
  41. 8 directories, 24 files  


 

至此, 我们的8d版本的JPEG库也编译通过了,哈哈。。

 

现在我们回过头来看看xz文件的压缩作用如何:
-rwxr-xr-x 1 root root 11929600 2012-11-16 01:11 libtool-2.4.2.tar
-rwxrwxrwx 1 root root 868760 2012-11-16 01:09 libtool-2.4.2.tar.xz
事实证明,xz在压缩文件方面还是相当优秀的的。。

经网上查阅资料,xz文件的压缩和解压步骤如下:
创建tar.xz文件:只要先 tar cvf xxx.tar xxx/ 这样创建xxx.tar文件先,然后使用 xz -z xxx.tar 来将 xxx.tar压缩成为 xxx.tar.xz
解压tar.xz文件:先 xz -d xxx.tar.xz 将 xxx.tar.xz解压成 xxx.tar 然后,再用 tar xvf xxx.tar来解包。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
智慧校园整体解决方案是响应国家教育信息化政策,结合教育改革和技术创新的产物。该方案以物联网、大数据、人工智能和移动互联技术为基础,旨在打造一个安全、高效、互动且环保的教育环境。方案强调从数字化校园向智慧校园的转变,通过自动数据采集、智能分析和按需服务,实现校园业务的智能化管理。 方案的总体设计原则包括应用至上、分层设计和互联互通,确保系统能够满足不同用户角色的需求,并实现数据和资源的整合与共享。框架设计涵盖了校园安全、管理、教学、环境等多个方面,构建了一个全面的校园应用生态系统。这包括智慧安全系统、校园身份识别、智能排课及选课系统、智慧学习系统、精品录播教室方案等,以支持个性化学习和教学评估。 建设内容突出了智慧安全和智慧管理的重要性。智慧安全管理通过分布式录播系统和紧急预案一键启动功能,增强校园安全预警和事件响应能力。智慧管理系统则利用物联网技术,实现人员和设备的智能管理,提高校园运营效率。 智慧教学部分,方案提供了智慧学习系统和精品录播教室方案,支持专业级学习硬件和智能化网络管理,促进个性化学习和教学资源的高效利用。同时,教学质量评估中心和资源应用平台的建设,旨在提升教学评估的科学性和教育资源的共享性。 智慧环境建设则侧重于基于物联网的设备管理,通过智慧教室管理系统实现教室环境的智能控制和能效管理,打造绿色、节能的校园环境。电子班牌和校园信息发布系统的建设,将作为智慧校园的核心和入口,提供教务、一卡通、图书馆等系统的集成信息。 总体而言,智慧校园整体解决方案通过集成先进技术,不仅提升了校园的信息化水平,而且优化了教学和管理流程,为学生、教师和家长提供了更加便捷、个性化的教育体验。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值