使抛出错误,但没有详细的错误消息 [英] Make threw out an error but no detailed error message

查看:56
本文介绍了使抛出错误,但没有详细的错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是在根目录/home/gm/TEST/上运行"make install"的输出的最后几行:

make[3]: Leaving directory `/home/gm/TEST/tppf/tm/ipmgt'
ld  ipfac.o ipfacV.o ipfac_rset.o ipfac_args.o ipfac_d2a.o ipfac_a2d.o ipfac_modr.o ipfac_mod.o ipfac_read.o ipfac_add.o ipfac_del.o ipfac_list.o ipfac_unlk.o ipfac_lock.o ipfac_util.o ipfac_lkid.o -r -o /home/gm/TEST/tppf/lib/ipfac_tppf.o
make[3]: Leaving directory `/home/gm/TEST/tppf/tm/ipfac'
make[2]: Leaving directory `/home/gm/TEST/tppf/tm'
make[1]: *** [i_tm] Error 2
make[1]: Leaving directory `/home/gm/TEST/tppf'
make: *** [i_tppf] Error 2

/home/gm/TEST/tppf/tm/ipfac下的Makefile包含以下规则:

install: ipfac.h $(TPPLIB)/ipfac_tppf.o

$(TPPLIB)/ipfac_tppf.o: $(PROPOBJS)
    ld  $(PROPOBJS) -r -o $(TPPLIB)/ipfac_tppf.o

链接过程有问题吗? Make应该告诉我错误实际上是什么,但事实并非如此.

顺便说一句,我认为是/home/gm/TEST/tppf/lib/ipfac_tppf. O已成功链接并创建,或者在make失败并退出后至少在目录/home/gm/TEST/tppf/lib/中存在.

解决方案

该行不是错误行.您可以说它成功了,因为那里没有错误消息,无法构建目标/home/gm/TEST/tppf/lib/ipfac_tppf.o.

错误在这里:

make[1]: *** [i_tm] Error 2

[1]表示它是makefile的第一级(请注意,此处引用的配方在makefile的第三级中),而[i_tm]表示目标i_tm的构建失败.您需要在make的输出中进一步查找,而不是向我们展示的那样,并找到用于构建i_tm目标的***错误行,并查看在那里生成了哪些错误.

Here's the last few lines from the output of running "make install" at root level /home/gm/TEST/:

make[3]: Leaving directory `/home/gm/TEST/tppf/tm/ipmgt'
ld  ipfac.o ipfacV.o ipfac_rset.o ipfac_args.o ipfac_d2a.o ipfac_a2d.o ipfac_modr.o ipfac_mod.o ipfac_read.o ipfac_add.o ipfac_del.o ipfac_list.o ipfac_unlk.o ipfac_lock.o ipfac_util.o ipfac_lkid.o -r -o /home/gm/TEST/tppf/lib/ipfac_tppf.o
make[3]: Leaving directory `/home/gm/TEST/tppf/tm/ipfac'
make[2]: Leaving directory `/home/gm/TEST/tppf/tm'
make[1]: *** [i_tm] Error 2
make[1]: Leaving directory `/home/gm/TEST/tppf'
make: *** [i_tppf] Error 2

And the Makefile under /home/gm/TEST/tppf/tm/ipfac contains this rule:

install: ipfac.h $(TPPLIB)/ipfac_tppf.o

$(TPPLIB)/ipfac_tppf.o: $(PROPOBJS)
    ld  $(PROPOBJS) -r -o $(TPPLIB)/ipfac_tppf.o

Is there something wrong with the linking process? Make should've told me what the error actually is, but it didn't.

BTW, I think /home/gm/TEST/tppf/lib/ipfac_tppf. O was linked and created successfully, or at least it was there in directory /home/gm/TEST/tppf/lib/ after make failed and exited.

解决方案

That line is not the error line. You can tell that it succeeded because there was no error message there, for building the target /home/gm/TEST/tppf/lib/ipfac_tppf.o.

The error is here:

make[1]: *** [i_tm] Error 2

The [1] means that it was the first level of makefile (note the recipe you are quoting here was in the 3rd level of makefile) and the [i_tm] means that the build of the target i_tm failed. You need to look back up further in the output of make, earlier than what you've shown us, and find the *** error line for building the i_tm target and see what errors were generated there.

这篇关于使抛出错误,但没有详细的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆