<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<font size="2"><span style="font-size:11pt">> "c:/program files/mingw/bin/gcc.exe" -D_MT -DTPM_WINDOWS -I.  -shared -o
<br>
> libibmtss.dll tssfile.o tsscryptoh.o tsscrypto.o tssprintcmd.o tss.o <br>
> tssproperties.o tssmarshal.o tssauth.o tssutils.o tsssocket.o tssdev.o <br>
> tsstransmit.o tssresponsecode.o tssccattributes.o tssprint.o Unmarshal.o <br>
> CommandAttributeData.o tss20.o tssauth20.o Commands.o ntc2lib.o tssntc.o<br>
> -Wl,--out-implib,libibmtss.a "c:/program <br>
> files/openssl64/lib/libcrypto.lib" "c:/program files/MinGW/lib/libws2_32.a"<br>
<br>
> tsscrypto.o: In function `TSS_Crypto_Init':<br>
> c:\Users\KennethGoldman\tpm2\utils/tsscrypto.c:109: undefined reference <br>
> to `OPENSSL_init_crypto'<br>
> tsscrypto.o: In function `TSS_Hash_GetMd':<br>
> c:\Users\KennethGoldman\tpm2\utils/tsscrypto.c:133: undefined reference <br>
> to `EVP_get_digestbyname'<br>
> ...<br>
> continues for all OpenSSL function names<br>
</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It seems to work fine here:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>/mingw/bin/gcc.exe -DTPM_WINDOWS -D_MT -L. -shared -Wl,--no-undefined -Wl,--out-implib,libibmtss.dll.a -o libibmtss-1.1.dll \<br>
</span><span>                        tssfile.o tsscryptoh.o tsscrypto.o tssprintcmd.o tss.o tssproperties.o tssmarshal.o tssauth.o tssutils.o tsssocket.o tssdev.o tsstransmit.o tssresponsecode.o tssccattributes.o tssprint.o Unmarshal.o CommandAttributeData.o
 tss12.o tssauth12.o tssmarshal12.o Unmarshal12.o Commands12.o tssccattributes12.o CommandAttributeData12.o tss20.o tssauth20.o Commands.o ntc2lib.o tssntc.o -lcrypto -lz -lcrypt32 -lws2_32</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Sorry to pollute this list! You will soon find out why!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>Out of curiosity, we downloaded ibmtss1331.tar.gz and tried to build it from source (first time ever).<br>
</span>
<div><br>
</div>
<div>We have been using MSYS/MinGW for quite some time and we build (from source) and deploy large projects (with many dependencies) on a regular basis.<br>
</div>
<div>We tried to do the same with this project (ibmtss).<br>
</div>
<div>Then, on a MSYS console window we typed: make -f makefile.mak under 'ibmtss1331\utils' folder.<br>
</div>
<div><br>
</div>
<div>Find some snippets of 'makefile.mak' file:<br>
</div>
<div><br>
</div>
<div>    * CC = "c:/program files/mingw/bin/gcc.exe"<br>
</div>
<div><br>
</div>
<div>   * -I"c:/program files/MinGW/include" \<br>
</div>
<div>   * -I"c:/program files/openssl/include" \<br>
</div>
<div><br>
</div>
<div>    * LNLIBS =  "c:/program files/openssl/lib/mingw/libeay32.a" \<br>
</div>
<div>         "c:/program files/openssl/lib/mingw/ssleay32.a" \<br>
</div>
<div>         "c:/program files/MinGW/lib/libws2_32.a"<br>
</div>
<div><br>
</div>
<div>  * imaextend.exe: imaextend.o imalib.o $(LIBTSS) <br>
</div>
<div>     $(CC) $(LNFLAGS) -L. -libmtss $< -o $@ applink.o imalib.o $(LNLIBS) $(LIBTSS)
<br>
</div>
<div> <br>
</div>
<div> <br>
</div>
<div>As you can imagine, there are dozens of compilation errors, such as:<br>
</div>
<div><br>
</div>
<div>    $ make -f makefile.mak all<br>
</div>
<div>    "c:/program files/mingw/bin/gcc.exe" -DTPM_WINDOWS -I. -I"c:/program files/MinGW/include" -I"c:/program files/openssl/include"  -Wall -W -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wformat=2 -Wold-style-definition -ggdb -O0 -c -DTPM_TPM20
 tssfile.c<br>
</div>
<div>    /bin/sh: c:/program files/mingw/bin/gcc.exe: No such file or directory<br>
</div>
<div>    make: *** [tssfile.o] Error 127<br>
</div>
<div><br>
</div>
<div>    cc1.exe: warning: unrecognized command line option '-Wno-self-assign'<br>
</div>
<div><br>
</div>
<div>Some runtime errors or 'mistakes', such as:<br>
</div>
<div><br>
</div>
<div>    $ powerup.exe -v<br>
</div>
<div>    TSS_Socket_Open: Opening localhost:2322-mssim<br>
</div>
<div>    TSS_Socket_Open: Error on connect to localhost:2322<br>
</div>
<div>    TSS_Socket_Open: client connect: error 0 No error<br>
</div>
<div>    powerup: failed, rc 000b0008<br>
</div>
<div>    TSS_RC_NO_CONNECTION - Failure connecting to lower layer<br>
</div>
<div><br>
</div>
<div>None of the executables provide some sort of version info and/or dependencies info (e.g. OpenSSL version)<br>
</div>
<div><br>
</div>
<div>It is impossible to figure out how tests can be run! We tried: make -f makefile.mak check and make -f makefile.mak test and we got:<br>
</div>
<div><br>
</div>
<div>    make: *** No rule to make target `check'.  Stop.<br>
</div>
<div><br>
</div>
<div>    make: *** No rule to make target `test'.  Stop.<br>
</div>
<div><br>
</div>
<div>Trying to build from source a 'cousin' project (ibmtpm1332), taken from the same repository,  we came across things like this (we use MinGW x64):<br>
</div>
<div><br>
</div>
<div>    #elif TPM_POSIX && !defined _LP64<br>
</div>
<div>    #define  RADIX_BITS                     32<br>
</div>
<div><br>
</div>
<div>    #elif TPM_POSIX &&  defined _LP64<br>
</div>
<div>    #define  RADIX_BITS                    64<br>
</div>
<div><br>
</div>
<div>    #elif TPM_WINDOWS<br>
</div>
<div>    #define  RADIX_BITS                     32<br>
</div>
<div><br>
</div>
<div>    #else<br>
</div>
<div>    #error "RADIX_BITS is not set"<br>
</div>
<div><br>
</div>
<div>    #endif<br>
</div>
<div><br>
</div>
<div>But then you get:<br>
</div>
<div><br>
</div>
<div>    In file included from BnValues.h:271:0,<br>
</div>
<div>                 from Global.h:83,<br>
</div>
<div>                 from Tpm.h:71,<br>
</div>
<div>                 from AlgorithmCap.c:67:<br>
</div>
<div>    TpmToOsslMath.h:83:4: error: #error "Ossl library is using different radix"<br>
</div>
<div>    #  error "Ossl library is using different radix"<br>
</div>
<div>       ^~~~~<br>
</div>
<div>    make: *** [AlgorithmCap.o] Error 1<br>
</div>
<div><br>
</div>
<div>On the one hand, we are preparing a comprehensive patch as a contribution to the ibmtss/tpm project(s).<br>
</div>
<div>On the other hand, we refuse to believe that IBM is 'fostering' these practices and quality<span> in 2019! We have decided to contact IBM to report and discuss this matter.</span></div>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
To my mind, we can conclude that OpenSSL project has nothing to do with the issue reported here. Sorry again!<br>
</div>
</body>
</html>