Bitbake cannot find build files

Viewed 34

I am trying to build my application and install it in my Linux image. I am getting the errors

| Assembler messages:
| Fatal error: can't create src/comms/CAN/dbcppp_map.o: No such file or directory
| Assembler messages:
| Fatal error: can't create src/comms/CAN/can.o: No such file or directory
| Assembler messages:
| Fatal error: can't create src/comms/CAN/dbcppp_map_config_parsing.o: No such file or directory
| Assembler messages:
| Fatal error: can't create src/comms/CAN/dbc_to_pgn_wrapper.o: No such file or directory
| make: *** [Makefile:1120: src/comms/CAN/dbc_to_pgn_wrapper.o] Error 2

This seems to me it cannot compile the source files. When I look in /build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/mainapplication/0.0-r0/MAIN_Application/src/comms/CAN I can see a .o file for every .c file.enter image description here

I was worried that this was old cached data so I deleted this folder and had it re-created. The error remained. So I deleted build-fb/tmp and build-fb/sstate_cache. The error remained. I have a build script that runs make and it runs to completion.

My bb file is as follows:

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

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

inherit autotools systemd

S = "${WORKDIR}/MAIN_Application"

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

SYSTEMD_SERVICE_${PN} = "mainapplication.service"

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

Edit: I am running bitbake -v mainapplication to build my module only. I get the same errors but I see no reason for the failures. No compilation errors.

Edit adding my makefile.am

AUTOMAKE_OPTIONS = foreign subdir-objects

bin_PROGRAMS = MAIN_Application

MAIN_Application_LDADD = -lsocketcan -lpthread -lm -lrt -lstdc++ -lssl -lcrypto -ldbcppp

CXXFLAGS += -std=c++17

AM_CPPFLAGS = \
-D_REENTRANT \
-D__X86_VERSION__ \
-DLINUX

# SMG Includes
AM_CPPFLAGS += \
-I$(srcdir)/include \
-I$(srcdir)/include/comms/CAN \
-I$(srcdir)/include/comms/PLC \
-I$(srcdir)/include/comms/UART \
-I$(srcdir)/include/VENDOR_Integration \
-I$(srcdir)/include/config_parsing \
-I$(srcdir)/include/utilities 

# vendor Includes
AM_CPPFLAGS += \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/include \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/model/Generic \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/net \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/state \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EVVisitor \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration/ev \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/msg \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/net \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/states \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/ApiV2g/ev \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/appHandshake \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/iso1 \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/iso2 \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/xmldsig \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon \
-I$(srcdir)/vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon

# SMG Sources
MAIN_Application_SOURCES = \
src/comms/CAN/can.c \
src/comms/CAN/can_config_parsing.c \
src/comms/CAN/can_data_aggregator.c \
src/comms/CAN/can_hal.c \
src/comms/CAN/can_ring_buffer.c \
src/comms/CAN/dbcppp_config_parsing.c \
src/comms/CAN/dbcppp_map.c \
src/comms/CAN/dbcppp_map_config_parsing.c \
src/comms/CAN/dbc_to_pgn_wrapper.c \
src/comms/PLC/plc_config_parsing.c \
src/comms/PLC/plc_handler.c \
src/comms/UART/uart_handler.c \
src/config_parsing/config_parser.c \
src/config_parsing/dbcppp_parser.c \
src/config_parsing/file_operations.c \
src/config_parsing/debug_config_reader.c \
src/main.cpp \
src/scheduler.c \
src/signal_handler.c \
src/thread_health.c \
src/utilities/dictionary.c \
src/utilities/logger.c \
src/utilities/ring_buffer.c \
src/utilities/string_operations.c \
src/utilities/time_conversions.c \
src/VENDOR_Integration/cml_integration.cpp \
src/VENDOR_Integration/sources/EV/model/Generic/SMG_EV_Model.cpp \
src/VENDOR_Integration/sources/EV/model/Generic/SMG_EvGenericVisitor.cpp \
src/VENDOR_Integration/sources/EV/state/SMG_IsoStatesMachine.cpp \
src/VENDOR_Integration/sources/EV/state/dc/SMG_EvStateImpl.cpp

# vendor sources
MAIN_Application_SOURCES += \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/CMLException.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/CmlIniParser.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/CmlObserver.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/CppProcess.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/CppThread.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/I2CUtils.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/SharedMemory.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/simpleIni.c \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/CmlCommon/TmRegistry.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/CTmCommonProcessEnvironment.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/dcc_util.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/external_events.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/logging.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/Modem.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/MountManager.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/Resource.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/ResponseFile.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/SemLock.cpp \
vendor/vendor_lab/SMG/trunk/TmCommon/sources/DccCommon/XTmEventListener.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration/BaseThread.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration/BoostShmObj.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration/ConfigFile.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration/ConfigurationWraper.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration/iniIpcLib.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration/modbusDataExchangeWraper.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/configuration/SupplyItemsManager.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/net/ISO_SSL.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/net/openSSLUtils.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/net/v2gtp.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/net/xbasic_handling.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/common/options/CommandLineOptions.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/net/GenericSocket.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/net/SdpDiscover.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/net/SocketStreamClient.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/net/UdpClientSocket.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/EvBuilder.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/EV/IsoEv.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/ApiV2g/ev/isoApiV2G.cpp \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/appHandshake/appHandEXIDatatypes.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/appHandshake/appHandEXIDatatypesDecoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/appHandshake/appHandEXIDatatypesEncoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec/BitInputStream.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec/BitOutputStream.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec/ByteStream.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec/DecoderChannel.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec/EncoderChannel.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec/EXIHeaderDecoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec/EXIHeaderEncoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/codec/MethodsBag.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/iso1/iso1EXIDatatypes.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/iso1/iso1EXIDatatypesDecoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/iso1/iso1EXIDatatypesEncoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/iso2/iso2EXIDatatypes.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/iso2/iso2EXIDatatypesDecoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/iso2/iso2EXIDatatypesEncoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/xmldsig/xmldsigEXIDatatypes.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/xmldsig/xmldsigEXIDatatypesDecoder.c \
vendor/vendor_lab/SMG/trunk/ISO15118_Stack/sources/v2g/xmldsig/xmldsigEXIDatatypesEncoder.c 

Edit: The bitbake build shows me the command it is running to compile can_hal.c. If I run this command myself it passes and I see the associated .o file!

0 Answers
Related