zlib.h is missing from cross compile toolchain

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

zlib.h is missing from cross compile toolchain

1,713 Views
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 Kudos
3 Replies

1,205 Views
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 Kudos

1,205 Views
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 Kudos

1,205 Views
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 Kudos