Hi,
I am trying to bitbake nsgtk a c file of which the content is -
nsgtk.c
#include <gtk/gtk.h>
static void
activate (GtkApplication* app,
gpointer user_data)
{
GtkWidget *window;
window = gtk_application_window_new (app);
gtk_window_set_title (GTK_WINDOW (window), “Window”);
gtk_window_set_default_size (GTK_WINDOW (window), 800, 480);
gtk_widget_show_all (window);
}
int
main (int argc, char **argv)
{
GtkApplication *app;
int status;
app = gtk_application_new (“org.gtk.example”, G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, “activate”, G_CALLBACK (activate), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
return status;
}
My meta-customer directory structure is -
ansij@mansij-Inspiron-N5050:~/oe-core/layers/meta-customer$ tree
.
├── COPYING.MIT
├── README
├── conf
│ └── layer.conf
├── recipes-customer
│ ├── hello-world
│ │ ├── hello-world
│ │ │ └── hello-world.c
│ │ └── hello-world_1.0.0.bb
│ ├── iptx
│ │ ├── iptx
│ │ │ └── iptx.c
│ │ └── iptx_1.0.0.bb
│ └── nsgtk
│ ├── nsgtk
│ │ └── nsgtk.c
│ └── nsgtk_1.0.0.bb
└── recipes-example
└── example
└── example_0.1.bb
My nsgtk_1.0.0.bb file is -
Package summary
SUMMARY = “nsgtk”
License, for example MIT
LICENSE = “MIT”
License checksum file is always required
LIC_FILES_CHKSUM = “file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302”
nsgtk.c from local file
SRC_URI = “file://nsgtk.c”
Change source directory to workdirectory where nsgtk.c is
S = “${WORKDIR}”
DEPENDS += “gtk+3”
Process permissions, Working directory, file creation mask, Special variables, and Open files
inherit pkgconfig
Set LDFLAGS options provided by the build system
TARGET_CC_ARCH += “${LDFLAGS}”
Compile nsgtk.c from sources, no Makefile
do_compile() {
${CC} -Wall ${LDFLAGS} nsgtk.c -o hello_gtk pkg-config --cflags --libs gtk+-3.0
}
Install binary to final directory /usr/bin
do_install() {
install -d ${D}${bindir}
install -m 755 ${S}/nsgtk ${D}${bindir}/
}
bitbake nsgtk gives following error -
DEBUG: Executing shell function do_install
| install: cannot stat ‘/home/mansij/oe-core/build/tmp/work/armv7at2hf-neon-tdx-linux-gnueabi/nsgtk/1.0.0/nsgtk’: No such file or directory
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/mansij/oe-core/build/…/layers/meta-customer/recipes-customer/nsgtk/nsgtk_1.0.0.bb:do_install) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 4355 tasks of which 4345 didn’t need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 17 seconds
Summary: 1 task failed:
/home/mansij/oe-core/build/…/layers/meta-customer/recipes-customer/nsgtk/nsgtk_1.0.0.bb:do_install
Summary: There were 2 WARNING messages.
Summary: There was 1 ERROR message, returning a non-zero exit code.
Can you help?
Thanks,
Mansij