[Solved] Problem tring to run gtk hello world (developper package) with bitbake (distribution package) : don't find how to properly source gtk.
Hello,
I'm trying to embed an app in the st-linux distribution. I mean that the goal is to have it compiled with bitbake and integrated in a custom st-image-weston.
I tried to use the gtk hello world example of Developper section (that run without problems) but with distribution package. ( https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Create_a_simple_hello-world_application )
So I made a bitbake recipe but when I run it I get the error "error: gtk/gtk.h: No such file or directory".
But bitbake layers include gtk+3, when I run bitbake gtk+3 it is successful.
I tried adding gtk3 to compiling flags, DEPENDS, RDEPENDS, do_configure[depends] but nothing worked. The only thing that worked is sourcing the developper package sdk environnement setup, but it's weird. I'm a little of a beginner with bitbake and I didn't found how to make that developper package app work with the distribution package.
Here is my .bb file :
# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to be fully functional.
# (Feel free to remove these comments when editing.)
# Unable to find any files that looked like license statements. Check the accompanying
# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.
#
# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start building - if
# this is not accurate with respect to the licensing of the software being built (it
# will not be in most cases) you must specify the correct value before using this
# recipe for anything other than initial testing/development!
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
# No information for SRC_URI yet (only an external source tree was specified)
SRC_URI = ""
# NOTE: this is a Makefile-only piece of software, so we cannot generate much of the
# recipe automatically - you will need to examine the Makefile yourself and ensure
# that the appropriate arguments are passed in.
do_configure () {
# Specify any needed configure commands here
:
}
do_compile () {
# You will almost certainly need to add additional arguments here
#. /mnt/sda3/STM32MP15-Ecosystem-v3.0.0/Developer-Package/openstlinux-5.10-dunfell-mp1-21-03-31/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
cd ${S}
#oe_runmake
${CC} ${CFLAGS} ${LDFLAGS} gtk_hello_world.c -o gtk_hello_world
}
do_install () {
# NOTE: unable to determine what to put here - there is a Makefile but no
# target named "install", so you will need to define this yourself
:
#oe_runmake install
}The source code is included with .bbappend file. I succesfully implemented a led blinking program and the following link into st-image-weston with bitbake but can't figure how to do in that case.
Any help would be appreciated. And thank you for reading that post.
