Bug 11950

Summary: (refkit) Error compiling libtpm-native-1.0
Product: [Yocto Project Subprojects] IoT Reference OS Kit Reporter: Juro Bystricky <juro.bystricky>
Component: intel-iot-refkit-securityAssignee: Mikko Ylinen <mikko.ylinen>
Status: RESOLVED OBSOLETE QA Contact: yeoh ee peng <ee.peng.yeoh>
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, mikko.ylinen, richard.purdie
Version: 2.4   
Target Milestone: 2.5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 11951    

Description Juro Bystricky 2017-08-18 16:27:33 UTC
As seen in Autobuilder:
https://autobuilder.yocto.io/builders/nightly-refkit/builds/122/steps/BuildImages/logs/stdio

relevant errors:

| x86_64-linux-libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -isystem/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-refkit/build/build/tmp-glibc/work/x86_64-linux/libtpm-native/1.0+gitAUTOINC+ad44846dda-r0/recipe-sysroot-native/usr/include -include tpm_library_conf.h -I../include/libtpms -fstack-protector-strong -Wl,-z,relro -Wl,-z,now -DTPM_V12 -DTPM_PCCLIENT -DTPM_VOLATILE_LOAD -DTPM_ENABLE_ACTIVATE -DTPM_AES -DTPM_LIBTPMS_CALLBACKS -DTPM_NV_DISK -DTPM_POSIX -isystem/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-refkit/build/build/tmp-glibc/work/x86_64-linux/libtpm-native/1.0+gitAUTOINC+ad44846dda-r0/recipe-sysroot-native/usr/include -O2 -pipe -Wall -Werror -Wreturn-type -Wsign-compare -c tpm12/tpm_delegate.c  -fPIC -DPIC -o tpm12/.libs/libtpms_tpm12_la-tpm_delegate.o
| tpm12/tpm_crypto.c: In function ‘TPM_RSAGenerateKeyPair’:
| tpm12/tpm_crypto.c:362:9: error: ‘RSA_generate_key’ is deprecated [-Werror=deprecated-declarations]
|          rsa = RSA_generate_key(num_bits, e, NULL, NULL);                /* freed @1 */
|          ^~~
| In file included from /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-refkit/build/build/tmp-glibc/work/x86_64-linux/libtpm-native/1.0+gitAUTOINC+ad44846dda-r0/recipe-sysroot-native/usr/include/openssl/asn1.h:15:0,
|                  from /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-refkit/build/build/tmp-glibc/work/x86_64-linux/libtpm-native/1.0+gitAUTOINC+ad44846dda-r0/recipe-sysroot-native/usr/include/openssl/rsa.h:16,
|                  from /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-refkit/build/build/tmp-glibc/work/x86_64-linux/libtpm-native/1.0+gitAUTOINC+ad44846dda-r0/recipe-sysroot-native/usr/include/openssl/engine.h:24,
|                  from tpm12/tpm_crypto.c:50:
| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-refkit/build/build/tmp-glibc/work/x86_64-linux/libtpm-native/1.0+gitAUTOINC+ad44846dda-r0/recipe-sysroot-native/usr/include/openssl/rsa.h:193:1: note: declared here
|  DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
|  ^
| tpm12/tpm_crypto.c:370:58: error: dereferencing pointer to incomplete type ‘RSA {aka struct rsa_st}’
|          rc = TPM_bn2binMalloc(n, &nbytes, (TPM_BIGNUM)rsa->n, num_bits/8); /* freed by caller */
|
Comment 1 Mikko Ylinen 2017-08-24 03:18:27 UTC
This is due to openssl/openssl10 that now got changed back to openssl only in OE-core. Should be RESOLVED/OBSOLETE?
Comment 2 Richard Purdie 2017-08-24 14:42:10 UTC
We will end up moving to 1.1 so I think this needs to stay open to remind us this will need fixing eventually
Comment 3 Mikko Ylinen 2017-08-25 09:37:32 UTC
(In reply to comment #2)
> We will end up moving to 1.1 so I think this needs to stay open to remind us
> this will need fixing eventually


This can be done with a SRCREV update but the core problem currently is the openssl/openssl10 co-existence in the sysroot.
Comment 4 Mikko Ylinen 2017-11-14 13:03:24 UTC
Oe-core went back to openssl 1.0 and no plans to move to 1.1 just yet. Closing as obsolete for now.