On 7 Dec 2023, at 12:28, Iurascu Teodor via lists.yoctoproject.org 
<iurascu_teo=hotmail....@lists.yoctoproject.org> 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

That’s not the whole makefile, can you verify that it’s actually using ${CC} 
and not gcc in every build step?

Run file on the libiobb.a to verify it contains what you expect.

Also install the library to ${D}${libdir}, /usr/local/ is for non-managed files 
and by writing a recipe it’s managed.

I also note that iobb is long-dead so there might be a better alternative now.

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61829): https://lists.yoctoproject.org/g/yocto/message/61829
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/leave/6691583/21656/737036229/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to