Hi Danile,
Thank you so much for your help. My .bb file now looks like as attached. Did 
your tar file have .a and .so?? I am getting errors because of them. Can I 
force the do_package_qa to skip?
Thanks,
Regards
Swapna

From: Daniel. [mailto:danielhi...@gmail.com]
Sent: Tuesday, November 01, 2016 1:18 PM
To: Paul Eggleton <paul.eggle...@linux.intel.com>
Cc: Swapna Gurumani - C40450 <swapna.gurum...@microchip.com>; 
yocto@yoctoproject.org
Subject: Re: [yocto] how to copy a tar file to Root file system

I have an example of a recipe exploding a tar here: 
https://gist.github.com/gkos/02eccb8e1e02312327aa6db6cdc9d501
The tar is used as a source. So the bitbake explodes it to ${WORKDIR} and I 
simply copy it to /opt
I hope that this helps :)
Regards,

2016-11-01 18:00 GMT-02:00 Paul Eggleton 
<paul.eggle...@linux.intel.com<mailto:paul.eggle...@linux.intel.com>>:
On Tue, 01 Nov 2016 18:45:02 
swapna.gurum...@microchip.com<mailto:swapna.gurum...@microchip.com> wrote:
> Every step I take close, I take 2 back :(
> My bb now looks like the one attached. I had to add each folder for
> FILES_${PN} contrary to your advice otherwise I got the following error:
> ERROR: crank-1.0-r2 do_package: QA Issue: crank: Files/directories were
> installed but not shipped in any package: /opt
>   /opt/crank
> Please set FILES such that these items are packaged. Alternatively if they
> are unneeded, avoid installing them or delete them within do_install.
> crank: 2 installed and not shipped files. [installed-vs-shipped]
>
>
>
> I am now getting the following error:
> ERROR: crank-1.0-r2 do_install: Function failed: do_install (log file is
> located at
> /home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon
> -poky-linux-gnueabi/crank/1.0-r2/temp/log.do_install.26457) ERROR: Logfile
> of failure stored in:
> /home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon
> -poky-linux-gnueabi/crank/1.0-r2/temp/log.do_install.26457
> Log data follows:
> | DEBUG: Executing shell function do_install
> | cp: cannot stat
> | '/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-n
> | eon-poky-linux-gnueabi/crank/1.0-r2/crank': No such file or directory
> | WARNING:
> | /home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-ne
> | on-poky-linux-gnueabi/crank/1.0-r2/temp/run.do_install.26457:1 exit 1 from
> | 'cp -a --no-preserve=ownership
> | /home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-ne
> | on-poky-linux-gnueabi/crank/1.0-r2/crank
> | /home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-ne
> | on-poky-linux-gnueabi/crank/1.0-r2/image/opt/' ERROR: Function failed:
> | do_install (log file is located at
> | /home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-ne
> | on-poky-linux-gnueabi/crank/1.0-r2/temp/log.do_install.26457)
> ERROR: Task 1082
> (/home/swapna/workspace/work/yocto/meta-atmel/qt5-layer/recipes-qt/apps/cra
> nk_1.0.bb<http://nk_1.0.bb>, do_install) failed with exit code '1' NOTE: 
> Tasks Summary:
> Attempted 3806 tasks of which 3805 didn't need to be rerun and 1 failed. No
> currently running tasks (3034 of 4662)
>
> Summary: 1 task failed:
>
> /home/swapna/workspace/work/yocto/meta-atmel/qt5-layer/recipes-qt/apps/cran
> k_1.0.bb<http://k_1.0.bb>, do_install Summary: There was 1 WARNING message 
> shown.
> Summary: There was 1 ERROR message shown, returning a non-zero exit code.
>
>
>
> Also if I look into the
> /home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-
> poky-linux-gnueabi/crank/1.0-r2 It is empty.

There's something strange going on here, because the path you have just given
is ${WORKDIR} - and that shouldn't be able to be empty at this point. If
nothing else there should be a "temp" directory under it containing logs if
*any* tasks have run. Surely you have skipped out some steps between when it
was working and now? I notice the tarball name changed - did you regenerate it
or just rename it?

In any case, when debugging situations like this it helps to make a fresh
start - run "bitbake -c clean crank" (you don't need -c cleansstate because
being stuck at do_install you haven't got to any real sstate tasks yet). Then
methodically run through each task - when do_unpack ran what got unpacked into
${WORKDIR}? If that's as expected, what got put into ${D} (which is the
"image" subdirectory under ${WORKDIR})? Does what's in ${D} match up with the
layout you expect to be on the target? At any time you can use
"bitbake -e crank | less" to inspect the value of variables. You can also see
exactly what commands got run within the task by looking at the run.do_* files
under "temp" in the workdir.

Also:

* That third line "install -m ..." you now have in do_install won't work and
in any case isn't necessary since you are already copying that with the cp
command.

* Based on what you've said earlier, your S value cannot be correct - it may
not matter, but it might as well be fixed anyway. If the tarball unpacks a
"crank" subdirectory then it should be set to "${WORKDIR}/crank".

* There's no need to set the PR value, in fact doing so only serves to keep
changing ${WORKDIR} which will potentially get in the way of debugging, so I'd
suggest not doing that.

* Setting DEPENDS isn't really doing you any good - DEPENDS is for build-time
dependencies. You're only unpacking a tarball, you don't need any build-time
dependencies to speak of. If you have runtime dependencies then set them in
RDEPENDS_${PN} since that's where runtime dependencies need to be set.

* As another responder pointed out, the inherit of pkgconfig isn't needed -
you don't need pkg-config for anything being done here.

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
https://lists.yoctoproject.org/listinfo/yocto



--
"Do or do not. There is no try"
  Yoda Master

Attachment: crank_1.0.bb
Description: crank_1.0.bb

WARNING: crank-1.0-r0 do_package_qa: QA Issue: ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/sbio_tcprelay.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/lgre.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/luagretest.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/gredom.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libsblua.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libgre.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libsbexternal.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-system.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-tslib.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-selftest.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-timer.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-poly.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-gesture.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-screen-dump-test.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/librender-plugin-fbdev.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-screen-path.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-event-redirect.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-dynamic-rext.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-media.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-lua.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-screen-dump.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-rext-external.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-mtdev.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-dev-input.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-audio.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-browser.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-screen-scale.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-capture-playback.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-greio.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-circle.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-animation.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/plugins/libgre-plugin-logger.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lua/luasocket/linux-armle/mime/core.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lua/luasocket/linux-armle/socket/core.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lua/lfs/linux-armle/lfs.so'
 has relocations in .text
ELF binary 
'/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lua/luasql/linux-armle/luasql_sqlite3.so'
 has relocations in .text [textrel]
ERROR: crank-1.0-r0 do_package_qa: QA Issue: non -staticdev package contains 
static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libscene3d.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libswrender.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libgretest.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libsbimage.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libsqlite3.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libgreio.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libgreal.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libsbfont.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libsbfreetype.a'
non -staticdev package contains static .a library: crank path 
'work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/packages-split/crank/opt/crank/linux-sama5d-armle-fbdev-obj/lib/libssgf.a'
 [staticdev]
ERROR: crank-1.0-r0 do_package_qa: QA run found fatal errors. Please consider 
fixing them.
ERROR: crank-1.0-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: 
/home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/crank/1.0-r0/temp/log.do_package_qa.10609
ERROR: Task 9 
(/home/swapna/workspace/work/yocto/meta-atmel/qt5-layer/recipes-qt/apps/crank_1.0.bb,
 do_package_qa) failed with exit code '1'
NOTE: Tasks Summary: Attempted 396 tasks of which 385 didn't need to be rerun 
and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  
/home/swapna/workspace/work/yocto/meta-atmel/qt5-layer/recipes-qt/apps/crank_1.0.bb,
 do_package_qa
Summary: There were 2 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to