Boost and LibSocketCan Errors #bitbake


michaelb.miner@...
 

Hello,

I have an application that is comprised of C++ and C code modules. I have two bitbake builds, prod and dev. The dev image builds 100% of the time. The difference between prod and dev, dev has debug tools, prod build the main application and attempts to include it in the image. I cannot build the prod image. I am getting two errors that I cannot resolve. Note that my build script works on the target hardware as well as the development Ubnuntu platform.

I am using autotools, autogen.sh, configure.ac and makefile.am to build my application. The files are uploaded to this question.

I have uploaded my file to my google drive here. The files are 
  • build_project.sh
  • configure.ac
  • autogen.sh
  • makefile.am
  • mainapplication_0.0.bb
  • mainapplication.inc
  • mainapplication-dev.bb
  • myapplication.bb

The following two errors come from boost:
arm-poky-linux-gnueabi-gcc  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot -DPACKAGE_NAME=\"MAIN_Application\" -DPACKAGE_TARNAME=\"main_application\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"MAIN_Application\ 0.0.1\" -DPACKAGE_BUGREPORT=\"michaelminer@...\" -DPACKAGE_URL=\"\" -DPACKAGE=\"main_application\" -DVERSION=\"0.0.1\" -I. -I../MAIN_Application  -D_REENTRANT -D__X86_VERSION__ -DLINUX -I../MAIN_Application/include -I../MAIN_Application/include/comms/CAN -I../MAIN_Application/include/comms/PLC -I../MAIN_Application/include/comms/UART -I../MAIN_Application/include/CML_Integration -I../MAIN_Application/include/config_parsing -I../MAIN_Application/include/utilities -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/include -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV/model/Generic -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV/net -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV/state -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EVVisitor -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/configuration -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/configuration/ev -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/msg -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/net -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/states -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/ApiV2g/ev -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/appHandshake -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/codec -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/iso1 -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/iso2 -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/xmldsig -I../MAIN_Application/vendor/carmedialab/SMG/trunk/TmCommon/sources/CmlCommon -I../MAIN_Application/vendor/carmedialab/SMG/trunk/TmCommon/sources/DccCommon   -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0=/usr/src/debug/mainapplication/0.0-r0                      -fdebug-prefix-map=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0=/usr/src/debug/mainapplication/0.0-r0                      -fdebug-prefix-map=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot-native=  -c -o src/utilities/dictionary.o ../MAIN_Application/src/utilities/dictionary.c
In file included from /home/michael/Documents/MAIN_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/MAIN_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/MAIN_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/MAIN_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/MAIN_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/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/shared_ptr.hpp:17,
                 from ../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV/state/IsoStatesMachine.h:6,
                 from ../MAIN_Application/include/CML_Integration/cml_integration.hpp:18,
                 from ../MAIN_Application/src/main.cpp:13:
../MAIN_Application/version:1:1: error: too many decimal points in number
    1 | 0.0.0
      | ^~~~~
  
version:1:1: error: expected unqualified-id before numeric constant

The final error comes from can-untils.
In file included from /home/michael/Documents/MAIN_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/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/netinet/in.h:23,
                 from ../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/net/v2gtp.h:34,
                 from ../MAIN_Application/src/CML_Integration/sources/EV/state/dc/SMG_EvStateImpl.cpp:7:
/home/michael/Documents/MAIN_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'?
socklen_t is defined in unistd.h which is present in my recipe-sysroot folder under usr/include. Is there a clear issue with my build files? I have been searching for an answer for a few days now and I have come up empty handed. Hoping someone here can assist.
 


Marek Belisko
 

Hi Michael,

On Thu, Sep 29, 2022 at 10:27 PM <michaelb.miner@...> wrote:

Hello,

I have an application that is comprised of C++ and C code modules. I have two bitbake builds, prod and dev. The dev image builds 100% of the time. The difference between prod and dev, dev has debug tools, prod build the main application and attempts to include it in the image. I cannot build the prod image. I am getting two errors that I cannot resolve. Note that my build script works on the target hardware as well as the development Ubnuntu platform.

I am using autotools, autogen.sh, configure.ac and makefile.am to build my application. The files are uploaded to this question.
google link doesn't work.

I have uploaded my file to my google drive here. The files are

build_project.sh
configure.ac
autogen.sh
makefile.am
mainapplication_0.0.bb
mainapplication.inc
mainapplication-dev.bb
myapplication.bb


The following two errors come from boost:

arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot -DPACKAGE_NAME=\"MAIN_Application\" -DPACKAGE_TARNAME=\"main_application\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"MAIN_Application\ 0.0.1\" -DPACKAGE_BUGREPORT=\"michaelminer@...\" -DPACKAGE_URL=\"\" -DPACKAGE=\"main_application\" -DVERSION=\"0.0.1\" -I. -I../MAIN_Application -D_REENTRANT -D__X86_VERSION__ -DLINUX -I../MAIN_Application/include -I../MAIN_Application/include/comms/CAN -I../MAIN_Application/include/comms/PLC -I../MAIN_Application/include/comms/UART -I../MAIN_Application/include/CML_Integration -I../MAIN_Application/include/config_parsing -I../MAIN_Application/include/utilities -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/include -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV/model/Generic -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV/net -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV/state -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EVVisitor -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/configuration -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/configuration/ev -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/msg -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/net -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/states -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/ApiV2g/ev -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/appHandshake -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/codec -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/iso1 -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/iso2 -I../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/v2g/xmldsig -I../MAIN_Application/vendor/carmedialab/SMG/trunk/TmCommon/sources/CmlCommon -I../MAIN_Application/vendor/carmedialab/SMG/trunk/TmCommon/sources/DccCommon -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0=/usr/src/debug/mainapplication/0.0-r0 -fdebug-prefix-map=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0=/usr/src/debug/mainapplication/0.0-r0 -fdebug-prefix-map=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot-native= -c -o src/utilities/dictionary.o ../MAIN_Application/src/utilities/dictionary.c
In file included from /home/michael/Documents/MAIN_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/MAIN_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/MAIN_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/MAIN_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/MAIN_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/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/boost/shared_ptr.hpp:17,
from ../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/EV/state/IsoStatesMachine.h:6,
from ../MAIN_Application/include/CML_Integration/cml_integration.hpp:18,
from ../MAIN_Application/src/main.cpp:13:
../MAIN_Application/version:1:1: error: too many decimal points in number
1 | 0.0.0
| ^~~~~

version:1:1: error: expected unqualified-id before numeric constant
Without seeing source hard to say what it can be but it looks like
typo or so as float numbers use only one '.' ;)


The final error comes from can-untils.

In file included from /home/michael/Documents/MAIN_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/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/recipe-sysroot/usr/include/netinet/in.h:23,
from ../MAIN_Application/vendor/carmedialab/SMG/trunk/ISO15118_Stack/sources/common/net/v2gtp.h:34,
from ../MAIN_Application/src/CML_Integration/sources/EV/state/dc/SMG_EvStateImpl.cpp:7:
/home/michael/Documents/MAIN_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'?

socklen_t is defined in unistd.h which is present in my recipe-sysroot folder under usr/include. Is there a clear issue with my build files? I have been searching for an answer for a few days now and I have come up empty handed. Hoping someone here can assist.
Which poky version do you use? Do you use a custom kernel/libc? Can
you please ellaborate?





BR,

marek
--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com