When compiling the tpm-tools I get a linking problem:

Making all in cmds
make[3]: Entering directory `/root/tpm-tools/src/cmds'
/bin/sh ../../libtool --tag=CC   --mode=link gcc  -g -O2 -m64 -Wall -Werror 
-Wreturn-type -Wsign-compare   -o tpm_sealdata tpm_sealdata.o 
../../lib/libtpm_tspi.la -ltspi ../../lib/libtpm_unseal.la -ltpm_unseal 
libtool: link: gcc -g -O2 -m64 -Wall -Werror -Wreturn-type -Wsign-compare -o 
.libs/tpm_sealdata tpm_sealdata.o  ../../lib/.libs/libtpm_tspi.a 
../../lib/.libs/libtpm_unseal.so -ltspi
/usr/bin/ld: tpm_sealdata.o: undefined reference to symbol 'BIO_pop'
/usr/bin/ld: note: 'BIO_pop' is defined in DSO /lib64/libcrypto.so.10 so try 
adding it to the linker command line
/lib64/libcrypto.so.10: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

The patch below fixes this problem by also linking with -lcrypto.

Signed-off-by: Stefan Berger <[email protected]>

diff --git a/src/cmds/Makefile.am b/src/cmds/Makefile.am
index b2b4622..de73ecf 100644
--- a/src/cmds/Makefile.am
+++ b/src/cmds/Makefile.am
@@ -30,7 +30,7 @@ else
 AM_CPPFLAGS    =       -I$(top_srcdir)/include -D_LINUX
 endif
 
-LDADD          =       $(top_builddir)/lib/libtpm_tspi.la -ltspi 
$(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal
+LDADD          =       $(top_builddir)/lib/libtpm_tspi.la -ltspi 
$(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -lcrypto
 
 tpm_sealdata_SOURCES = tpm_sealdata.c
 tpm_unsealdata_SOURCES = tpm_unsealdata.c


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech

Reply via email to