【续《痛苦的版本对齐(2) 和时间的相关性》】http://www.cnblogs.com/yvivid/p/3541142.html

初步定位,如下告警为.depend文件路径问题导致。

.depend:9: *** multiple target patterns.  Stop

打开.depend文件(有裁剪,仅显示重要的部分)

start.o: start.S /u-boot-1.1./u-boot-1.1./include/config.h \
/u-boot-1.1./u-boot-1.1./include/cmd_confdefs.h \
/u-boot-1.1./u-boot-1.1./include/asm/arch/sizes.h \
/u-boot-1.1./u-boot-1.1./include/version.h \
interrupts.o: interrupts.c /u-boot-1.1./u-boot-1.1./include/common.h \
/u-boot-1.1./u-boot-1.1./include/config.h \
/u-boot-1.1./u-boot-1.1./include/linux/string.h \
/u-boot-1.1./u-boot-1.1./include/asm/string.h \
/u-boot-1.1./u-boot-1.1./include/asm/ptrace.h \
/u-boot-1.1./u-boot-1.1./include/asm/proc/ptrace.h \
d:/cygwin/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3./include/stdarg.h \

为了找到问题,需要找.depend是谁生成的,

_depend:    $(obj).depend

$(obj).depend:    $(src)Makefile $(TOPDIR)/config.mk $(SRCS)
@rm -f $@
@for f in $(SRCS); do \
g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
$(CC) -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
done

产生.depend信息的其实是 $(CC),其实就是交叉编译器,为了简化说明,下面用标准的gcc说明,

gcc -M 可以输出 编译文件需要的相关引用文件

$ gcc -M hello.c
hello.o: hello.c /usr/include/stdio.h /usr/include/_ansi.h \
/usr/include/newlib.h /usr/include/sys/config.h \
/usr/include/machine/ieeefp.h /usr/include/sys/features.h \
/usr/include/cygwin/config.h \
/usr/lib/gcc/i686-pc-cygwin/4.5./include/stddef.h \
/usr/lib/gcc/i686-pc-cygwin/4.5./include/stdarg.h \
/usr/include/sys/reent.h /usr/include/_ansi.h /usr/include/sys/_types.h \
/usr/include/machine/_types.h /usr/include/machine/_default_types.h \
/usr/include/sys/lock.h /usr/include/sys/types.h \
/usr/include/machine/types.h /usr/include/cygwin/types.h \
/usr/lib/gcc/i686-pc-cygwin/4.5./include/stdint.h /usr/include/stdint.h \
/usr/include/endian.h /usr/include/bits/endian.h /usr/include/byteswap.h \
/usr/include/sys/sysmacros.h /usr/include/sys/stdio.h \
/usr/include/sys/cdefs.h

总结,出现上述告警的条件有两个,

1、编译工具,输出了"d:/"这样的路径名。

2、make工具,无法识别"d:/"的信息。

解决问题也就比较清楚,

1、把工具链整理顺(换交叉编译工具,或cygwin下的make)

2、自己做个转换工具,在rules.mk中调用,对.depend进行 路径转换。(可以利用自己熟悉的工具,如C程序、python程序,甚至bash下相关工具)

3、在linux系统下处理。

痛苦的版本对齐(3) cygwin下的路径引用的更多相关文章

  1. 痛苦的版本对齐(3) cygwin下的路径引用(sed解决篇)

    上次问题(见http://www.cnblogs.com/yvivid/p/3546649.html),.depend信息路径错误的问题. 主要尝试了,在(虚拟机下构建)linux下编译,确实没有问题 ...

  2. 【记录】cygwin下折腾个人配置环境

    (本文由hcbbt发布,转载请注明出处,blog.csdn[dot]net/hcbbT)      cygwin是windows下的linux的模拟环境,不仅可以执行linux的各种命令,可以在cyg ...

  3. cygwin下的vim 的vimrc配置

    1.一直接照 vim 在linux的配置使用 cygwin下的 vi. vim --version 之后,出现了帮助...

  4. iOS的UILabel设置居上对齐,居中对齐,居下对齐

    在iOS中默认的UILabel中的文字在竖直方向上只能居中对齐,博主参考国外网站,从UILabel继承了一个新类,实现了居上对齐,居中对齐,居下对齐.具体如下: // //  myUILabel.h ...

  5. cygwin下配置alias

    主要是cygwin下的盘符映射关系容易忘,直接用mount命令: 所以,找到E:\cygwin64\home\Administrator下面的.bashrc,添加alias.如下:

  6. cygwin下java报错“找不到或无法加载主类”的故障排除

    win7 下安装了java,命令行下可以正常运行,cygwin下报错:找不到或无法加载主类. 经排查发现是cygwin的~/.bash_profile中画蛇添足的配置了$CLASSPATH: JAVA ...

  7. cygwin 下安装python MySQLdb

    cygwin 下安装python MySQLdb 1) cygwin 更新 运行 cygwin/setup-x86_64.exe a 输入mysql,选择下面的包安装: libmysqlclient- ...

  8. Cygwin下编译的程序不使用Cygwin.dll即可运行的命令 及常用命令简介

    cc -mno-cygwin foo.c 1.$ ps PS的相关用法: QuoteUsage ps [-aefl] [-u uid]-f = show process uids, ppids-l = ...

  9. 在cygwin下创建的文件位于windows的哪个目录下?

    答: 1. C盘的SPB_Data目录下 2. 在cygwin下通过pwd命令可以查看,例如: jello@jello ~ $ pwd /cygdrive/c/SPB_Data (/cygdrive/ ...

随机推荐

  1. ajax创建对象

    <script>     function createAjax(){         var request=false;                   //window对象中有X ...

  2. Expedition(优先队列)

    Expedition 点我 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9465   Accepted: 2760 Des ...

  3. Java Spring MVC

    Spring MVC的实现包括 实现Controller类和基于注解的Controller RequstMapping方式 依赖: <!-- https://mvnrepository.com/ ...

  4. WPF笔记(1.10 绘图)——Hello,WPF!

    原文:WPF笔记(1.10 绘图)--Hello,WPF! 书中的代码语法过时了,改写为以下(测试通过):         <Button>            <Button.L ...

  5. 在wpf中如何让MediaElement的视频循环播放

    原文:在wpf中如何让MediaElement的视频循环播放 MediaElement原始的播放是只播放一遍:如何设置让MediaElement播放 的视频或者音频循环播放,解决如下: 修改Media ...

  6. tk资料

    Hello World: 让我们开始,作为其他教程的开始, 以"Hello World"程序创建一个文件 叫做Hello.pl  键入下面的内容到它这里: #!/usr/local ...

  7. 在非MFC的win 32程序里面能够使用CString类

    论坛有会员用到了.,今天给大家说说CSring如何在非mfc下的调用第一:先要包含 #include "afx.h" 包含之后会报windows.h重复定义我们需要把这个头文件包含 ...

  8. iframe父子页面互调方法和属性

    1.iframe子页面调用 父页面js函数 子页面调用父页面函数只需要写上window.praent就可以了.比如调用a()函数,就写成: window.parent.a(); 子页面取父页面中的标签 ...

  9. Implement Queue using Stacks 解答

    Question Implement the following operations of a queue using stacks. push(x) -- Push element x to th ...

  10. java编译相关问题总结

    参考:http://jingyan.baidu.com/article/5bbb5a1b080f6113eba179f0.html 1.在linux下生成的class文件/jar包,拿到windows ...