Skip to contentSkip to conversation

How do you build 2 versions of the same recipe and a specific version from bitbake cmd line

DISCUSSION Jimi Damon 4 participants 5 messages Jul 14, 2017 – Jul 17, 2017

lore
Share & tools
lore

Jimi Damon

author
#0 lore raw

Hi,

Do to a fun "feature" of zeromq, the newest libraries are not backward compatible and hence I need to install a zeromq-4.1.5 and zeromq-3.2.2 libraries onto my target to assist with one application using the old version and a newer application using the newer one.

How can I do this from the local.conf file AND how can I specify a single recipe version to build on the command line ?

I've tried this in my local.conf

CORE_IMAGE_EXTRA_INSTALL += "zeromq_4.1.5 zeromq_3.2.2 "

but I get errors saying :

Quoted 10 lines

WARNING: Host distribution "Ubuntu-16.10" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. Loading cache: 100% |#################################################################################################################| Time: 0:00:00
Loaded 3485 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'zeromq_3.2.2' (but /media/tools/newboot2qt_builds/sources/meta-boot2qt/recipes-qt/images/b2qt-embedded-qt5-image.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'zeromq_3.2.2' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['zeromq_3.2.2']
ERROR: Required build target 'b2qt-embedded-qt5-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['b2qt-embedded-qt5-image', 'zeromq_3.2.2']

Quoted 2 lines

Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

In addition , how can I specify a specific version of a package from the command line with bitbake ?

Here are my layers

% bitbake-layers show-recipes | grep -A 2 zeromq

Quoted 3 lines

zeromq:
meta-oe 4.1.5
meta-oe 3.2.2

Now this fails

bitbake zeromq-4.1.5

Quoted 7 lines

WARNING: Host distribution "Ubuntu-16.10" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. Loading cache: 100% |#################################################################################################################| Time: 0:00:00
Loaded 3485 entries from dependency cache.
ERROR: Nothing PROVIDES 'zeromq-4.1.5'

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

or

bitbake zeromq_4.1.5

Quoted 7 lines

WARNING: Host distribution "Ubuntu-16.10" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. Loading cache: 100% |#################################################################################################################| Time: 0:00:00
Loaded 3485 entries from dependency cache.
ERROR: Nothing PROVIDES 'zeromq_4.1.5'

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Thanks,

#1 lore raw
Quoted 10 lines · Jimi Damon

Do to a fun "feature" of zeromq, the newest libraries are not backward compatible and hence I need to install a zeromq-4.1.5 and zeromq-3.2.2 libraries onto my target to assist with one application using the old version and a newer application using the newer one.

How can I do this from the local.conf file AND how can I specify a single recipe version to build on the command line ?

You need two recipes *with different names*, and they must not conflict in any way with each other.

Ross

#2 lore raw
Quoted 8 lines · Ross
Quoted 6 lines · Jimi Damon

Do to a fun "feature" of zeromq, the newest libraries are not backward compatible and hence I need to install a zeromq-4.1.5 and zeromq-3.2.2 libraries onto my target to assist with one application using the old version and a newer application using the newer one.

Quoted 8 lines
Quoted 3 lines

How can I do this from the local.conf file AND how can I specify a single recipe version to build on the command line ?

You need two recipes *with different names*, and they must not conflict in any way with each other.

Ross

Just to clarify, the typical way this is done is to put the major version number as part of the package name. For example, the recipes could be called zeromq3_3.2.2.bb and zeromq4_4.1.5.bb. This assumes zeromq can tolerate having multiple versions installed at the same time.

Robert

#3 lore raw

Hi,

Quoted 9 lines · Robert Joslyn

Just to clarify, the typical way this is done is to put the major version number as part of the package name. For example, the recipes could be called zeromq3_3.2.2.bb and zeromq4_4.1.5.bb. This assumes zeromq can tolerate having multiple versions installed at the same time.

Robert

I did not try but I think in the meantime we can have the same package with different versions in the same image.

The docu says about (run time dependencies) RDEPENDS:

"BitBake, which the OpenEmbedded build system uses, supports specifying versioned dependencies. Although the syntax varies depending on the packaging format, BitBake hides these differences from you."[1]

[1] http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-RDEPENDS

What's unclear to me is how this works with build time dependencies DEPENDS? I guess somewhere you need to say that you want to link against version 3.2.2 for one package and against 4.1.5 in another package and since it looks like DEPENDS doesn't contain versioned dependencies I guess you need to work with names like zeromq3_3.2.2.bb and zeromq4_4.1.5.bb.

Is this the case?

Which in turn makes me wonder what's the use case for RDEPENDS and versioned dependencies.

Regards,

(Another) Robert

#4 lore raw
Quoted 42 lines · Robert Berger

Hi,

Quoted 10 lines · Robert Joslyn

Just to clarify, the typical way this is done is to put the major version number as part of the package name. For example, the recipes
could be called zeromq3_3.2.2.bb and zeromq4_4.1.5.bb. This assumes zeromq can tolerate having multiple versions installed at the same time.

Robert

I did not try but I think in the meantime we can have the same package
with different versions in the same image.

The docu says about (run time dependencies) RDEPENDS:

"BitBake, which the OpenEmbedded build system uses, supports specifying
versioned dependencies. Although the syntax varies depending on the packaging format, BitBake hides these differences from you."[1]

[1]
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.yoctoproject.
org_docs_latest_mega-2Dmanual_mega-2Dmanual.html-23var- 2DRDEPENDS&d=DwICaQ&c=zVFQZQ67ypsA9mYKSCqWmQHiVkCCaN- Gb60_N6TVnLk&r=jKjb9x138uKtDnkEJ0l_Ks7NxaK4YpEWM1o0MkNOIx0&m=lB4lbBsS MGKatP7Qhwv-yEOj_8wqdO1udb- Fcowl95Y&s=lenIoSon3TiBnHTCoAxPZnfUoziIo_uEwECWpfj9qEA&e=

What's unclear to me is how this works with build time dependencies DEPENDS? I guess somewhere you need to say that you want to link against
version 3.2.2 for one package and against 4.1.5 in another package and
since it looks like DEPENDS doesn't contain versioned dependencies I guess you need to work with names like zeromq3_3.2.2.bb and zeromq4_4.1.5.bb.

Quoted 1 line

Is this the case?

As far as I know, yes, you need to use recipes named like that, so DEPENDS could contain "zeromq3" or "zeromq4". I don't think it's possible to specify versions with DEPENDS the same way you can with RDEPENDS.

Quoted 2 lines

Which in turn makes me wonder what's the use case for RDEPENDS and versioned dependencies.

I'm not sure, I never actually needed them. The versioned RDEPENDS are encoded in whatever packages you build (rpm, for example), so I assume there are use cases when using package feeds.

Robert