Skip to contentSkip to conversation

PREFERRED_PROVIDER syntax is eluding me...

DISCUSSION Mike (mwester) 3 participants 4 messages May 26, 2007 – May 30, 2007

lore
Share & tools
lore
#0 lore raw

I'm missing something simple, I expect. But try as I might, I cannot figure this out.

Bitbake 1.8.3, building unslung-image (worked fine on 1.6): Bitbake says:
[snip]
NOTE: multiple providers are available for runtime libc6-unslung (glibc, glibc-initial);
NOTE: consider defining a PREFERRED_PROVIDER entry to match runtime libc6-unslung
[snip]

This is a problem, because with bitbake 1.8, without a preferred provider specified, it seems to try to build both. But only glibc builds;
glibc-initial fails (and the build loops forever). This is easily fixed by
adding the following line to the local.conf file:

PREFERRED_PROVIDER_libc6-unslung = "glibc"

Except that it doesn't do a blasted thing. Neither does this line:

PREFERRED_PROVIDERS += " libc6-unslung:glibc"

Thinking that perhaps the "-unslung" was implied since the machine is "unslung", I tried:

PREFERRED_PROVIDERS += " libc6:glibc"

Still no change. Being persistent, I tried every variant of the above that I could think of, to no avail. It seems that bitbake is not understanding or processing the info provided. The -D flag offers no further hints, either.

For background, back in the glibc bitbake recipes, glibc-initial.bb does a "require" of glibc.bb (hence the multiple providers). Near the tail-end of glibc.bb we find:

PACKAGES_unslung = "libc6-unslung"
RDEPENDS_libc6-unslung = "nslu2-linksys-libs"
RPROVIDES_libc6-unslung = "libc6"
FILES_libc6-unslung = "/lib/librt*"

Figuring that perhaps the problem is that nothing actually "PROVIDES" libc6, and that maybe bitbake needs to see the build-time dependency in order to handle the run-time dependency PREFERRED_PROVIDER stuff, I even added PROVIDES_libc6-unslung = "libc6"
to the glibc.bb recipe, and went back through the list of PREFERRED_PROVIDERS in the local.conf file. No luck. No difference.

I finally hacked the glibc bitbake recipes so that glibc-initial doesn't "RPROVIDE" libc6 anymore. Success - bitbake is happy. But I'm not. That doesn't seem like the correct way to resolve the multiple providers issue, and I expect that commiting such a change would (rightfully) anger many folks.

If some kind soul could point me to the document or another recipe that provides the correct syntax for handling this, or provide a pointer to whatever it is that I'm missing, I'd be most grateful.

Thanks!

Mike (mwester)

#1 lore raw
Quoted 54 lines · Mike (mwester)

I'm missing something simple, I expect. But try as I might, I cannot figure this out.

Bitbake 1.8.3, building unslung-image (worked fine on 1.6): Bitbake says:
[snip]
NOTE: multiple providers are available for runtime libc6-unslung (glibc, glibc-initial);
NOTE: consider defining a PREFERRED_PROVIDER entry to match runtime libc6-unslung
[snip]

This is a problem, because with bitbake 1.8, without a preferred provider specified, it seems to try to build both. But only glibc builds;
glibc-initial fails (and the build loops forever). This is easily fixed by
adding the following line to the local.conf file:

PREFERRED_PROVIDER_libc6-unslung = "glibc"

Except that it doesn't do a blasted thing. Neither does this line:

PREFERRED_PROVIDERS += " libc6-unslung:glibc"

Thinking that perhaps the "-unslung" was implied since the machine is "unslung", I tried:

PREFERRED_PROVIDERS += " libc6:glibc"

Still no change. Being persistent, I tried every variant of the above that I could think of, to no avail. It seems that bitbake is not understanding or processing the info provided. The -D flag offers no further hints, either.

For background, back in the glibc bitbake recipes, glibc-initial.bb does a "require" of glibc.bb (hence the multiple providers). Near the tail-end of glibc.bb we find:

PACKAGES_unslung = "libc6-unslung"
RDEPENDS_libc6-unslung = "nslu2-linksys-libs"
RPROVIDES_libc6-unslung = "libc6"
FILES_libc6-unslung = "/lib/librt*"

Figuring that perhaps the problem is that nothing actually "PROVIDES" libc6, and that maybe bitbake needs to see the build-time dependency in order to handle the run-time dependency PREFERRED_PROVIDER stuff, I even added PROVIDES_libc6-unslung = "libc6"
to the glibc.bb recipe, and went back through the list of PREFERRED_PROVIDERS in the local.conf file. No luck. No difference.

I finally hacked the glibc bitbake recipes so that glibc-initial doesn't "RPROVIDE" libc6 anymore. Success - bitbake is happy. But I'm not. That doesn't seem like the correct way to resolve the multiple providers issue, and I expect that commiting such a change would (rightfully) anger many folks.

Quoted 4 lines

If some kind soul could point me to the document or another recipe that provides the correct syntax for handling this, or provide a pointer to whatever it is that I'm missing, I'd be most grateful.

So it's RPROVIDES and not PROVIDES? Sounds like the problem may be that PREFERRED_PROVIDERS is for non-R.... Is there an RPREFERRED_PROVIDERS perhaps?

It's been a while since you posted, sid you get this resolved in the meantime? Richard Purdie should have more insight into this.

Signature · 1 line
Justin Patrin
#2 lore raw
Quoted 60 lines · Justin Patrin
Quoted 54 lines · Mike (mwester)

I'm missing something simple, I expect. But try as I might, I cannot figure this out.

Bitbake 1.8.3, building unslung-image (worked fine on 1.6): Bitbake says:
[snip]
NOTE: multiple providers are available for runtime libc6-unslung (glibc, glibc-initial);
NOTE: consider defining a PREFERRED_PROVIDER entry to match runtime libc6-unslung
[snip]

This is a problem, because with bitbake 1.8, without a preferred provider specified, it seems to try to build both. But only glibc builds;
glibc-initial fails (and the build loops forever). This is easily fixed by
adding the following line to the local.conf file:

PREFERRED_PROVIDER_libc6-unslung = "glibc"

Except that it doesn't do a blasted thing. Neither does this line:

PREFERRED_PROVIDERS += " libc6-unslung:glibc"

Thinking that perhaps the "-unslung" was implied since the machine is "unslung", I tried:

PREFERRED_PROVIDERS += " libc6:glibc"

Still no change. Being persistent, I tried every variant of the above that I could think of, to no avail. It seems that bitbake is not understanding or processing the info provided. The -D flag offers no further hints, either.

For background, back in the glibc bitbake recipes, glibc-initial.bb does a "require" of glibc.bb (hence the multiple providers). Near the tail-end of glibc.bb we find:

PACKAGES_unslung = "libc6-unslung"
RDEPENDS_libc6-unslung = "nslu2-linksys-libs"
RPROVIDES_libc6-unslung = "libc6"
FILES_libc6-unslung = "/lib/librt*"

Figuring that perhaps the problem is that nothing actually "PROVIDES" libc6, and that maybe bitbake needs to see the build-time dependency in order to handle the run-time dependency PREFERRED_PROVIDER stuff, I even added PROVIDES_libc6-unslung = "libc6"
to the glibc.bb recipe, and went back through the list of PREFERRED_PROVIDERS in the local.conf file. No luck. No difference.

I finally hacked the glibc bitbake recipes so that glibc-initial doesn't "RPROVIDE" libc6 anymore. Success - bitbake is happy. But I'm not. That doesn't seem like the correct way to resolve the multiple providers issue, and I expect that commiting such a change would (rightfully) anger many folks.

Quoted 4 lines

If some kind soul could point me to the document or another recipe that provides the correct syntax for handling this, or provide a pointer to whatever it is that I'm missing, I'd be most grateful.

Quoted 6 lines

So it's RPROVIDES and not PROVIDES? Sounds like the problem may be that PREFERRED_PROVIDERS is for non-R.... Is there an RPREFERRED_PROVIDERS perhaps?

It's been a while since you posted, sid you get this resolved in the meantime? Richard Purdie should have more insight into this.

Er, hmm, right. The providers code is still a bit of a mystery to me too ;-)

What you didn't say is that you did:

PROVIDES_unslung = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc libc6-unslung"

so this file no longer provides glibc and therefore anything involving glibc won't help. At a guess I'd try something like:

PREFERRED_PROVIDER_libc6-unslung = "libc6-unslung"

Of course I have to ask why you're doing this at all? It looks a bit hatstand and I wonder why PREFERRED_VERSION_glibc = "2.2.5" wasn't enough? ;-) (not that it shouldn't work)

Cheers,

Richard

#3 lore raw

First, sorry for the late reply.

Quoted 3 lines · Richard Purdie

What you didn't say is that you did:

PROVIDES_unslung = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc

libc6-unslung"

Yes, I committed that change/fix over the weekend (see below). Previously it read just:
PROVIDES_unslung = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc" (without the final "libc6-unslung" on it).

Quoted 4 lines

so this file no longer provides glibc and therefore anything involving glibc won't help. At a guess I'd try something like:

PREFERRED_PROVIDER_libc6-unslung = "libc6-unslung"

I actually used:
PREFERRED_PROVIDER_libc6-unslung = "glibc"
My logic was that there were multiple providers for libc6-unslung (glibc's bb file and glibc-initial's bb file), and that the value the variable was set to referred to the bitbake recipe that should be preferred for building of the object named "libc6-unslung".

I tested with so many combinations that my eyes crossed. I don't recall if that combination (the change to PROVIDES_unslung above was ever tested with PREFERRED_PROVIDER_libc6-unslung="libc6-unslung", or not. I can test that if that's a more correct solution.

Quoted 3 lines

Of course I have to ask why you're doing this at all? It looks a bit hatstand and I wonder why PREFERRED_VERSION_glibc = "2.2.5" wasn't enough? ;-) (not that it shouldn't work)

Hatstand, huh? :-) I haven't heard that expression, but I think I get it :-). I committed the fix I discovered, not because it was necesarily The Right Fix(tm), but because it worked and the changes were guaranteed to be localized to Unslung (i.e. I wouldn't risk messing up anyone else's distro's with the fix I selected).

As for why it's this way, I can't say. Unslung is itself a strange creation - and its been in OE for a long time. Together that seems to result in some strange constructs. I'm striving to keep it building in OE, in the hopes that there might be a compelling feature or event that would make a new Unslung release interesting at some point in the future. However, the likelihood of such an event currently appears to be slim enough that I'm not sure it's a good idea to do significant rework and retesting on it, frankly. So I'm in favor of a small simple fix, even a kludgy one, if it'll work.

Quoted 3 lines

Cheers,

Richard

Thanks! If you or anyone else has strong feelings about this, and how it's been addressed, let me know (preferably with some guidance on what would be acceptable).

Regards,
Mike (mwester)