Re: [Gumstix-users] bitbake questions

> I did go back and modify the hello.c file and reran bitbake, but it did
> not recompile the src. The ipkg files were not updated. It was only
> when I modified the PR variable of the recipe file, and reran bitbake
> that it really recompiled the code. What don't I understand here?
You are expecting it to work like make and it doesn't. Bitbake
recipes don't include dependency information for individual source
files, so they have no way of knowing that you have changed a source
file.
When you are in "debug mode" in the development of your own package,
you will use slightly different bitbake commands.
If you are in a phase where you are debugging compiler errors, you
might want to just use:
bitbake -c compile -f helloworld
which will force a recompile (skipping the fetch and patching phases,
and the later staging and installation phases)
Once you have it compiling and are working on logic errors, you'll
likely want to have bitbake also package up your software so it is
easy to install with ipkg. In that case use:
bitbake -c rebuild helloworld
after each editing session.
> Also, when I download the ipkg to the gumstix and install it, the code
> is placed in the "proper" destinations, plus I am guessing any libs too
> which might be included. So when I do a new compile and rerun "ipkg
> install xxxx" - do I first need to do an "ipkg remove (package name)" ?
> Or is it overwritten so it doesn't make a diff.
No, you won't need to do that, ipkg will do the right thing. However,
unless you are religious about bumping PR in your recipe with each
edit, you will need to use:
ipkg -force-reinstall install helloworld
Otherwise ipkg will think you are trying to reinstall the same package
twice and will politely tell you that there is nothing to do.
Steve
>
> 'mark
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

Thread view

Hi,
I just went through the bitbake helloworld example and it worked great.
Thanks for all the explicit instructions about using bitbake and the
recipes.
I did go back and modify the hello.c file and reran bitbake, but it did
not recompile the src. The ipkg files were not updated. It was only
when I modified the PR variable of the recipe file, and reran bitbake
that it really recompiled the code. What don't I understand here?
Also, when I download the ipkg to the gumstix and install it, the code
is placed in the "proper" destinations, plus I am guessing any libs too
which might be included. So when I do a new compile and rerun "ipkg
install xxxx" - do I first need to do an "ipkg remove (package name)" ?
Or is it overwritten so it doesn't make a diff.
thx.
'mark

> I did go back and modify the hello.c file and reran bitbake, but it did
> not recompile the src. The ipkg files were not updated. It was only
> when I modified the PR variable of the recipe file, and reran bitbake
> that it really recompiled the code. What don't I understand here?
You are expecting it to work like make and it doesn't. Bitbake
recipes don't include dependency information for individual source
files, so they have no way of knowing that you have changed a source
file.
When you are in "debug mode" in the development of your own package,
you will use slightly different bitbake commands.
If you are in a phase where you are debugging compiler errors, you
might want to just use:
bitbake -c compile -f helloworld
which will force a recompile (skipping the fetch and patching phases,
and the later staging and installation phases)
Once you have it compiling and are working on logic errors, you'll
likely want to have bitbake also package up your software so it is
easy to install with ipkg. In that case use:
bitbake -c rebuild helloworld
after each editing session.
> Also, when I download the ipkg to the gumstix and install it, the code
> is placed in the "proper" destinations, plus I am guessing any libs too
> which might be included. So when I do a new compile and rerun "ipkg
> install xxxx" - do I first need to do an "ipkg remove (package name)" ?
> Or is it overwritten so it doesn't make a diff.
No, you won't need to do that, ipkg will do the right thing. However,
unless you are religious about bumping PR in your recipe with each
edit, you will need to use:
ipkg -force-reinstall install helloworld
Otherwise ipkg will think you are trying to reinstall the same package
twice and will politely tell you that there is nothing to do.
Steve
>
> 'mark
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

Great,
that helps a lot. As a suggestion, you might want to consider putting a
few of your comments below in the Hello World tutorial as that's where a
lot of us new to OE and bitbake are starting out.
For my case, I just modified the original hello.c file to do a few more
things (testing) and so it wasn't compiler errors I was chasing. But
your comments help me to see how to do this. I guess I was looking for
a "make clean" cmd and did not find it.
thanks again,
'mark
Steve Sakoman wrote:
>> I did go back and modify the hello.c file and reran bitbake, but it did
>> not recompile the src. The ipkg files were not updated. It was only
>> when I modified the PR variable of the recipe file, and reran bitbake
>> that it really recompiled the code. What don't I understand here?
>>
>
> You are expecting it to work like make and it doesn't. Bitbake
> recipes don't include dependency information for individual source
> files, so they have no way of knowing that you have changed a source
> file.
>
> When you are in "debug mode" in the development of your own package,
> you will use slightly different bitbake commands.
>
> If you are in a phase where you are debugging compiler errors, you
> might want to just use:
>
> bitbake -c compile -f helloworld
>
> which will force a recompile (skipping the fetch and patching phases,
> and the later staging and installation phases)
>
> Once you have it compiling and are working on logic errors, you'll
> likely want to have bitbake also package up your software so it is
> easy to install with ipkg. In that case use:
>
> bitbake -c rebuild helloworld
>
> after each editing session.
>
>
>> Also, when I download the ipkg to the gumstix and install it, the code
>> is placed in the "proper" destinations, plus I am guessing any libs too
>> which might be included. So when I do a new compile and rerun "ipkg
>> install xxxx" - do I first need to do an "ipkg remove (package name)" ?
>> Or is it overwritten so it doesn't make a diff.
>>
>
> No, you won't need to do that, ipkg will do the right thing. However,
> unless you are religious about bumping PR in your recipe with each
> edit, you will need to use:
>
> ipkg -force-reinstall install helloworld
>
> Otherwise ipkg will think you are trying to reinstall the same package
> twice and will politely tell you that there is nothing to do.
>
> Steve
>
>> 'mark
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@...
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>
>>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>

The bitbake tutorial is a great help.
Would it be possible to add an example to show the right way to build an old application that uses configure.
I've managed to hack something together using other packages as templates and I get some errors when configure tries to locate the various headers and libraries.
A worked example would probably get me back on the right path.
Thanks
Ben
-----Original Message-----
From: gumstix-users-bounces@... on behalf of Mark Ahlenius
Sent: Wed 2/13/2008 11:54 PM
To: General mailing list for gumstix users.
Subject: Re: [Gumstix-users] bitbake questions
Great,
that helps a lot. As a suggestion, you might want to consider putting a
few of your comments below in the Hello World tutorial as that's where a
lot of us new to OE and bitbake are starting out.
For my case, I just modified the original hello.c file to do a few more
things (testing) and so it wasn't compiler errors I was chasing. But
your comments help me to see how to do this. I guess I was looking for
a "make clean" cmd and did not find it.
thanks again,
'mark
Steve Sakoman wrote:
>> I did go back and modify the hello.c file and reran bitbake, but it did
>> not recompile the src. The ipkg files were not updated. It was only
>> when I modified the PR variable of the recipe file, and reran bitbake
>> that it really recompiled the code. What don't I understand here?
>>
>
> You are expecting it to work like make and it doesn't. Bitbake
> recipes don't include dependency information for individual source
> files, so they have no way of knowing that you have changed a source
> file.
>
> When you are in "debug mode" in the development of your own package,
> you will use slightly different bitbake commands.
>
> If you are in a phase where you are debugging compiler errors, you
> might want to just use:
>
> bitbake -c compile -f helloworld
>
> which will force a recompile (skipping the fetch and patching phases,
> and the later staging and installation phases)
>
> Once you have it compiling and are working on logic errors, you'll
> likely want to have bitbake also package up your software so it is
> easy to install with ipkg. In that case use:
>
> bitbake -c rebuild helloworld
>
> after each editing session.
>
>
>> Also, when I download the ipkg to the gumstix and install it, the code
>> is placed in the "proper" destinations, plus I am guessing any libs too
>> which might be included. So when I do a new compile and rerun "ipkg
>> install xxxx" - do I first need to do an "ipkg remove (package name)" ?
>> Or is it overwritten so it doesn't make a diff.
>>
>
> No, you won't need to do that, ipkg will do the right thing. However,
> unless you are religious about bumping PR in your recipe with each
> edit, you will need to use:
>
> ipkg -force-reinstall install helloworld
>
> Otherwise ipkg will think you are trying to reinstall the same package
> twice and will politely tell you that there is nothing to do.
>
> Steve
>
>> 'mark
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@...
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>
>>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users
--
Roke Manor Research Ltd, Romsey,
Hampshire, SO51 0ZN, United Kingdom
A Siemens company
Registered in England & Wales at:
Siemens plc, Faraday House, Sir William Siemens Square,
Frimley, Camberley, GU16 8QD. Registered No: 267550
------------------------------------------------------------------------
Visit our website at http://www.roke.co.uk
------------------------------------------------------------------------
The information contained in this e-mail and any attachments is
proprietary to Roke Manor Research Ltd and must not be passed to any
third party without permission. This communication is for information
only and shall not create or change any contractual relationship.
------------------------------------------------------------------------
Please consider the environment before printing this email

Ben,
That's on my "to do" list.
The problem with autotools packages is that in the ideal case, the
recipe is amazingly simple.
But the reverse can also be true, with lots of nasty, hard to debug
issues that require hours of time reading make files trying to figure
out why the simple recipe just doesn't work!
For the tutorial I'll of course pick one of the former :-) Just
kidding. I'll try to pick one in the middle of the spectrum that
demonstrates how to deal with typical gotchas.
Steve
On Feb 18, 2008 1:53 PM, Toner, Ben <ben.toner@...> wrote:
>
>
>
> The bitbake tutorial is a great help.
> Would it be possible to add an example to show the right way to build an
> old application that uses configure.
> I've managed to hack something together using other packages as templates
> and I get some errors when configure tries to locate the various headers and
> libraries.
>
> A worked example would probably get me back on the right path.
>
> Thanks
>
> Ben
>
>
>
>
> -----Original Message-----
> From: gumstix-users-bounces@... on behalf of Mark
> Ahlenius
> Sent: Wed 2/13/2008 11:54 PM
> To: General mailing list for gumstix users.
> Subject: Re: [Gumstix-users] bitbake questions
>
> Great,
>
> that helps a lot. As a suggestion, you might want to consider putting a
> few of your comments below in the Hello World tutorial as that's where a
> lot of us new to OE and bitbake are starting out.
>
> For my case, I just modified the original hello.c file to do a few more
> things (testing) and so it wasn't compiler errors I was chasing. But
> your comments help me to see how to do this. I guess I was looking for
> a "make clean" cmd and did not find it.
>
> thanks again,
>
> 'mark
>
> Steve Sakoman wrote:
> >> I did go back and modify the hello.c file and reran bitbake, but it did
> >> not recompile the src. The ipkg files were not updated. It was only
> >> when I modified the PR variable of the recipe file, and reran bitbake
> >> that it really recompiled the code. What don't I understand here?
> >>
> >
> > You are expecting it to work like make and it doesn't. Bitbake
> > recipes don't include dependency information for individual source
> > files, so they have no way of knowing that you have changed a source
> > file.
> >
> > When you are in "debug mode" in the development of your own package,
> > you will use slightly different bitbake commands.
> >
> > If you are in a phase where you are debugging compiler errors, you
> > might want to just use:
> >
> > bitbake -c compile -f helloworld
> >
> > which will force a recompile (skipping the fetch and patching phases,
> > and the later staging and installation phases)
> >
> > Once you have it compiling and are working on logic errors, you'll
> > likely want to have bitbake also package up your software so it is
> > easy to install with ipkg. In that case use:
> >
> > bitbake -c rebuild helloworld
> >
> > after each editing session.
> >
> >
> >> Also, when I download the ipkg to the gumstix and install it, the code
> >> is placed in the "proper" destinations, plus I am guessing any libs too
> >> which might be included. So when I do a new compile and rerun "ipkg
> >> install xxxx" - do I first need to do an "ipkg remove (package name)" ?
> >> Or is it overwritten so it doesn't make a diff.
> >>
> >
> > No, you won't need to do that, ipkg will do the right thing. However,
> > unless you are religious about bumping PR in your recipe with each
> > edit, you will need to use:
> >
> > ipkg -force-reinstall install helloworld
> >
> > Otherwise ipkg will think you are trying to reinstall the same package
> > twice and will politely tell you that there is nothing to do.
> >
> > Steve
> >
> >> 'mark
> >>
> >>
> -------------------------------------------------------------------------
> >> This SF.net email is sponsored by: Microsoft
> >> Defy all challenges. Microsoft(R) Visual Studio 2008.
> >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >> _______________________________________________
> >> gumstix-users mailing list
> >> gumstix-users@...
> >> https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >>
> >>
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > gumstix-users mailing list
> > gumstix-users@...
> > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
> --
>
>
>
> Roke Manor Research Ltd, Romsey,
> Hampshire, SO51 0ZN, United Kingdom
>
> A Siemens company
>
> Registered in England & Wales at:
> Siemens plc, Faraday House, Sir William Siemens Square,
> Frimley, Camberley, GU16 8QD. Registered No: 267550
>
> ------------------------------------------------------------------------
>
> Visit our website at http://www.roke.co.uk
>
> ------------------------------------------------------------------------
>
> The information contained in this e-mail and any attachments is
> proprietary to Roke Manor Research Ltd and must not be passed to any
> third party without permission. This communication is for information
> only and shall not create or change any contractual relationship.
>
> ------------------------------------------------------------------------
>
> Please consider the environment before printing this email
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>