Skip to contentSkip to conversation

OE a deterministic build system?

DISCUSSION Rolf Leggewie 9 participants 13 messages Apr 9, 2007 – Apr 12, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

I am pulling my hair out and losing faith in OE being a deterministic build system. As documented in bug 1568, I have not been able to build nunome for about half a year now. When I asked hrw for help in fixing it , I was quite surprised for him to come back and say "Built fine for me". This success was later repeated by psokolovsky. Alas, I can't.

In my futile attempts on finding where I screwed this up, I further and further "virginized" my OE installation until I reinstalled, but even that did not help (going by GettingStarted here).

1. openembedded-essential has long since been installed
2. rm -Rf ~/oe && mkdir -p ~/oe/build/conf && cd ~/oe
3. svn co
http://svn.berlios.de/svnroot/repos/bitbake/branches/bitbake-1.8/
bitbake
4. wget http://www.openembedded.org/snapshots/OE.mtn.bz2
5. bunzip2 <OE.mtn.bz2 >oe.mtn
6. mtn --db=./OE.mtn checkout --branch=org.openembedded.dev
7. My local.conf is absolutely bare and unspectucular

     DL_DIR = "${HOME}/oe/sources"
     BBFILES = "${HOME}/oe/org.openembedded.dev/packages/*/*.bb"
     BBMASK = ""
     MACHINE ?= "spitz"
     DISTRO = "angstrom-2007.1-oabi"
     ENABLE_BINARY_LOCALE_GENERATION = "0"
     ASSUME_PROVIDED += "qemu-native"
     GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 de_DE.UTF-8"
     IMAGE_FSTYPES = "jffs2 tar"
     PARALLEL_MAKE = "-j 3"
     BBINCLUDELOGS = "yes"
     PALMTOP_USE_MULTITHREADED_QT = "yes"

8. set up the environment with

     export PATH=/home/rolf/oe/bitbake/bin/:$PATH && export
     BBPATH=/home/rolf/oe/build/:/home/rolf/oe/org.openembedded.dev/

9. "bitbake qte-mt && bitbake nunome" then fails with the same old

     error of "undefined reference to `main'" as always ->
     http://bugs.openembedded.org/attachment.cgi?id=1335

Now, I really wonder what causes this virgin build to fail for me when it seems everybody else can happily build it? Is OE not deterministic? Hints and discussion welcome.

Regards

Rolf

#1 lore raw
Quoted 12 lines · Rolf Leggewie

Hi,

I am pulling my hair out and losing faith in OE being a deterministic build system. As documented in bug 1568, I have not been able to build nunome for about half a year now. When I asked hrw for help in fixing it , I was quite surprised for him to come back and say "Built fine for me". This success was later repeated by psokolovsky. Alas, I can't.

In my futile attempts on finding where I screwed this up, I further and further "virginized" my OE installation until I reinstalled, but even that did not help (going by GettingStarted here).

Quoted 7 lines

1. openembedded-essential has long since been installed
2. rm -Rf ~/oe && mkdir -p ~/oe/build/conf && cd ~/oe
3. svn co
http://svn.berlios.de/svnroot/repos/bitbake/branches/bitbake-1.8/
bitbake
4. wget http://www.openembedded.org/snapshots/OE.mtn.bz2
5. bunzip2 <OE.mtn.bz2 >oe.mtn

Do you do an "mtn --db=./OE.mtn pull openembedded.org org.openembedded.dev" here?

Quoted 21 lines

6. mtn --db=./OE.mtn checkout --branch=org.openembedded.dev
7. My local.conf is absolutely bare and unspectucular

      DL_DIR = "${HOME}/oe/sources"
      BBFILES = "${HOME}/oe/org.openembedded.dev/packages/*/*.bb"
      BBMASK = ""
      MACHINE ?= "spitz"
      DISTRO = "angstrom-2007.1-oabi"
      ENABLE_BINARY_LOCALE_GENERATION = "0"
      ASSUME_PROVIDED += "qemu-native"
      GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 de_DE.UTF-8"
      IMAGE_FSTYPES = "jffs2 tar"
      PARALLEL_MAKE = "-j 3"
      BBINCLUDELOGS = "yes"
      PALMTOP_USE_MULTITHREADED_QT = "yes"

8. set up the environment with

      export PATH=/home/rolf/oe/bitbake/bin/:$PATH && export
      BBPATH=/home/rolf/oe/build/:/home/rolf/oe/org.openembedded.dev/
Quoted 8 lines

9. "bitbake qte-mt && bitbake nunome" then fails with the same old

      error of "undefined reference to `main'" as always ->
      http://bugs.openembedded.org/attachment.cgi?id=1335

Now, I really wonder what causes this virgin build to fail for me when it seems everybody else can happily build it? Is OE not deterministic? Hints and discussion welcome.

Of course it's deterministic....you do get the same error every time, don't you? Sounds like it's a difference between your system and everyone else's. I'll try a build myself with almost your exact local.conf and a fully up to date .dev as well.

Signature · 1 line
Justin Patrin
#2 lore raw
Quoted 9 lines · Justin Patrin
Quoted 4 lines

Now, I really wonder what causes this virgin build to fail for me when it seems everybody else can happily build it? Is OE not deterministic? Hints and discussion welcome.

Of course it's deterministic....you do get the same error every time, don't you? Sounds like it's a difference between your system and everyone else's. I'll try a build myself with almost your exact local.conf and a fully up to date .dev as well.

I've had trouble in the past with autoconf detecting software installed on the build machine and using those paths for the OE build. This was caused by bad m4 macros that OE could not account for. I fixed the autoconf and solved the problem. Read the logs of the failed package and see if it is using headers from the machine you are building on.

Philip

#3 lore raw
In reply to Rolf Leggewie

Hi,

Quoted 5 lines · Rolf Leggewie

I am pulling my hair out and losing faith in OE being a deterministic build system. As documented in bug 1568, I have not been able to build nunome for about half a year now. When I asked hrw for help in fixing it , I was quite surprised for him to come back and say "Built fine for me". This success was later repeated by psokolovsky. Alas, I can't.

[...]

Quoted 3 lines

9. "bitbake qte-mt && bitbake nunome" then fails with the same old

      error of "undefined reference to `main'" as always ->
      http://bugs.openembedded.org/attachment.cgi?id=1335

FWIW, I tried bitbake qte-mt and then bitbake nunome and it succeeded for me.

Quoted 3 lines

Now, I really wonder what causes this virgin build to fail for me when it seems everybody else can happily build it? Is OE not deterministic? Hints and discussion welcome.

OE is deterministic but it does to some degree depend the environment your building within too. Whilst we go to lengths to remove that from the equation, it does sometimes creep in. You need to debug that build failure, looking particularly to something creeping in from your build system...

Regards,

Richard

#4 lore raw
Quoted 8 lines · Richard Purdie

Hi,

Quoted 5 lines · Rolf Leggewie

I am pulling my hair out and losing faith in OE being a deterministic build system. As documented in bug 1568, I have not been able to build nunome for about half a year now. When I asked hrw for help in fixing it , I was quite surprised for him to come back and say "Built fine for me". This success was later repeated by psokolovsky. Alas, I can't.

Quoted 7 lines

[...]

Quoted 3 lines

9. "bitbake qte-mt && bitbake nunome" then fails with the same old

      error of "undefined reference to `main'" as always ->
      http://bugs.openembedded.org/attachment.cgi?id=1335

FWIW, I tried bitbake qte-mt and then bitbake nunome and it succeeded for me.

As I said in a comment on the bug earlier, "me too". I even used your local.conf (with paths fixed) and it built fine for me. Whether or not it's useful I don't know.

Quoted 11 lines
Quoted 4 lines

Now, I really wonder what causes this virgin build to fail for me when it seems everybody else can happily build it? Is OE not deterministic? Hints and discussion welcome.

OE is deterministic but it does to some degree depend the environment your building within too. Whilst we go to lengths to remove that from the equation, it does sometimes creep in. You need to debug that build failure, looking particularly to something creeping in from your build system...

I'll second that. You need to figure out where your host is creeping into OE and fix that. If it's an option you could try switching host distros or releases, trying chroot, using another computer, or just dig in and figure out what's going on. The .log files in the temp/ directory for nunome may be of help.

Signature · 1 line
Justin Patrin
#5 lore raw

Are you by any chance using ubuntu? If so, do a "sudo dpkg-reconfigure dash" and stop it replacing /bin/sh.
That was the reason for most of the problems I had with oe, including a couple of "undefined reference to main".

2007/4/9, Justin Patrin <[email protected]>:

Quoted 51 lines · Richard Purdie
Quoted 5 lines

Hi,

Quoted 2 lines · Rolf Leggewie

I am pulling my hair out and losing faith in OE being a deterministic build system. As documented in bug 1568, I have not been able to

build

Quoted 2 lines
Quoted 2 lines

nunome for about half a year now. When I asked hrw for help in fixing it , I was quite surprised for him to come back and say "Built fine

for

Quoted 8 lines
Quoted 1 line

me". This success was later repeated by psokolovsky. Alas, I can't.

[...]

Quoted 3 lines

9. "bitbake qte-mt && bitbake nunome" then fails with the same old

      error of "undefined reference to `main'" as always ->
      http://bugs.openembedded.org/attachment.cgi?id=1335

FWIW, I tried bitbake qte-mt and then bitbake nunome and it succeeded for me.

As I said in a comment on the bug earlier, "me too". I even used your local.conf (with paths fixed) and it built fine for me. Whether or not it's useful I don't know.

Quoted 3 lines
Quoted 3 lines

Now, I really wonder what causes this virgin build to fail for me when it seems everybody else can happily build it? Is OE not

deterministic?

Quoted 8 lines
Quoted 1 line

Hints and discussion welcome.

OE is deterministic but it does to some degree depend the environment your building within too. Whilst we go to lengths to remove that from the equation, it does sometimes creep in. You need to debug that build failure, looking particularly to something creeping in from your build system...

I'll second that. You need to figure out where your host is creeping into OE and fix that. If it's an option you could try switching host distros or releases, trying chroot, using another computer, or just dig in and figure out what's going on. The .log files in the temp/ directory for nunome may be of help.

--
Justin Patrin

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#6 lore raw
Quoted 4 lines · José Bernardo Bandos Rodrigues

Are you by any chance using ubuntu? If so, do a "sudo dpkg-reconfigure dash" and stop it replacing /bin/sh.
That was the reason for most of the problems I had with oe, including a couple of "undefined reference to main".

Can someone make sanity.bbclass detect dash and exit with a warning/error? :)

Cheers,

Richard

#7 lore raw

Hi, all!

Quoted 8 lines · Richard Purdie
Quoted 4 lines · José Bernardo Bandos Rodrigues

Are you by any chance using ubuntu? If so, do a "sudo dpkg-reconfigure dash" and stop it replacing /bin/sh.
That was the reason for most of the problems I had with oe, including a couple of "undefined reference to main".

Can someone make sanity.bbclass detect dash and exit with a warning/error? :)

Probably better is to make bash-native and depend on it? (or ash)
Just curious.

S.

#8 lore raw
Quoted 7 lines
Quoted 3 lines

Can someone make sanity.bbclass detect dash and exit with a warning/error? :)

Probably better is to make bash-native and depend on it? (or ash)
Just curious.

Ack! OE already builds a lot of stuff natively -- there's no need to slow builds done even more by building something natively that one should be able to presume exists on every reasonable build machine. I think if a build machine has gcc, it shouldn't be too much more difficult to expect a working bash as well, IMO.

Mike (mwester)

#9 lore raw

Hello Mike,

Quoted 8 lines · you
Quoted 6 lines
Quoted 2 lines

Can someone make sanity.bbclass detect dash and exit with a warning/error? :)

Probably better is to make bash-native and depend on it? (or ash)
Just curious.

Ack!

I bet you meant "Nak!".

Quoted 5 lines

OE already builds a lot of stuff natively -- there's no need to slow builds done even more by building something natively that one should be able to presume exists on every reasonable build machine. I think if a build machine has gcc, it shouldn't be too much more difficult to expect a working bash as well, IMO.

Sure, it makes no sense to *depend* on them. But it would make sense
to still has comprehensive set of *-native recipes, and make sanity.bb to be smart enough to suggest user that one could build *-native thing manually as one way to resolve missing build-time dependency. (No, I don't think that sanity.bb should be smartass and build missing things itself - user should request that explicitly).

Quoted 1 line

Mike (mwester)

Signature · 2 lines
Best regards,
 Paul                            mailto:[email protected]
#10 lore raw
In reply to José Bernardo Bandos Rodrigues
Quoted 1 line · José Bernardo Bandos Rodrigues

Are you by any chance using ubuntu?

José and everybody else that participated in this discussion;thank you!
I am on a business trip with limited access to the Internet. Please
forgive my lack of timely responses.

Yes, I am using Ubuntu. My version is edgy. I have run the command suggested and opted for dash not to provide sh. /bin/sh is a symbolic link on my system now (I forgot to check the state before reconfiguration). I will retry compilation.

Once I get back home next week, I will have more time to dig into this if the hint from José does not yet fix things.

Regards

Rolf

#11 lore raw
In reply to José Bernardo Bandos Rodrigues
Quoted 1 line · José Bernardo Bandos Rodrigues

Are you by any chance using ubuntu?

Bernardo,

the hint about dash proved to be priceless.

NOTE: package nunome-1.0.2: completed
NOTE: Tasks Summary: Attempted 414 tasks of which 395 didn't need to be rerun and 0 failed.
NOTE: build 200704121425: completed

After reconfiguring dash, everything is fine now. Big thank you!

As a takeaway from this episode, I guess it might make sense for OE to check that /bin/sh is not /bin/dash as it can unstabilize the functioning of OE.

Regards

Rolf

#12 lore raw
In reply to Rolf Leggewie

Rolf,

Quoted 4 lines · Rolf Leggewie

Hi,

I am pulling my hair out and losing faith in OE being a deterministic build system.

I have to second this concern, although I agree that it's probably all host related (or timing related, such as the quilt-native issue when multithreading bb tasks).

What I would like to see more, is that we help find these creeping-in-dependencies from the host by building eachothers builds, or other ways to help find the remaining details.

I am currently chasing a bug that prevents me from building a bb target on a Gentoo system, which perfectly works on Ubuntu hosts.

Both starting with the prerequisite tools and a clean source dir etc.

Regards,

Leon