All of lore.kernel.org
 help / color / mirror / Atom feed
* do_compile() isn't run when building
@ 2011-02-18  9:06 Chris Tapp
  2011-02-18  9:42 ` Cui, Dexuan
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Tapp @ 2011-02-18  9:06 UTC (permalink / raw)
  To: yocto

I've created a simple recipe based on an example from the Poky  
Reference manual (I've added a license to get it to build):

DESCRIPTION = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://LICENSE;md5=6d43ecbcf91bccef1e852520086c219c"

PR = "r0"

SRC_URI = "file://helloworld.c file://LICENSE"

S = "${WORKDIR}"

do_compile() {
  ${CC} helloworld.c -o helloworld
}

do_install() {
  install -d ${D}${bindir}
  install -m 0755 helloworld ${D}${bindir}
}

However, if I 'bitbake test' the code isn't compiled:

NOTE: Running setscene task 178 of 276 (/home/chris/poky-dev/meta/ 
recipes-keylevel/test/test_0.1.0.bb:do_populate_sysroot_setscene)
NOTE: Running setscene task 179 of 276 (/home/chris/poky-dev/meta/ 
recipes-keylevel/test/test_0.1.0.bb:do_package_setscene)
NOTE: package test-0.1.0-r0: task do_populate_sysroot_setscene: Started
NOTE: package test-0.1.0-r0: task do_package_setscene: Started
NOTE: package test-0.1.0-r0: task do_populate_sysroot_setscene:  
Succeeded
NOTE: Running setscene task 180 of 276 (/home/chris/poky-dev/meta/ 
recipes-keylevel/test/test_0.1.0.bb:do_populate_lic_setscene)
NOTE: package test-0.1.0-r0: task do_package_setscene: Succeeded
NOTE: package test-0.1.0-r0: task do_populate_lic_setscene: Started
NOTE: Running setscene task 181 of 276 (/home/chris/poky-dev/meta/ 
recipes-keylevel/test/test_0.1.0.bb:do_package_write_ipk_setscene)
NOTE: package test-0.1.0-r0: task do_populate_lic_setscene: Succeeded
NOTE: package test-0.1.0-r0: task do_package_write_ipk_setscene: Started
NOTE: package test-0.1.0-r0: task do_package_write_ipk_setscene:  
Succeeded
NOTE: Executing RunQueue Tasks
NOTE: Running noexec task 828 of 829 (ID: 9, /home/chris/poky-dev/meta/ 
recipes-keylevel/test/test_0.1.0.bb, do_package_write)
NOTE: Running noexec task 829 of 829 (ID: 4, /home/chris/poky-dev/meta/ 
recipes-keylevel/test/test_0.1.0.bb, do_build)


Why doesn't the code get built?

Chris Tapp

opensource@keylevel.com
www.keylevel.com





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: do_compile() isn't run when building
  2011-02-18  9:06 do_compile() isn't run when building Chris Tapp
@ 2011-02-18  9:42 ` Cui, Dexuan
  2011-02-19  0:04   ` Chris Tapp
  0 siblings, 1 reply; 4+ messages in thread
From: Cui, Dexuan @ 2011-02-18  9:42 UTC (permalink / raw)
  To: 'Chris Tapp', yocto@yoctoproject.org

Chris Tapp wrote:
> I've created a simple recipe based on an example from the Poky
> Reference manual (I've added a license to get it to build):
The code looks ok.

> However, if I 'bitbake test' the code isn't compiled:
> 
> NOTE: Running setscene task 178 of 276 (/home/chris/poky-dev/meta/
> recipes-keylevel/test/test_0.1.0.bb:do_populate_sysroot_setscene)
> NOTE: Running setscene task 179 of 276 (/home/chris/poky-dev/meta/
> recipes-keylevel/test/test_0.1.0.bb:do_package_setscene)
> NOTE: package test-0.1.0-r0: task do_populate_sysroot_setscene:
> Started NOTE: package test-0.1.0-r0: task do_package_setscene: Started
> NOTE: package test-0.1.0-r0: task do_populate_sysroot_setscene:
> Succeeded
> NOTE: Running setscene task 180 of 276 (/home/chris/poky-dev/meta/
> recipes-keylevel/test/test_0.1.0.bb:do_populate_lic_setscene)
> NOTE: package test-0.1.0-r0: task do_package_setscene: Succeeded
> NOTE: package test-0.1.0-r0: task do_populate_lic_setscene: Started
> NOTE: Running setscene task 181 of 276 (/home/chris/poky-dev/meta/
> recipes-keylevel/test/test_0.1.0.bb:do_package_write_ipk_setscene)
> NOTE: package test-0.1.0-r0: task do_populate_lic_setscene: Succeeded
> NOTE: package test-0.1.0-r0: task do_package_write_ipk_setscene:
> Started NOTE: package test-0.1.0-r0: task
> do_package_write_ipk_setscene: Succeeded
> NOTE: Executing RunQueue Tasks
> NOTE: Running noexec task 828 of 829 (ID: 9,
> /home/chris/poky-dev/meta/ recipes-keylevel/test/test_0.1.0.bb,
> do_package_write) 
> NOTE: Running noexec task 829 of 829 (ID: 4,
> /home/chris/poky-dev/meta/ recipes-keylevel/test/test_0.1.0.bb,
> do_build) 
> 
> 
> Why doesn't the code get built?
Is this the complete log?
I don't find any tasks(e.g., do_fetch, do_unpack, do_install...) that should be there. This is odd.

Maybe you can try "bitbake -c cleanall test; bitbake test" to see if any change?

Thanks,
-- Dexuan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: do_compile() isn't run when building
  2011-02-18  9:42 ` Cui, Dexuan
@ 2011-02-19  0:04   ` Chris Tapp
  2011-02-19  0:30     ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Tapp @ 2011-02-19  0:04 UTC (permalink / raw)
  To: Cui, Dexuan; +Cc: yocto@yoctoproject.org

On 18 Feb 2011, at 09:42, Cui, Dexuan wrote:

> Chris Tapp wrote:
>> I've created a simple recipe based on an example from the Poky
>> Reference manual (I've added a license to get it to build):
> The code looks ok.
>
>> However, if I 'bitbake test' the code isn't compiled:
>>
>> NOTE: Running setscene task 178 of 276 (/home/chris/poky-dev/meta/
>> recipes-keylevel/test/test_0.1.0.bb:do_populate_sysroot_setscene)
>> NOTE: Running setscene task 179 of 276 (/home/chris/poky-dev/meta/
>> recipes-keylevel/test/test_0.1.0.bb:do_package_setscene)
>> NOTE: package test-0.1.0-r0: task do_populate_sysroot_setscene:
>> Started NOTE: package test-0.1.0-r0: task do_package_setscene:  
>> Started
>> NOTE: package test-0.1.0-r0: task do_populate_sysroot_setscene:
>> Succeeded
>> NOTE: Running setscene task 180 of 276 (/home/chris/poky-dev/meta/
>> recipes-keylevel/test/test_0.1.0.bb:do_populate_lic_setscene)
>> NOTE: package test-0.1.0-r0: task do_package_setscene: Succeeded
>> NOTE: package test-0.1.0-r0: task do_populate_lic_setscene: Started
>> NOTE: Running setscene task 181 of 276 (/home/chris/poky-dev/meta/
>> recipes-keylevel/test/test_0.1.0.bb:do_package_write_ipk_setscene)
>> NOTE: package test-0.1.0-r0: task do_populate_lic_setscene: Succeeded
>> NOTE: package test-0.1.0-r0: task do_package_write_ipk_setscene:
>> Started NOTE: package test-0.1.0-r0: task
>> do_package_write_ipk_setscene: Succeeded
>> NOTE: Executing RunQueue Tasks
>> NOTE: Running noexec task 828 of 829 (ID: 9,
>> /home/chris/poky-dev/meta/ recipes-keylevel/test/test_0.1.0.bb,
>> do_package_write)
>> NOTE: Running noexec task 829 of 829 (ID: 4,
>> /home/chris/poky-dev/meta/ recipes-keylevel/test/test_0.1.0.bb,
>> do_build)
>>
>>
>> Why doesn't the code get built?
> Is this the complete log?
> I don't find any tasks(e.g., do_fetch, do_unpack, do_install...)  
> that should be there. This is odd.

Yes, that's the complete log ! I thought it was odd too.

> Maybe you can try "bitbake -c cleanall test; bitbake test" to see if  
> any change?

That does work, but it seems as if 'make clean' quite often (though  
not always) doesn't do enough.

Chris



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: do_compile() isn't run when building
  2011-02-19  0:04   ` Chris Tapp
@ 2011-02-19  0:30     ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2011-02-19  0:30 UTC (permalink / raw)
  To: Chris Tapp; +Cc: yocto@yoctoproject.org

On 02/18/2011 05:04 PM, Chris Tapp wrote:
> On 18 Feb 2011, at 09:42, Cui, Dexuan wrote:
>
>> Chris Tapp wrote:
>>> I've created a simple recipe based on an example from the Poky
>>> Reference manual (I've added a license to get it to build):
>> The code looks ok.
>>
>>> However, if I 'bitbake test' the code isn't compiled:
>>>
>>> NOTE: Running setscene task 178 of 276 (/home/chris/poky-dev/meta/
>>> recipes-keylevel/test/test_0.1.0.bb:do_populate_sysroot_setscene)
>>> NOTE: Running setscene task 179 of 276 (/home/chris/poky-dev/meta/
>>> recipes-keylevel/test/test_0.1.0.bb:do_package_setscene)
>>> NOTE: package test-0.1.0-r0: task do_populate_sysroot_setscene:
>>> Started NOTE: package test-0.1.0-r0: task do_package_setscene: Started
>>> NOTE: package test-0.1.0-r0: task do_populate_sysroot_setscene:
>>> Succeeded
>>> NOTE: Running setscene task 180 of 276 (/home/chris/poky-dev/meta/
>>> recipes-keylevel/test/test_0.1.0.bb:do_populate_lic_setscene)
>>> NOTE: package test-0.1.0-r0: task do_package_setscene: Succeeded
>>> NOTE: package test-0.1.0-r0: task do_populate_lic_setscene: Started
>>> NOTE: Running setscene task 181 of 276 (/home/chris/poky-dev/meta/
>>> recipes-keylevel/test/test_0.1.0.bb:do_package_write_ipk_setscene)
>>> NOTE: package test-0.1.0-r0: task do_populate_lic_setscene: Succeeded
>>> NOTE: package test-0.1.0-r0: task do_package_write_ipk_setscene:
>>> Started NOTE: package test-0.1.0-r0: task
>>> do_package_write_ipk_setscene: Succeeded
>>> NOTE: Executing RunQueue Tasks
>>> NOTE: Running noexec task 828 of 829 (ID: 9,
>>> /home/chris/poky-dev/meta/ recipes-keylevel/test/test_0.1.0.bb,
>>> do_package_write)
>>> NOTE: Running noexec task 829 of 829 (ID: 4,
>>> /home/chris/poky-dev/meta/ recipes-keylevel/test/test_0.1.0.bb,
>>> do_build)
>>>
>>>
>>> Why doesn't the code get built?
>> Is this the complete log?
>> I don't find any tasks(e.g., do_fetch, do_unpack, do_install...) that should be there. This is odd.
>
> Yes, that's the complete log ! I thought it was odd too.
>
>> Maybe you can try "bitbake -c cleanall test; bitbake test" to see if any change?
>
> That does work, but it seems as if 'make clean' quite often (though not always) doesn't do enough.

This is probably happening because of the shared state info which
is cached for successfully built packages.  bitbake clean does not
(possibly can not) remove that.

If you want to run clean on a recipe (and not change the recipe per se)
you'll need to clean the state info as well.  I normally do this by hand
like this (for your package named test):
   % bitbake test -c clean
   % rm sstate-cache/sstate-test*

Note: there is a bitbake action 'cleanall' which I think tries to clean
up everything it possibly can, including state info, but I've not had
perfect luck with it, hence my choice to do this manually.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-19  0:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18  9:06 do_compile() isn't run when building Chris Tapp
2011-02-18  9:42 ` Cui, Dexuan
2011-02-19  0:04   ` Chris Tapp
2011-02-19  0:30     ` Gary Thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.