diff mbox

Building Xen 4.8 with GCC 7

Message ID 20170627182952.GZ3857@mail-itl (mailing list archive)
State New, archived
Headers show

Commit Message

Marek Marczykowski-Górecki June 27, 2017, 6:29 p.m. UTC
Hi,

I'm having troubles with building Xen with GCC 7 (Fedora 26). Some of
the problems are fixed by "Compilation fixes for GCC 7" patch series
sent a moment ago, but then I've stumbled on link failure of vtpmmgr
stubdomain, related to some functions of tpm_emulator. I've already tried
with -fkeep-inline-functions, but it only reduced number of errors.
Below is both -fkeep-inline-functions patch and full error message.

Any idea?



ld -nostdlib -L/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/cross-root-x86_64/x86_64-xen-elf/lib  -m elf_x86_64 -T arch/x86/minios-x86_64.lds  /home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o  -o /home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `vtpmmgr_GroupRegister':
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/vtpmmgr/vtpm_cmd_handler.c:555: undefined reference to `tpmrsa_free'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `vtpmmgr_GroupRegister':
vtpm_cmd_handler.c:(.text+0x3b6e): undefined reference to `tpmrsa_free'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `vtpmmgr_handle_cmd':
gdtoa-hexnan.c:(.text+0x4e68): undefined reference to `tpmrsa_free'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_TakeOwnership':
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/vtpmmgr/tpm.c:407: undefined reference to `unpack3_TPM_KEY'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_TakeOwnership':
gdtoa-hexnan.c:(.text+0x8726): undefined reference to `unpack3_TPM_KEY'
gdtoa-hexnan.c:(.text+0x8787): undefined reference to `unpack3_TPM_AUTH_SESSION'
gdtoa-hexnan.c:(.text+0x8827): undefined reference to `free_TPM_KEY'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_Seal':
gdtoa-hexnan.c:(.text+0x9435): undefined reference to `unpack3_TPM_STORED_DATA12'
gdtoa-hexnan.c:(.text+0x9496): undefined reference to `unpack3_TPM_AUTH_SESSION'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_Unseal':
gdtoa-hexnan.c:(.text+0x99d4): undefined reference to `unpack_ALLOC'
gdtoa-hexnan.c:(.text+0x9a28): undefined reference to `unpack3_TPM_AUTH_SESSION'
gdtoa-hexnan.c:(.text+0x9a62): undefined reference to `unpack3_TPM_AUTH_SESSION'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_LoadKey':
gdtoa-hexnan.c:(.text+0xa0c8): undefined reference to `unpack3_TPM_AUTH_SESSION'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_ReadPubek':
gdtoa-hexnan.c:(.text+0xa592): undefined reference to `unpack3_TPM_RSA_KEY_PARMS'
gdtoa-hexnan.c:(.text+0xa5b7): undefined reference to `unpack3_TPM_SYMMETRIC_KEY_PARMS'
gdtoa-hexnan.c:(.text+0xa616): undefined reference to `unpack3_PTR'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_GetCapability':
gdtoa
     0K ..-hexnan.c:(.text+0xaafc): undefined reference to `unpack_ALLOC'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_CreateEndorsementKeyPair':
gdtoa-hexnan.c:(.text+0xae1b): undefined reference to `unpack3_TPM_RSA_KEY_PARMS'
gdtoa-hexnan.c:(.text+0xae3f): undefined reference to `unpack3_TPM_SYMMETRIC_KEY_PARMS'
gdtoa-hexnan.c:(.text+0xae9c): undefined reference to `unpack3_PTR'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_MakeIdentity':
gdtoa-hexnan.c:(.text+0xb646): undefined reference to `unpack3_TPM_KEY'
gdtoa-hexnan.c:(.text+0xb6c8): undefined reference to `unpack_ALLOC'
gdtoa-hexnan.c:(.text+0xb72b): undefined reference to `unpack3_TPM_AUTH_SESSION'
gdtoa-hexnan.c:(.text+0xb768): undefined reference to `unpack3_TPM_AUTH_SESSION'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_ActivateIdentity':
gdtoa-hexnan.c:(.text+0xbbcc): undefined reference to `unpack3_TPM_SYMMETRIC_KEY'
gdtoa-hexnan.c:(.text+0xbc3a): undefined reference to `unpack3_TPM_AUTH_SESSION'
gdtoa-hexnan.c:(.text+0xbc73): undefined reference to `unpack3_TPM_AUTH_SESSION'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM_Quote':
gdtoa-hexnan.c:(.text+0xc015): undefined reference to `unpack3_TPM_PCR_COMPOSITE'
gdtoa-hexnan.c:(.text+0xc081): undefined reference to `unpack_ALLOC'
gdtoa-hexnan.c:(.text+0xc0da): undefined reference to `unpack3_TPM_AUTH_SESSION'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `unpack_TPMU_PUBLIC_ID':
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/vtpmmgr/tpm2_marshal.h:577: undefined reference to `unpack_TPMS_ECC_POINT'
/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os.o: In function `TPM2_CreatePrimary':
gdtoa-hexnan.c:(.text+0xdadc): undefined reference to `unpack_TPMS_ECC_POINT'
make[2]: *** [Makefile:173: /home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/mini-os-x86_64-vtpmmgr/mini-os] Error 1
make[2]: Leaving directory '/home/user/rpmbuild/BUILD/xen-4.8.1/extras/mini-os'
make[1]: *** [Makefile:576: vtpmmgr-stubdom] Error 2
make[1]: Leaving directory '/home/user/rpmbuild/BUILD/xen-4.8.1/stubdom'
make: *** [Makefile:105: install-stubdom] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.uyhPyK (%build)

Comments

John Thomson June 27, 2017, 11:23 p.m. UTC | #1
On Wed, 28 Jun 2017, at 04:29, Marek Marczykowski-Górecki wrote:

> /home/user/rpmbuild/BUILD/xen-4.8.1/stubdom/vtpmmgr/vtpm_cmd_handler.c:555:
> undefined reference to `tpmrsa_free'

Hi,
I think this was fixed for me with:
Olaf Hering's [Xen-devel] [PATCH] vtpmmgr: make inline functions static
https://lists.xenproject.org/archives/html/xen-devel/2017-06/msg02896.html
Where the static keyword is added to the inline functions in vtpmmgr

--
  John Thomson
diff mbox

Patch

--- xen-4.6.5/stubdom/vtpmmgr/Makefile	2017-03-07 17:19:05.000000000 +0100
+++ xen-4.6.5/stubdom/vtpmmgr/Makefile.new	2017-05-12 01:49:02.589000000 +0200
@@ -17,7 +17,7 @@  OBJS += vtpm_disk.o disk_tpm.o disk_io.o
 OBJS += mgmt_authority.o
 
 CFLAGS+=-Werror -Iutil -Icrypto -Itcs
-CFLAGS+=-Wno-declaration-after-statement -Wno-unused-label
+CFLAGS+=-Wno-declaration-after-statement -Wno-unused-label -fkeep-inline-functions
 
 build: $(TARGET)
 $(TARGET): $(OBJS)