Noticing no openssl 1.1.1 for mod_pagespeed . Are we using mod_pagespeed version 1.13.35.2 ?
Hi, Thanks for CC'ing on the issue :) Since yesterday I noticed it, I already identified problematic part of the issue, And am testing the build with couple of changes I made...
Created attachment 200604 [details] Patch fix build on openssl1.1 This patch fixes build with openssl1.1 Can you please confirm it works on your environment too?
testing now
6 errors rsa related third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:483:10: error: incomplete definition of type 'struct rsa_st' rsa->n = bignum_from_base64(validate_string_field(key_prop, "n")); ~~~^ /usr/local/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st' typedef struct rsa_st RSA; ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:484:14: error: incomplete definition of type 'struct rsa_st' if (rsa->n == NULL) goto end; ~~~^ /usr/local/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st' typedef struct rsa_st RSA; ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:486:10: error: incomplete definition of type 'struct rsa_st' rsa->e = bignum_from_base64(validate_string_field(key_prop, "e")); ~~~^ /usr/local/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st' typedef struct rsa_st RSA; ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:487:14: error: incomplete definition of type 'struct rsa_st' if (rsa->e == NULL) goto end; ~~~^ /usr/local/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st' typedef struct rsa_st RSA; ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:490:10: error: incomplete definition of type 'struct rsa_st' if (rsa->e == NULL || rsa->n == NULL) { ~~~^ /usr/local/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st' typedef struct rsa_st RSA; ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:490:28: error: incomplete definition of type 'struct rsa_st' if (rsa->e == NULL || rsa->n == NULL) { ~~~^ /usr/local/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st' typedef struct rsa_st RSA; ^ 6 errors generated.
The error you wrote shows the patch maybe isn't applied correctly, can you ensure about it? [eg, is the file "www/mod_pagespeed/files/patch-third__party_grpc_src_src_core_lib_security_credentials_jwt_jwt__verifier.c" created for you after applying the patch?] For me build goes fine both on amd64 and i386 with openssl1.1 as default... I mostly want to sure if it works on run-time for you :D
Just to make sure we are on same base, you might need to consider that the patch is generated by "svn diff", are you applying it with "svn patch" or other tools?
Comment on attachment 200604 [details] Patch fix build on openssl1.1 gmake[1]: Entering directory '/usr/ports/www/mod_pagespeed/work/incubator-pageseed-mod-a5cfe15' CC(target) /usr/ports/www/mod_pagespeed/work/incubator-pagespeed-mod-a5cfe15/elease/obj.target/grpc_core/third_party/grpc/src/src/core/lib/security/credentils/jwt/jwt_verifier.o third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:489:2: warning: incompatible pointer types passing 'BIGNUM **' (aka 'struct bignum_st **' to parameter of type 'BIGNUM *' (aka 'struct bignum_st *'); remove & [-Wincompatible-pointer-types] RSA_set0_key(rsa, &n, NULL, NULL); ^~ /usr/local/include/openssl/rsa.h:204:34: note: passing argument to parameter 'n here int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:499:3: warning: incompatible pointer types passing 'BIGNUM **' (aka 'struct bignum_st **' to parameter of type 'BIGNUM *' (aka 'struct bignum_st *'); remove & [-Wincompatible-pointer-types] RSA_set0_key(rsa, NULL, &e, NULL); ^~ /usr/local/include/openssl/rsa.h:204:45: note: passing argument to parameter 'e here int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:507:2: error: use of undeclared identifier 'nn' RSA_get0_key(rsa, &nn, &ee, NULL); ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:507:2: error: use of undeclared identifier 'ee' RSA_get0_key(rsa, &nn, &ee, NULL); ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:508:7 error: use of undeclared identifier 'ee' if (ee == NULL || nn == NULL) { ^ third_party/grpc/src/src/core/lib/security/credentials/jwt/jwt_verifier.c:508:2: error: use of undeclared identifier 'nn' if (ee == NULL || nn == NULL) { ^ 2 warnings and 4 errors generated. Once patch was implemented properly
This is build log for my build on a poudriere jail with openssl111 as default < https://reviews.freebsd.org/P246 > it seems it works fine over here... I see the error that you posted says about two variables undefined but they are defined just couple of lines above... Sorry to repeat my question, can you try applying patches and build in a clean/new environment? thanks
A commit references this bug: Author: mmokhi Date: Sun Jan 20 19:11:17 UTC 2019 New revision: 490804 URL: https://svnweb.freebsd.org/changeset/ports/490804 Log: www/mod_pagespeed: Fix build for openssl111 PR: 234447 Sponsored by: The FreeBSD Foundation Changes: head/www/mod_pagespeed/Makefile head/www/mod_pagespeed/files/patch-third__party_grpc_src_src_core_lib_security_credentials_jwt_jwt__verifier.c head/www/mod_pagespeed/files/patch-third__party_serf_instaweb__ssl__buckets.c
A commit references this bug: Author: mmokhi Date: Sun Jan 20 19:14:56 UTC 2019 New revision: 490805 URL: https://svnweb.freebsd.org/changeset/ports/490805 Log: MFH: r490804 www/mod_pagespeed: Fix build for openssl111 PR: 234447 Sponsored by: The FreeBSD Foundation Approved by: portmgr (bugfix blanket) Changes: _U branches/2019Q1/ branches/2019Q1/www/mod_pagespeed/Makefile branches/2019Q1/www/mod_pagespeed/files/patch-third__party_grpc_src_src_core_lib_security_credentials_jwt_jwt__verifier.c branches/2019Q1/www/mod_pagespeed/files/patch-third__party_serf_instaweb__ssl__buckets.c
Committed and MFH'd after test. Thanks for all helps and feedback on this.