Closed BigfootACA closed 5 years ago
For now you'll have to patch configure.ac and remove the line with -Werror and -Wno-self-assign.
... or try it with CFLAGS="-DOPENSSL_API_COMPAT=0x10100000L -O2" ./autogen.sh ...
.
Did the above suggestion resolve the issue ?
PR #31 should address the issue for the long term.
I merged this PR into master now and backported it to the branch stable-0.6.0 as well.
$ ./autogen.sh --with-tpm2 --with-openssl --prefix=/usr ...... $ make all ...... Making all in src make[2]: Entering directory '/home/bigfoot/libtpms-0.6.0/src' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -include tpm_library_conf.h -I../include/libtpms -fstack-protector-strong -DPOSIX -DTPM_POSIX -DTPM_LIBTPMS_CALLBACKS -I ./tpm2 -I ./tpm2/crypto -I ./tpm2/crypto/openssl -g -O2 -Wall -Werror -Wreturn-type -Wsign-compare -Wno-self-assign -MT tpm2/crypto/openssl/libtpms_tpm2_la-TpmToOsslMath.lo -MD -MP -MF tpm2/crypto/openssl/.deps/libtpms_tpm2_la-TpmToOsslMath.Tpo -c -o tpm2/crypto/openssl/libtpms_tpm2_la-TpmToOsslMath.lo
test -f 'tpm2/crypto/openssl/TpmToOsslMath.c' || echo './'
tpm2/crypto/openssl/TpmToOsslMath.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -include tpm_library_conf.h -I../include/libtpms -fstack-protector-strong -DPOSIX -DTPM_POSIX -DTPM_LIBTPMS_CALLBACKS -I ./tpm2 -I ./tpm2/crypto -I ./tpm2/crypto/openssl -g -O2 -Wall -Werror -Wreturn-type -Wsign-compare -Wno-self-assign -MT tpm2/crypto/openssl/libtpms_tpm2_la-TpmToOsslMath.lo -MD -MP -MF tpm2/crypto/openssl/.deps/libtpms_tpm2_la-TpmToOsslMath.Tpo -c tpm2/crypto/openssl/TpmToOsslMath.c -fPIC -DPIC -o tpm2/crypto/openssl/.libs/libtpms_tpm2_la-TpmToOsslMath.o tpm2/crypto/openssl/TpmToOsslMath.c: In function ‘PointFromOssl’: tpm2/crypto/openssl/TpmToOsslMath.c:431:5: error: ‘EC_POINT_get_affine_coordinates_GFp’ is deprecated [-Werror=deprecated-declarations] OK = EC_POINT_get_affine_coordinates_GFp(E->G, pIn, x, y, E->CTX); ^~ In file included from /usr/local/include/openssl/opensslv.h:124, from /usr/local/include/openssl/opensslconf.h:13, from /usr/local/include/openssl/e_os2.h:13, from /usr/local/include/openssl/bn.h:14, from ./tpm2/Implementation.h:188, from ./tpm2/Tpm.h:66, from tpm2/crypto/openssl/TpmToOsslMath.c:72: /usr/local/include/openssl/ec.h:543:1: note: declared here DEPRECATEDIN_3(int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP group, ^~~~~~ tpm2/crypto/openssl/TpmToOsslMath.c: In function ‘EcPointInitialized’: tpm2/crypto/openssl/TpmToOsslMath.c:457:2: error: ‘EC_POINT_set_affine_coordinates_GFp’ is deprecated [-Werror=deprecated-declarations] EC_POINT_set_affine_coordinates_GFp(E->G, P, bnX, bnY, E->CTX); ^~~~~~~~~~~ In file included from /usr/local/include/openssl/opensslv.h:124, from /usr/local/include/openssl/opensslconf.h:13, from /usr/local/include/openssl/e_os2.h:13, from /usr/local/include/openssl/bn.h:14, from ./tpm2/Implementation.h:188, from ./tpm2/Tpm.h:66, from tpm2/crypto/openssl/TpmToOsslMath.c:72: /usr/local/include/openssl/ec.h:528:1: note: declared here DEPRECATEDIN_3(int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP group, ^~~~~~ tpm2/crypto/openssl/TpmToOsslMath.c: In function ‘BnCurveInitialize’: tpm2/crypto/openssl/TpmToOsslMath.c:497:3: error: ‘EC_POINT_set_affine_coordinates_GFp’ is deprecated [-Werror=deprecated-declarations] && EC_POINT_set_affine_coordinates_GFp(group, P, bnX, bnY, CTX); ^~ In file included from /usr/local/include/openssl/opensslv.h:124, from /usr/local/include/openssl/opensslconf.h:13, from /usr/local/include/openssl/e_os2.h:13, from /usr/local/include/openssl/bn.h:14, from ./tpm2/Implementation.h:188, from ./tpm2/Tpm.h:66, from tpm2/crypto/openssl/TpmToOsslMath.c:72: /usr/local/include/openssl/ec.h:528:1: note: declared here DEPRECATEDIN_3(int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, ^~~~~~ tpm2/crypto/openssl/TpmToOsslMath.c: At top level: cc1: error: unrecognized command line option ‘-Wno-self-assign’ [-Werror] cc1: all warnings being treated as errors make[2]: [Makefile:2861: tpm2/crypto/openssl/libtpms_tpm2_la-TpmToOsslMath.lo] Error 1 make[2]: Leaving directory '/home/bigfoot/libtpms-0.6.0/src' make[1]: [Makefile:507: all-recursive] Error 1 make[1]: Leaving directory '/home/bigfoot/libtpms-0.6.0' make: *** [Makefile:414: all] Error 2Platform: Failed: ArchLinux: gcc (GCC) 8.2.1 20181127 (Kernel: 4.20.7) Success: CentOS: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) (Kernel: 3.10.0) Success: Deepin: gcc (Debian 7.3.0-19) 7.3.0 (Kernel: 4.15.0)