* [Buildroot] Error while building tpm2-tools package with fapi support
@ 2023-05-19 10:59 Sourabh Hegde
2023-05-20 19:24 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 5+ messages in thread
From: Sourabh Hegde @ 2023-05-19 10:59 UTC (permalink / raw)
To: buildroot
[-- Attachment #1.1: Type: text/plain, Size: 2863 bytes --]
Hello All,
I am trying to build the package tpm2-tools
https://github.com/buildroot/buildroot/tree/master/package/tpm2-tools with
"fapi tools" option enabled
https://github.com/buildroot/buildroot/blob/603df32a0cd416caa2d2688008cb87f14ad68ef3/package/tpm2-tools/Config.in#L26
(BR2_PACKAGE_TPM2_TOOLS_FAPI=y, BR2_PACKAGE_TPM2_TSS_FAPI=y).
But this results in below error
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-buildroot-linux-gnu-strip... (cached)
/home/build/per-package/tpm2-tools/host/bin/aarch64-linux-strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of
/home/build/per-package/tpm2-tools/host/bin/aarch64-linux-gcc... none
checking whether make supports nested variables... (cached) yes
checking whether to build with code coverage support... no
checking for pandoc... (cached) no
configure: WARNING: Required executable pandoc not found, man pages will
not be built
checking pkg-config is at least version 0.9.0... yes
checking for TSS2_FAPI... no
configure: error: Required module tss2-fapi not found
However it builds successfully without BR2_PACKAGE_TPM2_TOOLS_FAPI selected.
Below is the tpm2-tools.mk file
################################################################################
#
# tpm2-tools
#
################################################################################
TPM2_TOOLS_VERSION = 5.2
TPM2_TOOLS_SITE =
https://github.com/tpm2-software/tpm2-tools/releases/download/$(TPM2_TOOLS_VERSION)
TPM2_TOOLS_LICENSE = BSD-3-Clause
TPM2_TOOLS_LICENSE_FILES = doc/LICENSE
TPM2_TOOLS_CPE_ID_VENDOR = tpm2-tools_project
TPM2_TOOLS_SELINUX_MODULES = tpm2
TPM2_TOOLS_DEPENDENCIES = libcurl openssl tpm2-tss host-pkgconf
# -fstack-protector-all and FORTIFY_SOURCE=2 is used by
# default. Disable that so the BR2_SSP_* / BR2_FORTIFY_SOURCE_* options
# in the toolchain wrapper and CFLAGS are used instead
TPM2_TOOLS_CONF_OPTS = --disable-hardening
# do not build man pages
TPM2_TOOLS_CONF_ENV += ac_cv_prog_PANDOC=''
ifeq ($(BR2_PACKAGE_TPM2_TOOLS_FAPI),y)
TPM2_TOOLS_CONF_OPTS += --enable-fapi
else
TPM2_TOOLS_CONF_OPTS += --disable-fapi
endif
$(eval $(autotools-package))
Can any one please let me know what the issue is?
Thanks,
Sourabh
[-- Attachment #1.2: Type: text/html, Size: 3628 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Error while building tpm2-tools package with fapi support
2023-05-19 10:59 [Buildroot] Error while building tpm2-tools package with fapi support Sourabh Hegde
@ 2023-05-20 19:24 ` Thomas Petazzoni via buildroot
2023-05-20 21:34 ` Sourabh Hegde
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-05-20 19:24 UTC (permalink / raw)
To: Sourabh Hegde; +Cc: buildroot
Hello,
On Fri, 19 May 2023 12:59:30 +0200
Sourabh Hegde <hrsourabh011@gmail.com> wrote:
> Hello All,
>
> I am trying to build the package tpm2-tools
> https://github.com/buildroot/buildroot/tree/master/package/tpm2-tools with
> "fapi tools" option enabled
> https://github.com/buildroot/buildroot/blob/603df32a0cd416caa2d2688008cb87f14ad68ef3/package/tpm2-tools/Config.in#L26
> (BR2_PACKAGE_TPM2_TOOLS_FAPI=y, BR2_PACKAGE_TPM2_TSS_FAPI=y).
> But this results in below error
I have just built the following configuration:
BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_TPM2_TOOLS=y
BR2_PACKAGE_TPM2_TOOLS_FAPI=y
# BR2_TARGET_ROOTFS_TAR is not set
and it builds just fine here. Could you share your .config, or a
minimal configuration that exhibits the problem?
> checking for TSS2_FAPI... no
> configure: error: Required module tss2-fapi not found
It is simply using pkg-config to detect TSS2_FAPI. tpm2-tools correctly
has a dependency on host-pkgconf and tpm2-tss properly installs
tss2-fapi.pc.
So my guess is that you are doing a partial rebuild. You did a first
build without BR2_PACKAGE_TPM2_TOOLS_FAPI enabled, and then enabled it.
Thing is that tpm2-tss was already built as part of a previous build,
but without FAPI support.
See https://buildroot.org/downloads/manual/manual.html#full-rebuild for
some details on this.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Error while building tpm2-tools package with fapi support
2023-05-20 19:24 ` Thomas Petazzoni via buildroot
@ 2023-05-20 21:34 ` Sourabh Hegde
2023-05-22 14:16 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 5+ messages in thread
From: Sourabh Hegde @ 2023-05-20 21:34 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
[-- Attachment #1.1: Type: text/plain, Size: 2453 bytes --]
Hello Thomas,
So my guess is that you are doing a partial rebuild. You did a first
> build without BR2_PACKAGE_TPM2_TOOLS_FAPI enabled, and then enabled it.
> Thing is that tpm2-tss was already built as part of a previous build,
> but without FAPI support.
>
Yes, you are right.
But, I did make "tpm2-tools-dirclean && make tpm2-tools-rebuild" and this
didn't help.
Also, I tried "make tpm2-tools-dirclean all" and "make tpm2-tools-dircclean
&& make tpm2-tools-reconfigure". This also resulted in the same error.
Could you please let me know what is the correct make command to rebuild
the package again from scratch?
Thank you,
Sourabh
On Sat, 20 May 2023 at 21:24, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
wrote:
> Hello,
>
> On Fri, 19 May 2023 12:59:30 +0200
> Sourabh Hegde <hrsourabh011@gmail.com> wrote:
>
> > Hello All,
> >
> > I am trying to build the package tpm2-tools
> > https://github.com/buildroot/buildroot/tree/master/package/tpm2-tools
> with
> > "fapi tools" option enabled
> >
> https://github.com/buildroot/buildroot/blob/603df32a0cd416caa2d2688008cb87f14ad68ef3/package/tpm2-tools/Config.in#L26
> > (BR2_PACKAGE_TPM2_TOOLS_FAPI=y, BR2_PACKAGE_TPM2_TSS_FAPI=y).
> > But this results in below error
>
> I have just built the following configuration:
>
> BR2_arm=y
> BR2_cortex_a9=y
> BR2_ARM_ENABLE_VFP=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_TPM2_TOOLS=y
> BR2_PACKAGE_TPM2_TOOLS_FAPI=y
> # BR2_TARGET_ROOTFS_TAR is not set
>
> and it builds just fine here. Could you share your .config, or a
> minimal configuration that exhibits the problem?
>
> > checking for TSS2_FAPI... no
> > configure: error: Required module tss2-fapi not found
>
> It is simply using pkg-config to detect TSS2_FAPI. tpm2-tools correctly
> has a dependency on host-pkgconf and tpm2-tss properly installs
> tss2-fapi.pc.
>
> So my guess is that you are doing a partial rebuild. You did a first
> build without BR2_PACKAGE_TPM2_TOOLS_FAPI enabled, and then enabled it.
> Thing is that tpm2-tss was already built as part of a previous build,
> but without FAPI support.
>
> See https://buildroot.org/downloads/manual/manual.html#full-rebuild for
> some details on this.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
[-- Attachment #1.2: Type: text/html, Size: 3788 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Error while building tpm2-tools package with fapi support
2023-05-20 21:34 ` Sourabh Hegde
@ 2023-05-22 14:16 ` Thomas Petazzoni via buildroot
2023-06-13 21:21 ` Sourabh Hegde
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-05-22 14:16 UTC (permalink / raw)
To: Sourabh Hegde; +Cc: buildroot
Hello,
On Sat, 20 May 2023 23:34:48 +0200
Sourabh Hegde <hrsourabh011@gmail.com> wrote:
> Yes, you are right.
> But, I did make "tpm2-tools-dirclean && make tpm2-tools-rebuild" and this
> didn't help.
> Also, I tried "make tpm2-tools-dirclean all" and "make tpm2-tools-dircclean
> && make tpm2-tools-reconfigure". This also resulted in the same error.
It's tpm2-tss that you need to rebuild. When you enable
BR2_PACKAGE_TPM2_TOOLS_FAPI, it selects BR2_PACKAGE_TPM2_TSS_FAPI. But
the thing is that tpm2-tss has already been built with
BR2_PACKAGE_TPM2_TSS_FAPI disabled. Buildroot does not have the logic
to automatically realize this. So either you do a full rebuild ("make
clean all"), or you understand that you have to explicitly tell
Buildroot that tpm2-tss needs to be rebuilt.
So, essentially here:
$ make tpm2-tss-dirclean tpm2-tools-dirclean
$ make
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] Error while building tpm2-tools package with fapi support
2023-05-22 14:16 ` Thomas Petazzoni via buildroot
@ 2023-06-13 21:21 ` Sourabh Hegde
0 siblings, 0 replies; 5+ messages in thread
From: Sourabh Hegde @ 2023-06-13 21:21 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
[-- Attachment #1.1: Type: text/plain, Size: 1212 bytes --]
Hello Thomas,
Thanks for the info, it worked
Regards,
Sourabh
On Mon, May 22, 2023, 16:16 Thomas Petazzoni <thomas.petazzoni@bootlin.com>
wrote:
> Hello,
>
> On Sat, 20 May 2023 23:34:48 +0200
> Sourabh Hegde <hrsourabh011@gmail.com> wrote:
>
> > Yes, you are right.
> > But, I did make "tpm2-tools-dirclean && make tpm2-tools-rebuild" and this
> > didn't help.
> > Also, I tried "make tpm2-tools-dirclean all" and "make
> tpm2-tools-dircclean
> > && make tpm2-tools-reconfigure". This also resulted in the same error.
>
> It's tpm2-tss that you need to rebuild. When you enable
> BR2_PACKAGE_TPM2_TOOLS_FAPI, it selects BR2_PACKAGE_TPM2_TSS_FAPI. But
> the thing is that tpm2-tss has already been built with
> BR2_PACKAGE_TPM2_TSS_FAPI disabled. Buildroot does not have the logic
> to automatically realize this. So either you do a full rebuild ("make
> clean all"), or you understand that you have to explicitly tell
> Buildroot that tpm2-tss needs to be rebuilt.
>
> So, essentially here:
>
> $ make tpm2-tss-dirclean tpm2-tools-dirclean
> $ make
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
[-- Attachment #1.2: Type: text/html, Size: 1957 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-13 21:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-19 10:59 [Buildroot] Error while building tpm2-tools package with fapi support Sourabh Hegde
2023-05-20 19:24 ` Thomas Petazzoni via buildroot
2023-05-20 21:34 ` Sourabh Hegde
2023-05-22 14:16 ` Thomas Petazzoni via buildroot
2023-06-13 21:21 ` Sourabh Hegde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox