Bug 11950 - (refkit) Error compiling libtpm-native-1.0
Summary: (refkit) Error compiling libtpm-native-1.0
Status: RESOLVED OBSOLETE
Alias: None
Product: IoT Reference OS Kit
Classification: Yocto Project Subprojects
Component: intel-iot-refkit-security (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.5
Assignee: Mikko Ylinen
QA Contact: yeoh ee peng
URL:
Whiteboard:
Depends on:
Blocks: 11951
  Show dependency tree
 
Reported: 2017-08-18 16:27 UTC by Juro Bystricky
Modified: 2017-11-14 13:03 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.