Hi all,

Following my last thread, I'm investigating how to build a static
libtspi for my app to link against, so that it can communicate with
tcsd in order to query TPM info.

I've been following the README, but I'm not seeing any specific
instructions for building statically. Right now I'm running the
following:

CFLAGS="-L/usr/lib64 -L/opt/gnome/lib64" LDFLAGS="-L/usr/lib64
-L/opt/gnome/lib64" ./configure --enable-static=yes --enable-shared=no
--with-openssl=/home/martin/openssl/install

The --with-openssl path points to a static build of OpenSSL that my
app links against. However, when doing this I get the following
errors:

libtool: compile:  gcc -DPACKAGE_NAME=\"trousers\"
-DPACKAGE_TARNAME=\"trousers\" -DPACKAGE_VERSION=\"0.3.9\"
"-DPACKAGE_STRING=\"trousers 0.3.9\""
-DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"trousers\" -DVERSION=\"0.3.9\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_OPENSSL_BN_H=1 -DHAVE_OPENSSL_ENGINE_H=1 -DHAVE_PTHREAD_H=1
-DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHTOLE_DEFINED=1
-DHAVE_DAEMON=1 -I. -DAPPID=\"TSPI\" -I../../src/include -L/usr/lib64
-L/opt/gnome/lib64 -DBI_OPENSSL -W -Wall -Werror -Wno-unused-parameter
-Wsign-compare -I../include -DTCSD_DEFAULT_PORT=30003
-DTSS_VER_MAJOR=0 -DTSS_VER_MINOR=3 -DTSS_SPEC_MAJOR=1
-DTSS_SPEC_MINOR=2 -c crypto/openssl/hash.c -o libtrousers_la-hash.o
crypto/openssl/rsa.c: In function ‘Trspi_RSA_Encrypt’:
crypto/openssl/rsa.c:71:5: error: dereferencing pointer to incomplete
type ‘RSA {aka struct rsa_st}’
  rsa->n = BN_bin2bn(publicKey, keysize, rsa->n);
     ^~
Makefile:415: recipe for target 'libtrousers_la-rsa.lo' failed
make[2]: *** [libtrousers_la-rsa.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
crypto/openssl/symmetric.c: In function ‘Trspi_Encrypt_ECB’:
crypto/openssl/symmetric.c:55:17: error: storage size of ‘ctx’ isn’t known
  EVP_CIPHER_CTX ctx;

It seems like the build system isn't finding the libssl/libcrypto
symbols. Am I doing something wrong here?


_______________________________________________
TrouSerS-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-users

Reply via email to