AnsweredAssumed Answered

Problem building own application in yocto

Question asked by Jakub Kowalski on Sep 30, 2016
Latest reply on Oct 2, 2016 by Jakub Kowalski

I'm trying to compile our own application using Yocto for a phyFlex board but am not able to get it running. 

Following the Makefile


CFLAGS=-lrt -lpthread
#CFLAGS += -I../../platform-Spectro2/build-target/linux-2.6.24/include/

CFLAGS += -g


all: automat

automat: automat.c
automat +: vm/vm.c vm/vm.h vm/componentdefs.c vm/componentdefs.h vm/blobtags.h vm/spectrometer.c vm/spectrometer.h speconfig/speconfiglib.c speconfig/speconfiglib.h
automat +: vm/chemometry.c vm/chemometry.h vm/chemoengine.h vm/textfile.c vm/textfile.h vm/tcpsocket.c vm/tcpsocket.h vm/datastore.c vm/datastore.h vm/dynamicdefs.c vm/dynamicdefs.h
automat +: vm/configuration.c vm/configuration.h vm/realtimeclock.c vm/realtimeclock.h vm/visualization.c vm/visualization.h
automat +: CANopen/CANopen.c CANopen/CANopen.h CANopen/mcp2515.c CANopen/mcp2515.h CANopen/lock.c CANopen/lock.h CANopen/Event.c CANopen/Event.h CANopen/CanBasic.c CANopen/CanBasic.h
automat +: CANopen/ComObj.c CANopen/ComObj.h CANopen/nmt.c CANopen/nmt.h CANopen/ObjDict.c CANopen/ObjDict.h


rm automat


and this is how my .bb looks like (the last version i've tried)


SECTION = "automat"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"

SRC_URI = "file://Makefile"


S = "${WORKDIR}"

EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} -lrt -lpthread -I${KERNEL_SRC} -g'"


do_install() {
oe_runmake all:
install -d ${D}${bindir}
install -m 0755 automat ${D}${bindir}


and finally the error


ERROR: Function failed: do_configure (log file is located at /opt/PHYTEC_BSPs/phyFLEX-i.MX6/build/tmp-glibc/work/cortexa9hf-vfp-neon-phytec-linux-gnueabi/automat/0.1-r0/temp/log.do_configure.12497)
ERROR: Logfile of failure stored in: /opt/PHYTEC_BSPs/phyFLEX-i.MX6/build/tmp-glibc/work/cortexa9hf-vfp-neon-phytec-linux-gnueabi/automat/0.1-r0/temp/log.do_configure.12497
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function do_configure
| NOTE: make CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -lrt -lpthread -I${KERNEL_SRC} -g clean
| rm automat
| rm: cannot remove `automat': No such file or directory
| make: *** [clean] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /opt/PHYTEC_BSPs/phyFLEX-i.MX6/build/tmp-glibc/work/cortexa9hf-vfp-neon-phytec-linux-gnueabi/automat/0.1-r0/temp/log.do_configure.12497)
ERROR: Task 3 (/opt/PHYTEC_BSPs/phyFLEX-i.MX6/sources/poky/meta-ired/recipes/automat/, do_configure) failed with exit code '1'


I'm really new into yocto and kernelbuilding in general. Any hints are very appreciated!