How to fix : ERROR: do_package_qa: QA Issue: No GNU_HASH in the elf binary

If you get the error as below, at the end of the compilation, check the solution to fix this,

ERROR: helloworld-0.1-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: '/home/myuser/poky/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/helloworld/0.1-r0/packages-split/helloworld/usr/bin/helloworld' [ldflags]
ERROR: helloworld-0.1-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: helloworld-0.1-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/myuser/poky/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/helloworld/0.1-r0/temp/log.do_package_qa.7193
ERROR: Task (/home/myuser/meta-lynxbee/recipes-example/example/ failed with exit code '1'
NOTE: Tasks Summary: Attempted 469 tasks of which 456 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

Solution :

 $ vim

and add following line and save file.


Now, save and compile program and you will not see that error. This above fix works only when you have your recipe does some compilation, but in certain scenarios where you want to integrate allready compiled binaries ( precompiled ) then above fix doesn’t work. In that case, use following lines into your recipe.

INSANE_SKIP_${PN} = "ldflags"
INSANE_SKIP_${PN}-dev = "ldflags"

If you use this INSANE_SKIP , it works for both cases and you may not need TARGET_CC_ARCH in first case.

Leave a Comment