* * No rules can be created "XXX" required for the goal of "XXX" problem solution

Source: Internet
Author: User
Tags crc32

First, the phenomenon

I'll go to the ubuntu12.04 environment before Redhat9.0 compiled uboot. Re-compiling the uboot error in Ubuntu environment. The compilation process is as follows:

    [email protected]:/home/hailin/Desktop/dream/tx2440/uboot/u-boot-2010.06#  make clean
    [email protected]:/home/hailin/desktop/dream/tx2440/uboot/u-boot-2010.06#  make TX2440_ Config
        configuring for TX2440 board ...
    [email protected]:/home/hailin/desktop/dream/tx2440/uboot/u-boot-2010.06#  make-j4
        generating include/autoconf.mk
        generating INCLUDE/AUTOCONF.MK . DEP
for dir in Tools Examples/standalone examples/api arch/arm/cpu/arm920t/home/hailin/Desktop/dream/tx2440/uboot/ u-boot-2010.06/arch/arm/cpu/arm920t/; Do \
Make-c $dir _depend, done
Make[1]: Entering directory '/home/hailin/desktop/dream/tx2440/uboot/u-boot-2010.06/tools '
MAKE[1]: Nothing can be done for ' _depend '.
Make[1]: Leaving directory '/home/hailin/desktop/dream/tx2440/uboot/u-boot-2010.06/tools '

。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 Partial compilation output omitted here
MAKE[1]: Entering directory '/home/hailin/desktop/dream/tx2440/uboot/u-boot-2010.06/tools '
MAKE[1]: * * * No rules can create "CRC32.O" required target "/home/hailin/u-boot-2010.06/lib/crc32.c". Stop it.
MAKE[1]: Leaving directory '/home/hailin/desktop/dream/tx2440/uboot/u-boot-2010.06/tools '
Make: * * * [Tools] Error 2
Make: * * is waiting for unfinished tasks ....
MAKE[1]: Entering directory '/home/hailin/desktop/dream/tx2440/uboot/u-boot-2010.06/examples/standalone '
MAKE[1]: * * * No rules can create "HELLO_WORLD.O" required target "/home/hailin/u-boot-2010.06/include/common.h". Stop it.
MAKE[1]: Leaving directory '/home/hailin/desktop/dream/tx2440/uboot/u-boot-2010.06/examples/standalone '
Make: * * [Examples/standalone] Error 2
Make: * * * Wait: No child processes. Stop it.

[Email protected]:/home/hailin/Desktop/dream/tx2440/uboot/u-boot-2010.06#

Why before in the Redhat environment, can compile successfully, and to Ubuntu environment will appear no rules??

Second, the solution

Enter the following command:

Make Disclean

Make Tx2440_config

Make-j4

Output Result:

Why did you change make to Distclean to be successful???

Three, the principle

The first thing we have to mention is the difference between make and make Distclean: Make clean is just to erase the previously compiled executable and configuration files. And make Distclean to clear all the generated files
Make Distclean is similar to do clean, but it also removes all configure generated files, including makefile.

From the above analysis can be seen, the root cause of the above problem is because, from the Redhat uboot code has a configuration file, is generated according to the original compilation environment, just by making clean can not clear the previous configuration file, not clear the previous configuration file to compile, Compiler in the belief that the programmer's attitude, the compilation will not produce a new configure generated by the accompanying file, but based on the original configure generated files to compile, which will lead to the above series of compilation errors. Make Distclean can clean up all the junk, all the remnants of the previous environment, so that it doesn't give the compiler a chance to be lazy.

* * No rules can be created "XXX" required for the goal of "XXX" problem solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.