Yocto Bitbake build errors

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

Yocto Bitbake build errors

996 Views
MichaelBMiner
Contributor IV

Hello all,

I have a Yocto project with two build types, dev and prod. The dev and prod builds vary in two ways.

  1. The dev build includes

 

# Extra image features required for debugging
IMAGE_INSTALL_append += " systemd-analyze"
IMAGE_INSTALL_append += " packagegroup-core-eclipse-debug"
IMAGE_INSTALL_append += " debugconfigs"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"

 

 

 

2. The prod build does not have the debug features but does build my mainapplication.bb

During development I have been building my dev image, installing it on my device then using eclipse to build/debug/deploy my application.  When working with eclipse I am cross compiling against the Yocto created SDK in /opt/fsl-imx-fb/5.10-hardknott/.

When I attempt to build for prod I was getting the following two errors:

| ../MY_Application/version:1:1: error: too many decimal points in number

 and 

../MY_Application/version:1:1: error: expected unqualified-id before numeric constant

Following the stack trace for each error always leads back to the version header file.

/home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/c++/version

This file is only ever included from the boost libraries. I am using autotools and have attempted editing my Makefile.am and configure.ac files, with no luck. As a last ditch effort I ran 

bitbake world -c cleanall --continue

I then ran my prod bitbake and got a new error. 

 

 

 

| configure: error: source directory already configured; run "make distclean" there first

 

 

 

Looking at the files date and time of creation I can see that my files are less than 24 hours old and no attempt to "make" the build was performed before this. If I navigate to the build directory and run "make distclean" the command will run an removes build files. Re-running my prod build I then get errors 

 

 

 

In file included from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/config/detail/select_stdlib_config.hpp:24,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/config.hpp:44,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/smart_ptr/bad_weak_ptr.hpp:20,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/smart_ptr/detail/shared_count.hpp:25,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/shared_ptr.hpp:17,
                 from ../MY_Application/vendor/cml/SMG/trunk/ISO15118_Stack/sources/EV/state/IsoStatesMachine.h:6,
                 from ../MY_Application/include/CML_Integration/cml_integration.hpp:18,
                 from ../MY_Application/src/CML_Integration/cml_integration.cpp:1:
../MY_Application/version:1:1: error: too many decimal points in number
    1 | 0.0.0
      | ^~~~~

 

 

 

as well as 

 

 

 

In file included from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/config/detail/select_stdlib_config.hpp:24,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/config.hpp:44,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/smart_ptr/bad_weak_ptr.hpp:20,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/smart_ptr/detail/shared_count.hpp:25,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/shared_ptr.hpp:17,
                 from ../MY_Application/vendor/cml/SMG/trunk/ISO15118_Stack/sources/EV/state/IsoStatesMachine.h:6,
                 from ../MY_Application/include/CML_Integration/cml_integration.hpp:18,
                 from ../MY_Application/src/main.cpp:13:
../MY_Application/version:1:1: error: expected unqualified-id before numeric constant
    1 | 0.0.0
      | ^~~~~

 

 

 

and 

 

 

 

../MY_Application/version:1:1: error: expected unqualified-id before numeric constant
In file included from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/sys/socket.h:33,
                 from /home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/net/if.h:26,
                 from ../MY_Application/include/comms/CAN/can.h:22,
                 from ../MY_Application/include/comms/UART/uart_handler.h:10,
                 from ../MY_Application/include/CML_Integration/cml_integration.hpp:22,
                 from ../MY_Application/src/CML_Integration/cml_integration.cpp:1:
/home/michael/Documents/MY_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/bits/socket.h:260:5: error: 'socklen_t' does not name a type; did you mean 'locale_t'?
  260 |     socklen_t msg_namelen; /* Length of address data.  */
      |     ^~~~~~~~~
      |     locale_t

 

 

 

To build my image I have an myapplication.inc which is the bulk of my project. This file includes all of my modules and necessary libraries. In this file I the following:

 

 

 

# Install necessary libraries
IMAGE_INSTALL_append = " packagegroup-core-ssh-openssh \
	openssl \
	can-utils \
	libsocketcan \
	sudo \
	iw wireless-tools wpa-supplicant \
	boost \
	libgpiod \
	lumissil \
	lumissil-kernel-module \
	ethtool \
	tcpdump "

# Install My applications
IMAGE_INSTALL_append = " udevrules \
			myconfigs \
			crccalculator \
			dbcppp "

 

 

 

When I include mainapplication in the list of # Install My applications I get the errors above. My mainapplication.bb is as follows:

 

 

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "\
    file://MY_Application \
        file://services \   
    "

inherit autotools systemd

S = "${WORKDIR}/MY_Application"

DEPENDS += " libsocketcan"
DEPENDS += " boost"
DEPENDS += " dbcppp"

SYSTEMD_SERVICE_${PN} = "myapplication.service"

do_install_append () {
    install -d ${D}${systemd_system_unitdir}
    install -m 0644 ${WORKDIR}/services/myapplication.service ${D}${systemd_system_unitdir}
    sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/myapplication.service
    
    install -d ${D}${bindir}
    install -m 0755 ${WORKDIR}/MY_Application/MY_Application ${D}${bindir}
}

 

 

I cannot find out why my application refuses to build with the installed boost and libsocketcan/can-utils I have included. Does anyone have any insight? 

I have tried to be as informative as possible, please let me know if more info is needed. 

Labels (3)
0 Kudos
Reply
2 Replies

925 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, here Jorge.

The error:

../MY_Application/version:1:1: error: too many decimal points in number
1 | 0.0.0
| ^~~~~

Seems to be caused from the version that is on EVCC_Application-master\evcc_layers\meta-evccapplication\recipes-core\EVCC_Application\files\EVCC_Application\version

Try using only one point, for example 0.0

Best regards.

0 Kudos
Reply

927 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, here Jorge.

Trying to build your project and seeing the output when you run the ''./bitbake_project.sh -b prod'' command, the build stops because you have some not declared variables/functions on the SMG_IsoStatesMachine.cpp file.

The errors occurs on the next lines:

../EVCC_Application/src/CML_Integration/sources/EV/state/SMG_IsoStatesMachine.cpp: In member function 'int32_t CISO15118StatesMachine::Processing(XEvChargingModel*)':
| ../EVCC_Application/src/CML_Integration/sources/EV/state/SMG_IsoStatesMachine.cpp:146:3: error: 'sleep' was not declared in this scope
| 146 | sleep(1);
| | ^~~~~
| ../EVCC_Application/src/CML_Integration/sources/EV/state/SMG_IsoStatesMachine.cpp:168:4: error: 'close' was not declared in this scope; did you mean 'clone'?
| 168 | close(m_clientStop);
| | ^~~~~
| | clone

The error seems to be on your application.

Best regards.

0 Kudos
Reply