|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH VTPM v8 0/8] Vtpm patch set
On Thu, 2013-01-10 at 22:01 +0000, Matthew Fioravante wrote:
> On 01/10/2013 10:30 AM, Ian Campbell wrote:
> > On Thu, 2013-01-03 at 15:37 +0000, Matthew Fioravante wrote:
> >> The following are the final set of patches for vtpm in xen.
> >> They are derived from the previous v7 and Ian's xen
> >> vtpm respository with the various minor bug fixes we
> >> have discussed and fixed along the way. The bug fixes
> >> are baked into their respective patches.
> > Thanks.
> >
> > Unfortunately I'm afraid this fails to build for me when cmake is
> > installed. I get:
> >
> > ld -nostdlib
> > -L/local/scratch/ianc/devel/committer.git/stubdom/cross-root-x86_64/x86_64-xen-elf/lib
> > -m elf_x86_64 -T arch/x86/minios-x86_64.lds \
> >
> > /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o
> > \
> > -o
> > /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os
> > ld: warning: section `.bss' type changed to PROGBITS
> > /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o:
> > In function `mkdirs':
> > tpm_emulator_extern.c:(.text+0xbd95): undefined reference to
> > `__errno_location'
> > tpm_emulator_extern.c:(.text+0xbdad): undefined reference to
> > `__errno_location'
> > /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o:
> > In function `_tpm_extern_init':
> > tpm_emulator_extern.c:(.text+0xbe7f): undefined reference to `open'
> > tpm_emulator_extern.c:(.text+0xbe9b): undefined reference to
> > `__errno_location'
> > /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o:
> > In function `_tpm_write_to_storage':
> > tpm_emulator_extern.c:(.text+0xc1e9): undefined reference to `open'
> > /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os.o:
> > In function `_tpm_read_from_storage':
> > tpm_emulator_extern.c:(.text+0xc27b): undefined reference to `open'
> > tpm_emulator_extern.c:(.text+0xc2a2): undefined reference to `lseek'
> > tpm_emulator_extern.c:(.text+0xc2ba): undefined reference to `lseek'
> > make[2]: ***
> > [/local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mini-os]
> > Error 1
> > make[2]: Leaving directory
> > `/local/scratch/ianc/devel/committer.git/extras/mini-os'
> I'm going to claim user error on this one.
I'm afraid I don't think so...
> In the stubdom/Makefile we define TPM_NO_EXTERN using cmake to build the
> tpm emulator. In tpm_emulator-x86_64/tpm/tpm_emulator_extern.c all of
> the functions defined there use open() and mkdir() etc.. However when
> TPM_NO_EXTERN is defined this
> file contains only a set of null initialized function pointers (which
> vtpm assigns to its own functions).
This doesn't seem to have worked:
$ nm
stubdom/tpm_emulator-x86_64/build/tpm/CMakeFiles/tpm.dir/tpm_emulator_extern.o
U __errno_location
[...]
U lseek
[...]
U open
>
> Using the standard make targets there should be no possible way to get
> the tpm emulator to build without TPM_NO_EXTERN. When cmake is not
> present make vtpm-stubdom will fail because vtpm-stubdom is not present
> in the TARGETS variable. I certainly was not able to reproduce it in
> xen-unstable or in staging using a variety or permutations of make
> targets and cmake present/not-present.
>
> Were you playing with building the tpm emulator manually?
No, my script just runs configure + make dist -j12.
> Anyway I'm confident that if you do a distclean and rebuild the error
> should go away. Unless there is something broken about the clean targets
> leaving things around that should be deleted.
My standard test script includes both a distclean and a "git clean -f
-dx" which results in a pristine build tree. e.g. :
$ ls stubdom/
c/ newlib-chk.patch
caml/ newlib.patch
grub/ newlib-stdint-size_max-fix-from-1.17.0.patch
grub.patches/ ocaml.patch
ioemu-minios.cfg pciutils.patch
libpci.config.h README
libpci.config.mak stubdom-dm
lwip.patch-cvs xenstore-minios.cfg
Makefile
> Can you try one more time with cmake installed?
I have just rerun:
$ make distclean -j12 -s
$ git clean -f -dx
$ cmake --version
cmake version 2.8.2
$ ./configure
$ make dist-stubdom -j12
Same result. This is from a totally clean tree. I have pushed it to
git://xenbits.xen.org/people/ianc/xen-unstable vtpm4
in case there is some sort of patch misapplication.
I've just rerun again but this time doing "make -C stubdom vtpm-dom
-j12" at the end. The complete log of the configure+make stage of that
is attached.
$ ( ./configure && make -C stubdom/ vtpm-stubdom -j12 ) 2>&1 | tee
vtpm-build.log
Interesting lines:
cd tpm_emulator-x86_64/build; /usr/bin/cmake .. -DCMAKE_C_COMPILER=gcc
-DCMAKE_C_FLAGS="-std=c99 -DTPM_NO_EXTERN \
-isystem
/local/scratch/ianc/devel/committer.git/stubdom/../extras/mini-os/include [....]
so TPM_NO_EXTERN is there but:
cd
/local/scratch/ianc/devel/committer.git/stubdom/tpm_emulator-x86_64/build/tpm
&& /usr/lib/ccache/gcc -I/opt/local/include
-I/local/scratch/ianc/devel/committer.git/stubdom/tpm_emulator-x86_64
-I/local/scratch/ianc/devel/committer.git/stubdom/tpm_emulator-x86_64/build
-Wall -Werror -Wno-unused-parameter -Wpointer-arith -Wcast-align
-Wwrite-strings -Wextra -o CMakeFiles/tpm.dir/tpm_emulator_extern.o -c
/local/scratch/ianc/devel/committer.git/stubdom/tpm_emulator-x86_64/tpm/tpm_emulator_extern.c
IOW the TPM_EXTERN stuff has disappeared. Overall the CFLAGS appear a
bit lacking.
grep TPM_NO_EXTERN in:
stubdom/tpmemu-0.7.4.patch
stubdom/Makefile
stubdom/tpm_emulator-x86_64/build/CMakeCache.txt
stubdom/tpm_emulator-x86_64/tpm/tpm_emulator_extern.c
Ian.
Attachment:
vtpm-build.log.gz _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |