zlib.h is missing from cross compile toolchain

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

zlib.h is missing from cross compile toolchain

2,978 次查看
jackou
Contributor I

I am using FSL Community BSP 2.2 morty to build images on LS1021atwr board. 

I build the toolchain by :

   bitbake    meta-toolchain      #  SDKMACHINE="i686" in conf/local.conf to build for 32bit version

Everything builds fine and toolchain is installed to /opt/poky/2.2.2.

But when I compile an application which includes "zlib.h", it complains "include file not found".

I can't find zlib.h under /opt/poky/2.2.2/.

i check the root fs built, it has the libz.so.

Does anyone knows what is going on ?         

Thanks !

0 项奖励
回复
3 回复数

2,470 次查看
jackou
Contributor I

Below is the steps I follow:

1, mkdir ~/bin

2, curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

3, chmod a+x ~/bin/repo

4, mkdir fsl-community-bsp

5, cd fsl-community-bsp

6, ~/bin/repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b morty

7, ~/bin/repo sync

8, MACHINE=ls1021atwr DISTRO=poky source setup-environment testboard

9, bitbake -s | grep toolchain

         meta-extsdk-toolchain

         meta-toolchain

I have tried different DISTRO, but same result.   

In the meta-toolchain, zlib.h is missing. I can't see "fsl-toolchain" as a bitbake target.

Anything I am missing here to get the fsl-toolchain ?   

Thanks ! 

0 项奖励
回复

2,470 次查看
jackou
Contributor I

Thanks Pavel !

But it seems it doesn't have the target for fsl-toolchain.

When I run : bitbake -s | grep toolchain, it only shows:

   meta-extsdk-toolchain

   meta-toolchain

Before running bitbake, the environment is setup:

MACHINE=ls1021atwr DISTRO=xxx source setup-environment mydir/

I have tried different DISTRO: poky, fsl-x11, fslc-framebuffer..., basically all are the same, only provides meta-toolchain. 

Any idea what I am missing ?

Thanks a lot !

0 项奖励
回复

2,470 次查看
Pavel
NXP Employee
NXP Employee

It looks like that toolchain on your Linux host PC is not correctly installed.

Use the following command sequence for toolchain installing and GCC using.

We use ls012atwr as example.

  1. bitbake fsl-toolchain

 

  1. Run ./fsl-qoriq-glibc-x86_64-cortexa7hf-vfp-neon-toolchain-2.0.sh

from the following folder:

/QorIQ-SDK-V2.0-20160527-yocto/build_ls1021atwr/tmp/deploy/sdk$

 

  1. source ./environment-setup-cortexa7hf-vfp-neon-fsl-linux-gnueabi

 

  1. $CC test.c -o test.elf


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复