From: Scheie, Peter M <Petre.Scheie at gd-ms.com>
To: tpm2@lists.01.org
Subject: Re: [tpm2] building tpm2-tools with bitbake fails even though tpm2-tss builds fine
Date: Wed, 21 Feb 2018 14:27:58 +0000 [thread overview]
Message-ID: <cdc22bc0e47748aa85279c47c3cef6b0@AZDC-MMB02.GD-MS.US> (raw)
In-Reply-To: b61e87c7-1207-593a-7a0a-a825587ed2a2@redhat.com
[-- Attachment #1: Type: text/plain, Size: 2441 bytes --]
Thanks for the explanations.
I notice that if I just run ./configure in tpm2-tools-3.0.3, I get a similar error to when I try to run bitbake, that it can't find SAPI. With ./configure, I can solve this by setting PGK_CONFIG_PATH=/usr/local/lib/pkgconfig, as that's where 'make install' for tpm2-tss puts the pkgconfig/ directory by default. How do I do that with bitbake? That is, how do I specify in my recipe for tpm2-tools the location of pkgconfig as set by the tpm2-tss build/recipe?
Peter
-----Original Message-----
From: Javier Martinez Canillas [mailto:javierm(a)redhat.com]
Sent: Tuesday, February 20, 2018 5:34 PM
To: Philip Tricca; Scheie, Peter M
Cc: tpm2(a)lists.01.org
Subject: Re: [tpm2] building tpm2-tools with bitbake fails even though tpm2-tss builds fine
[snip]
>>
>> * Why is the recipe made up of two files, tpm2-tools_2.1.0.bb and tpm2-tools.inc instead of just putting it all in the .bb file?
>
> I don't remember. I think I was trying to support multiple versions of
> one component at some point and the build required different
> work-arounds in the bitbake metadata. As the build has gotten better
> the version specific files (*.bb) have shrunk as the workarounds have
> come out. Eventually they may go away completely ...
>
I'm not a BitBake & OpenEmbedded expert, but AFAIR what you do is pretty common. That way you could for example develop / test against the latest git snapshot but also provide a stable release so people can switch them setting a PREFERRED_VERSION for the recipe in an image or machine config.
>> * Why does the SRC_URI in the .bb file point to gcc7.diff which references, among others, a main.c file that isn't in the tar file?
SRC_URI in tpm2-tools.inc is set to the tpm2.0-tools.git repo, but then the tpm2-tools_2.1.0.bb adds to the SRC_URI a patch. That's how you add patches on the BitBake recipes.
That patch was to allow building with GCC7, since it got much more strict on fall-throughs for switch case statements.
About the main.c not being in the tarball, it really depends on which version of the recipe you are using. The tpm2-tools_2.1.0.bb has SRCREV set to 27d34a61cb947780ab58508dfea70e696cff185c, which is the SHA-1 for
2.1.0 tag so it should be there when using that version of the recipe.
Best regards,
--
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement Red Hat
next reply other threads:[~2018-02-21 14:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 14:27 Scheie, Peter M [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-02-22 19:39 [tpm2] building tpm2-tools with bitbake fails even though tpm2-tss builds fine Scheie, Peter M
2018-02-22 5:04 Philip Tricca
2018-02-21 20:38 Scheie, Peter M
2018-02-21 16:19 Scheie, Peter M
2018-02-20 23:33 Javier Martinez Canillas
2018-02-20 21:49 Philip Tricca
2018-02-20 20:37 Scheie, Peter M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cdc22bc0e47748aa85279c47c3cef6b0@AZDC-MMB02.GD-MS.US \
--to=tpm2@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox