Linux-xen compilation in Ubuntu

Source: Internet
Author: User
In Ubuntu compiled Linux-xen encountered arch/i386/kernel/head-xen.o can not find the problem, and the directory has the head-xen.S file, indicating that the previous work of make has not put this. the S file is compiled. o. For the same Code, there is no problem in compiling after svncheckout on ArchLinux and Fedora. The final problem is that Ubuntu points/bin/sh to/bin/dash by default.

In Ubuntu compiled Linux-xen encountered arch/i386/kernel/head-xen.o can not find the problem, and the directory has the head-xen.S file, indicating that the previous work of make has not put this. the S file is compiled. o. For the same Code, there is no problem in compiling the code after svn checkout on ArchLinux and Fedora.

The final problem is that Ubuntu will point/bin/sh to/bin/dash by default, in scripts/Makefile. add a line of SHELL =/bin/bash in build to specify $ (shell) to use bash. Later, I also searched why Ubuntu uses dash instead of bash. The reason is that the execution efficiency of dash is higher, but it is undeniable that this change also caused some projects to fail compilation, although the reason for compilation failure may be that Makefile uses some bash features instead of those provided by POSIX shell.

In addition, some debugging Makefile skills have been found on the Internet during the debugging process:

Make-n can only print the command to be executed, instead of actually executing

Make-np can print more information (rules and variables used) and execute each command

Remake is also a good choice: "remake is a patched and modernized version of GNU make utility that adds improved error reporting, the ability to trace execution in a comprehensible way, and a debugger ."

When checking shell commands, you can use set-x to make all shell commands output before execution.

Related Article

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.