Freetype-2.2.1 for ARM compilation process

Source: Internet
Author: User

I. compiling environment
1. Compile the source code package to be used by FreeType.
Freetype-2.2.1.tar.bz2
Zlib-1.2.3.tar.gz

2. System Environment
Red Hat Linux9.0
Arm cross-compilation environment 2.95.3 (Path:/usr/local/ARM/2.95.3)

Ii. compilation process
1. Create a directory and decompress the source code
Mkdir/ft2
MV freetype-2.2.1.tar.bz2 zlib-1.2.3.tar.gz/ft2
CD/ft2
Tar-jxvf freetype-2.2.1.tar.gz
Tar-zxvf zlib-1.2.3.tar.gz
CP-RF freetype-2.2.1 freetype-x86
// When compiling the FreeType library of the arm version, the apinames tool of FreeType in the x86 version is required.
// This tool is available in the freetype-x86/objs/directory after the x86 version is compiled successfully
// Although the apinames tool is generated when the arm version is compiled, it cannot be run because it is an arm version,
// The following error message is displayed when the FreeType of ARM is compiled: apinames: cannot execute binary file.

2. Create a buildarm script
The buildarm script includes the following content:
#! /Bin/bash
Export Path =/usr/local/ARM/2.95.3/bin: $ path
Make

Modify the buildarm script to have the executable permission:
Chmod 777 buildarm

3. Compile FreeType's X86 version
CD freetype-x86
./Configure
Make

4. Compile the zlib arm version (use the arm libz library when compiling the FreeType arm Version)
CD zlib-1.2.3
Copy the buildarm script to the zlib-1.2.3 directory
./Configure
./Buildarm

Copy libz. A to/usr/local/ARM/2.95.3/ARM-Linux/lib (this path may be different)

5. Compile the FreeType arm version.
CD freetype-2.2.1
Copy buildarm to a freetype-2.2.1 directory
./Configure
./Buildarm

Note:
When the following error occurs/FT2/freetype-2.2.1/src/gzip/ftgzip. C: 45: zlib. h: no such file or directory
The zlib. h header file is not found. You can modify the 45 lines in the ftgzip. c file and change # include <zlib. h> to # include "zlib. H"
This should be because the header file zlib. h already exists in FreeType. After modification, continue to execute./buildarm

/FT2/freetype-2.2.1/objs/apinames: cannot execute binary file when the following error occurs
Please copy the freetype-x86/objs/apinames in the freetype-x86 to the freetype-2.2.1/objs/apinames, override the apinames in the freetype-2.2.1/objs/directory
Then run./buildarm.

After excluding the above errors, the compilation will be successful.
The FreeType library file you want is under the freetype-2.2.1/objs/. libs/path

The final success is achieved.

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.