[iMX8M-DemoFramework Sample OpenCL Code][Yocto Build] fatal error: IL/il.h: No such file or directory

cancel
Showing results for 
Search instead for 
Did you mean: 

[iMX8M-DemoFramework Sample OpenCL Code][Yocto Build] fatal error: IL/il.h: No such file or directory

1,303 Views
vinay_surendran
Contributor III

Hi NXP,

I built the Yocto Build SDK environment on my Ubuntu 16.04 PC as mentioned in the Yocto Project User's Guide and the also referred to the Linux User's Guide.

While building the demo OpenCL application DemoApps/OpenCL/Info from the DemoFramework (GitHub - NXPmicro/gtec-demo-framework), using the following command:  

FslBuild.py --Variants [WindowSystem=Wayland] --BuildThreads 2

I am getting the following error:

source/FslDemoApp/Util/Graphics/Service/ImageLibrary/ImageLibraryServiceDevIL.cpp:48:10: fatal error: IL/il.h: No such file or directory
 #include <IL/il.h>

Kindly let me know how it could be resolved.

Thanks and regards

Vinay

7 Replies

441 Views
rvalvekar
Contributor III

Hi Vinay,

If you make an SDK of the image that you have already produced using bitbake, most of the libraries are already included. 

I had the same problem.

0 Kudos

441 Views
takashi_yahata
Contributor II

I am having the same error.  How did you solve the problem?  The answer by Bio_TICFSL looks like Ubuntu solution using apt-get.  I need to do Building by Yocto. 

Best Regards,

--

Takashi yahata

0 Kudos

441 Views
vinay_surendran
Contributor III

:smileyplus:

The apt-get solution is not useful.. It only configures on the Ubuntu side.. Whereas, we need the headers within the Yocto SDK, since we are doing a Yocto based build.

0 Kudos

441 Views
vinay_surendran
Contributor III

Hi Takashi san

Konnichiwa!

This is a very frustrating problem.. Luckily, I could solve it after many days of work.

Let me explain how I resolved it, here:

Reason for the error:

Since we are doing a Yocto Build, we need a Yocto build environment configured within the Ubuntu Terminal session, where we are running the FslBuild.py script. It's mentioned in this link:

gtec-demo-framework/Setup_guide_yocto.md at master · NXPmicro/gtec-demo-framework · GitHub 

In the above link, it's mentioned that you need to install the SDK by using the following command:

./fsl-imx-internal-xwayland-glibc-x86_64-fsl-image-gui-aarch64-toolchain-4.9.51-mx8-beta.sh

But the above shell script is no longer readily available for download anywhere on the internet. So we have to build this SDK by ourselves, for the appropriate hardware that we are using and install it before we can run FslBuild.py.

The IL/il.h headers are available within this SDK that are compatible for our application.

Solution:

Build the SDK code and generate the SDK installer script (shell script) by referring to :

gtec-demo-framework/Setup_guide_yocto.md at master · NXPmicro/gtec-demo-framework · GitHub 

and also the i.MX_Yocto_Project_User's_Guide.pdf. [Use the above link as a reference, to go to the appropriate sections within the Yocto Users' Guide document. This will be much more easier. Follow the setup steps and board configuration names as per the Users' Guide document.]

- Build the Yocto SDK for the hardware board that you are using.

- This will generate a SDK installer shell script.

- Use this script to install the SDK.

- After installation, setup the environment variables within the Ubuntu Terminal session using a command like this:

      source ~/sdk/4.9.51-mx8-beta/environment-setup-aarch64-poky-linux

Configure the following environment variables too (ROOTFS path should be updated as per your system path):

export FSL_PLATFORM_NAME=Yocto
export ROOTFS=~/sdk/4.9.51-mx8-beta/sysroots/aarch64-poky-linux

After all the above are done, you may proceed with using FslBuild.py script to build your application.

Hope this helps! 

Arigato Gozaimasu.

-Vinay

441 Views
takashi_yahata
Contributor II

Vinay-san

Thanks for your advice.
I found the header IL/il.h under the "sysroots-components" directory of Yocto BUILD_DIR.
I did copy it and some other headers, library files to the SDK installed directory then the compile was succeeded.

Arigato

--
Takashi Yahata

441 Views
vinay_surendran
Contributor III

Takashi-san

Glad to know that it has been fixed!

Your solution seems interesting and much simpler too.

Arigato

Vinay

0 Kudos

441 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Vinay,

You need install the libdevil-dev libraries.

regards

0 Kudos