Can you run file command on libiobb.a it seems its not built for either correct architecture or is corrupted in SDK somehow.

It will be good to use AR/RANLIB/CC/CXX variables in your Makefile and weakly assign them e.g.

CC ?= cc

AR ?= ar

...


On 12/7/23 4:28 AM, Iurascu Teodor wrote:
Hello,

I have created a recipe to include the IOBB library in the SDK. Trying to compile a .c file in the SDK environment gives me this error:

$ ${CC} pb-test-inputs.c -liobb
/opt/poky/4.2.2/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/12.3.0/ld: /opt/poky/4.2.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/local/lib/libiobb.a: error adding symbols: file format not recognized

Recipe file:

do_compile () {
    # You will almost certainly need to add additional arguments here
    oe_runmake cc=${CC}
}

do_install () {
    # This is a guess; additional arguments may be required
    oe_runmake install locatie=${D}
    #rm ${D}/usr/local/lib/libiobb.a
}


Makefile:

libiobb.a: ${LIB_PATH}BBBiolib.c ${LIB_PATH}BBBiolib.h BBBiolib_PWMSS.o BBBiolib_McSPI.o BBBiolib_ADCTSC.o i2cfunc.o
${cc}-c ${LIB_PATH}BBBiolib.c -o ${LIB_PATH}BBBiolib.o
ar -rs ${LIB_PATH}libiobb.a ${LIB_PATH}BBBiolib.o ${LIB_PATH}BBBiolib_PWMSS.o ${LIB_PATH}BBBiolib_McSPI.o ${LIB_PATH}BBBiolib_ADCTSC.o ${LIB_PATH}i2cfunc.o

Thank you!





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61835): https://lists.yoctoproject.org/g/yocto/message/61835
Mute This Topic: https://lists.yoctoproject.org/mt/103032949/21656
Mute #yocto:https://lists.yoctoproject.org/g/yocto/mutehashtag/yocto
Mute #sdk:https://lists.yoctoproject.org/g/yocto/mutehashtag/sdk
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to