munit-solutions / meta-azure-device-update

A meta layer for Azure Device Update
Other
8 stars 5 forks source link

Seemingly missing libcurl.so #16

Open SimonSimCity opened 2 years ago

SimonSimCity commented 2 years ago

I've now had it quite a couple of times, so lets note it down here also:

Once in a while, which usually happens once Microsoft ships a new version of one of the underlying dependencies, my build will fail with the following error:

NOTE: Executing Tasks
ERROR: azure-device-update-1.0+gitAUTOINC+2cd165ba05-r0 do_compile: Execution of '/home/yocto/project/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/azure-device-update/1.0+gitAUTOINC+2cd165ba05-r0/temp/run.do_compile.1697' failed with exit code 1
ERROR: Logfile of failure stored in: /home/yocto/project/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/azure-device-update/1.0+gitAUTOINC+2cd165ba05-r0/temp/log.do_compile.1697
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: VERBOSE=1 cmake --build /home/yocto/project/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/azure-device-update/1.0+gitAUTOINC+2cd165ba05-r0/build --target all --
| ninja: error: '/home/yocto/project/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/azure-iot-sdk-c/1.0+gitAUTOINC+54e345e990-r0/recipe-sysroot/usr/lib/libcurl.so', needed by 'src/adu-shell/adu-shell', missing and no known rule to make it
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/yocto/project/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/azure-device-update/1.0+gitAUTOINC+2cd165ba05-r0/temp/run.do_compile.1697' failed with exit code 1
ERROR: Task (/home/yocto/project/build/../meta-azure-device-update/recipes-azure-device-update/azure-device-update/azure-device-update_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2777 tasks of which 2770 didn't need to be rerun and 1 failed.

As discussed on another thread (https://github.com/Azure/iot-hub-device-update/issues/83) the issue seems to be that some part of the sstate-cache is not handled correctly, because after running a clean-sstate on various recipes of this meta-layer, it works again:

bitbake -c cleansstate azure-device-update azure-iot-sdk-c azure-sdk-for-cpp

In order to avoid this happening to other developers also, I thought of disabling the sstate-cache for those recipes (https://stackoverflow.com/questions/69674939/how-to-disable-sstate-cache-per-recipe-in-yocto), but I rather would see this as a dirty work-around instead of fixing the actual problem, which should be somewhere inside the recipes here.

If someone has enough knowledge on this topic, I would really appreciate some help to fix this once and for all in a proper way.