设为首页 加入收藏

TOP

mini2440 madplay移植出现问题解决
2014-11-24 12:13:46 来源: 作者: 【 】 浏览:0
Tags:mini2440 madplay 移植 出现 问题 解决

刚刚开始,下决心学习linux,所以找出大学时候就购买的mini2440 拿出来折腾。


按照手册一路模仿学习,其中出现不少问题,也都一个一个解决了。可惜那时候没有想来,记录这个过程。


这次在学习到手册的第六章6.5嵌入式程序移植实例的时候出现了问题。看如下图:



target-x86 里面,我一直都没得到 原来的库文件。


问题一:


仔细一看,出现的错误:


configure: error: zlib.h was not found
*** You must first install zlibz(libz) before you can build this package.
*** If libmad is already installed, you may need to use the CPPFLAGS
*** environment variable to specify its installed location, e.g. -I

.


问题二:


接下来libmad文件出现问题


报错是:


cc1: error: unrecognized command line option '-fforce-mem'
make[2]: *** [version.lo] Error 1
make[2]: Leaving directory `/opt/FriendlyARM/mini2440/madplay/src-x86/libmad-0.15.1b'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/madplay/src-x86/libmad-0.15.1b'
make: *** [all] Error 2



百度了一下,原因是GCC3.4以上已经没有-fforce-mem选项,找到相应的makefile,将该选项删除就OK了!


具体是:


CFLAGS = -Wall -march=i486 -g -O -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 -fstrength-reduce


修改为CFLAGS = -Wall -march=i486 -g -O


问题三:


编译安装madplay 出现如下问题:


checking for sys/soundcard.h... yes
checking machine/soundcard.h usability... no
checking machine/soundcard.h presence... no
checking for machine/soundcard.h... no
checking mad.h usability... no
checking mad.h presence... no
checking for mad.h... no
configure: error: mad.h was not found
*** You must first install libmad before you can build this package.
*** If libmad is already installed, you may need to use the CPPFLAGS
*** environment variable to specify its installed location, e.g. -I

.
根据手册 得知这是一个环境变量的问题


还有要输进去的“--CPPFLAGS” “--LDFLAGS” 把前面的“--”去掉就好了。


到这里应该就没有什么问题了。


root@ubuntu:/opt/FriendlyARM/mini2440/madplay# cd target-x86/
root@ubuntu:/opt/FriendlyARM/mini2440/madplay/target-x86# ls
bin include lib man share
root@ubuntu:/opt/FriendlyARM/mini2440/madplay/target-x86# ls bin
abxtest madplay
root@ubuntu:/opt/FriendlyARM/mini2440/madplay/target-x86#


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇友善之臂 madplayer 移植过程补充 下一篇N叉树一 基本实现

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis 分布式锁全解 (2025-12-25 17:19:51)
·SpringBoot 整合 Red (2025-12-25 17:19:48)
·MongoDB 索引 - 菜鸟 (2025-12-25 17:19:45)
·What Is Linux (2025-12-25 16:57:17)
·Linux小白必备:超全 (2025-12-25 16:57:14)