openwrt编译出错处理记录

1.代码从windows复制过来编译报错处理,参考:http://www.360doc.com/content/13/1016/21/3884271_321966616.shtml

2.编译lua-socket包时出错

  2.1 错误消息

undefined reference to `__stack_chk_fail' 

2.2 尝试解决方法:

  2.2.1 按照2.3.1解决方案将" -fno-stack-protector"加入rule.mk文件中的TARGET_CFLAGS中,仍旧出现该错误

     该方案出错原因:由于层次关系,可能在其他makefile中包含了"fstack_protector"选项

  2.2.2 最终解决方案:将终端中输出的编译项复制,去掉"fstack_protector"以后直接替换该包的编译选项,问题解决

  2.3 参考

    2.3.1 http://stackoverflow.com/questions/4492799/undefined-reference-to-stack-chk-fail

3.编译lua-bencode包时出现:bsh:hg:command not found 错误,apt-get install Mercurial 解决

4.uclibc++库应用补丁出错

  4.1 错误消息:  

Applying ./patches/006-eabi_fix.patch using plaintext: 
patching file include/typeinfo
patching file include/unwind-cxx.h
Hunk #1 FAILED at 173 (different line endings).
Hunk #2 FAILED at 181 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file include/unwind-cxx.h.rej
Patch failed!  Please fix ./patches/006-eabi_fix.patch!

  4.2 原因:unwind-cxx.h文件在windows下创建,行结束标志(\r\n)和liunx(\n)下的不一致

  4.3 解决方法:使用vi去除^M  模式:%s/^M$/g    (Ctrl+V+M输入^M)

  4.5 参考:

  4.5.1.http://openwares.net/linux/diff_and_patch.html 定位错误

  4.5.2 http://www.2cto.com/os/201304/205793.html vi如何去除^M

    4.5.3 http://www.cnblogs.com/elwinch/articles/2180521.html  关于linux中使用vim打开文件出现^M的解决方法

    4.5.4 http://www.cnblogs.com/jianyungsun/archive/2011/03/20/1989276.html   Vi/Vim查找替换使用方法

  4.5.5 http://www.cnblogs.com/emanlee/archive/2011/11/10/2243930.html   vi/vim 使用方法讲解

  4.5.6 http://www.cnblogs.com/pengdonglin137/p/3341159.html linux patch 格式与说明

posted @ 2015-07-22 11:35  goyier  阅读(3252)  评论(0编辑  收藏  举报