[yocto] native recipe and sysroot-destdir troubles
Philip Tricca
flihp at twobit.us
Fri Apr 13 14:17:36 PDT 2012
Worked out a solution to this issue. For the sake of brevity it can be
found here:
http://twobit.us/blog/2012/04/openembedded-yocto-native-hello-world/
Cheers,
- Philip
On 04/12/2012 07:55 PM, Philip Tricca wrote:
> More / better info:
>
> On 04/12/2012 10:44 AM, Philip Tricca wrote:
>> I'm working on two new recipes and both are working quite well. Now I
>> need native variants and online sources indicate this should be done
>> through BBCLASSEXTEND = "native". For one of my recipes this works
>> fine, for the other not so much.
>>
>> The error I'm seeing seems to be in the staging of the sysroot-destdir
>> which ends up being empty though the source code builds fine (image
>> directory has everything expected). do_populate_sysroot seems to assume
>> there's a directory structure present which ends up being empty causing
>> an error when it trys to tar the directory up. If I create the
>> directories do_populate_sysroot expects the recipe runs to completion
>> but sysroot-destdir still ends up being empty and no packages are built.
>
> Image directiory is populated as expected (has lib, usr/include etc with
> expected files). Build is failing on populate_sysroot:
>
> CalledProcessError: Command 'tar -cf - -C
> /home/build/poky-edison-6.0/build/tmp/work/i686-linux/libmylib-native-2.1.4-r0/sysroot-destdir///home/build/poky-edison-6.0/build/tmp/sysroots/i686-linux
> -ps . | tar -xf - -C
> /home/build/poky-edison-6.0/build/tmp/sysroots/i686-linux' returned
> non-zero exit status 2 with output tar:
> /home/build/poky-edison-6.0/build/tmp/work/i686-linux/libmylib-native-2.1.4-r0/sysroot-destdir///home/build/poky-edison-6.0/build/tmp/sysroots/i686-linux:
> Cannot chdir: No such file or directory
> tar: Error is not recoverable: exiting now
>
> The failure is obviously due to sysroot-destdir being empty. The
> question is why this directory is populated for libmylib but not for
> libmylib-native ... they're built from the same recipe.
>
> Stack trace:
>
> ERROR: The stack trace of python calls that resulted in this
> exception/failure was:
> ERROR: File "sstate_task_postfunc", line 10, in <module>
> ERROR:
> ERROR: File "sstate_task_postfunc", line 4, in sstate_task_postfunc
> ERROR:
> ERROR: File "sstate.bbclass", line 19, in sstate_install
> ERROR:
> ERROR: File "/home/build/poky-edison-6.0/meta/lib/oe/path.py", line
> 59, in copytree
> ERROR: check_output(cmd, shell=True, stderr=subprocess.STDOUT)
> ERROR:
> ERROR: File "/home/build/poky-edison-6.0/meta/lib/oe/path.py", line
> 121, in check_output
> ERROR: raise CalledProcessError(retcode, cmd, output=output)
> ERROR:
> ERROR: The code that was being executed was:
> ERROR: 0006: bb.build.exec_func(intercept, d)
> ERROR: 0007: sstate_package(shared_state, d)
> ERROR: 0008:
> ERROR: 0009:
> ERROR: *** 0010:sstate_task_postfunc(d)
> ERROR: 0011:
> ERROR: (file: 'sstate_task_postfunc', lineno: 10, function: <module>)
> ERROR: 0001:
> ERROR: 0002:def sstate_task_postfunc(d):
> ERROR: 0003: shared_state = sstate_state_fromvars(d)
> ERROR: *** 0004: sstate_install(shared_state, d)
> ERROR: 0005: for intercept in shared_state['interceptfuncs']:
> ERROR: 0006: bb.build.exec_func(intercept, d)
> ERROR: 0007: sstate_package(shared_state, d)
> ERROR: 0008:
> ERROR: (file: 'sstate_task_postfunc', lineno: 4, function:
> sstate_task_postfunc)
> ERROR: Function 'sstate_task_postfunc' failed
>
> Thanks,
> - Philip
>
More information about the yocto
mailing list