Skip to content

Commit bbe8e7f

Browse files
stefanbergersrajiv
authored andcommitted
fix linking problem
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 <stefanb@linux.vnet.ibm.com>
1 parent 051dd8a commit bbe8e7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/cmds/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ else
3030
AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX
3131
endif
3232

33-
LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal
33+
LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -lcrypto
3434

3535
tpm_sealdata_SOURCES = tpm_sealdata.c
3636
tpm_unsealdata_SOURCES = tpm_unsealdata.c

0 commit comments

Comments
 (0)