From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Wed, 05 Jun 2019 04:00:36 -0700 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2878E882EF; Wed, 5 Jun 2019 11:00:23 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-4.ams2.redhat.com [10.36.117.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC4725D71A; Wed, 5 Jun 2019 11:00:20 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure To: devel@edk2.groups.io, jian.j.wang@intel.com Cc: Dandan Bi , Xiaoyu Lu References: <20190604211844.4424-1-jian.j.wang@intel.com> From: "Laszlo Ersek" Message-ID: <0c1baf42-58c8-e5fe-ed38-8c4728337944@redhat.com> Date: Wed, 5 Jun 2019 13:00:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190604211844.4424-1-jian.j.wang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 05 Jun 2019 11:00:28 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Jian, On 06/04/19 23:18, Wang, Jian J wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1878 > > This issue is specific to VS2017 which tries to resolve symbol referenced > by a symbol not really referenced eventually. > > ossl_init_load_crypto_strings > -> err_load_crypto_strings_int (not really referenced) > -> ERR_load_OSSL_STORE_strings > > Because OPENSSL_NO_ERR and OPENSSL_NO_AUTOERRINIT are not defined by > default, err_load_crypto_strings_int() will not be actually referenced > by ossl_init_load_crypto_strings(). > > Since err_load_crypto_strings_int() is not actually referenced at all, > the fix can be done simply by removing crypto/err/err_all.c from build. > > Cc: Dandan Bi > Cc: Xiaoyu Lu > Signed-off-by: Jian J Wang > --- > CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 - > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 - > 2 files changed, 2 deletions(-) > > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > index 378fa6588e..5a2424fc16 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > @@ -218,7 +218,6 @@ > $(OPENSSL_PATH)/crypto/dso/dso_win32.c > $(OPENSSL_PATH)/crypto/ebcdic.c > $(OPENSSL_PATH)/crypto/err/err.c > - $(OPENSSL_PATH)/crypto/err/err_all.c > $(OPENSSL_PATH)/crypto/err/err_prn.c > $(OPENSSL_PATH)/crypto/evp/bio_b64.c > $(OPENSSL_PATH)/crypto/evp/bio_enc.c > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > index 24d3d96459..588da4c040 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > @@ -218,7 +218,6 @@ > $(OPENSSL_PATH)/crypto/dso/dso_win32.c > $(OPENSSL_PATH)/crypto/ebcdic.c > $(OPENSSL_PATH)/crypto/err/err.c > - $(OPENSSL_PATH)/crypto/err/err_all.c > $(OPENSSL_PATH)/crypto/err/err_prn.c > $(OPENSSL_PATH)/crypto/evp/bio_b64.c > $(OPENSSL_PATH)/crypto/evp/bio_enc.c > after the edk2-stable201905 tag, we might want to update "CryptoPkg/Library/OpensslLib/process_files.pl" as well, to exclude this file. In order to fix the build issue for the stable tag, this patch is acceptable (I see it's been pushed already, and that's fine); but in the longer term, we should not manually update the section that's marked as "Autogenerated files list starts here". If you agree, can you please file a TianoCore BZ about this? (I.e. special handling for "err_all.c" in "process_files.pl".) Thanks Laszlo