Cross-compiler and common compilation errors

Source: Internet
Author: User
Tags touch command

(1) Cross Compiler

It can be executed on the host to compile other types of machines.CodeThe compiler is called the cross compiler. Most of the Development hosts for Embedded Linux are x86, while the processor of our embedded system may be non-x86 processors such as ARM/MIPS, at this time, the arm/MIPS cross compiler must be used to compile the code that can be executed on these processors. Here we use the latest arm Eabi compiler.

During compilation, the cross-compiler presets the hard floating point architecture (FPA) for floating-point operations without the CPU of FPA, such as Samsung 2440, FPE is used (float point emulation is soft floating point), so the speed is greatly limited. You can improve this by using Eabi (embeded application binary interface.

(2) do not modify makefile to build the compiling environment.

Copy arm-2008q3.tar.bz2 to a directory in Ubuntu, and decompress the package, for example, the directory is // 192.168.254.128/share/lzd/arm-2008q3. Use VI to edit/etc/bash. bashrc and add environment variable settings at the end of the file (note: the meaning of bin is the cross compiler tool directory ):

Path =/home/zhangcheng/share/lzd/arm-2008q3/bin: $ path
Export path

After saving the file, run the file once with source.

(3) GCC: Error trying to Exec 'cc1': execvp: no such file or directory solution

When compiling the Development Board environment today, the environment variables of the compiler are clearly set. The GCC: Error trying to Exec 'cc1': execvp: no such file or directory error message. Later I found a solution to solve the problem. Input whereis GCC to find several GCC, including/usr/bin/GCC. So I set the path to the past and then OK.

Path =/usr/bin/GCC:/home/zhangcheng/share/lzd/arm-2008q3/bin: $ path
Export path

(4) clock skew detected. Your build may be incomplete

If you have installed Windows and Linux, the system time may be faulty, resulting in a later file modification time than the system time. Two methods are available:
1. It should be the system clock error of your PC. correct modification in BIOS.
2. Use the touch command to modify the timestamp of all files to your current time. Solution: Find./-name "*"-exec touch {}\;

ReferenceArticle: Http://hi.baidu.com/xdyang1986/blog/item/cfbfb3cad7606212be09e6cf.html

Http://blog.163.com/sinomice@126/blog/static/130557593200992181616726/()

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.