Problems with using libxml2

I suspect the libxml2 you add to the toolchain is not an official one.
The official way should be using the libxml2 stuff from yocto recipe.

Here is what I try on WP76 source:

  1. download the yocto source from source.sierrawireless.com

https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-13,-d-,1-components/#sthash.2vlTNVx1.dpbs

  1. go to ./meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc

3.add the following line:
IMAGE_INSTALL_append = " libxml2"

  1. Make the yocto image

  2. the include path now should be in yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/libxml2/2.9.7-r0/image/usr/include/libxml2/

  3. in component.cdef, add the following:

    cflags:
    {

     -I/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/libxml2/2.9.7-r0/image/usr/include/libxml2/
    

    }