* [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
@ 2019-06-04 21:18 Wang, Jian J
2019-06-05 0:22 ` [edk2-devel] " Liming Gao
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Wang, Jian J @ 2019-06-04 21:18 UTC (permalink / raw)
To: devel; +Cc: Dandan Bi, Xiaoyu Lu
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 <dandan.bi@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
---
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
--
2.17.1.windows.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
2019-06-04 21:18 [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure Wang, Jian J
@ 2019-06-05 0:22 ` Liming Gao
[not found] ` <15A525952F820008.28502@groups.io>
2019-06-05 11:00 ` Laszlo Ersek
2 siblings, 0 replies; 5+ messages in thread
From: Liming Gao @ 2019-06-05 0:22 UTC (permalink / raw)
To: devel@edk2.groups.io, Wang, Jian J; +Cc: Bi, Dandan, Lu, XiaoyuX
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Wang, Jian J
>Sent: Wednesday, June 05, 2019 5:19 AM
>To: devel@edk2.groups.io
>Cc: Bi, Dandan <dandan.bi@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>
>Subject: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
>
>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 <dandan.bi@intel.com>
>Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
>Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
>---
> 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
>--
>2.17.1.windows.2
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
[not found] ` <15A525952F820008.28502@groups.io>
@ 2019-06-05 8:23 ` Liming Gao
0 siblings, 0 replies; 5+ messages in thread
From: Liming Gao @ 2019-06-05 8:23 UTC (permalink / raw)
To: devel@edk2.groups.io, Gao, Liming, Wang, Jian J; +Cc: Bi, Dandan, Lu, XiaoyuX
Push @0a1b13fd4d2210e2c379ace4fd961fb80126b7e9
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Liming Gao
> Sent: Wednesday, June 5, 2019 8:23 AM
> To: devel@edk2.groups.io; Wang, Jian J <jian.j.wang@intel.com>
> Cc: Bi, Dandan <dandan.bi@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>
> Subject: Re: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
>
> Reviewed-by: Liming Gao <liming.gao@intel.com>
>
> >-----Original Message-----
> >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >Wang, Jian J
> >Sent: Wednesday, June 05, 2019 5:19 AM
> >To: devel@edk2.groups.io
> >Cc: Bi, Dandan <dandan.bi@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>
> >Subject: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
> >
> >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 <dandan.bi@intel.com>
> >Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> >Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> >---
> > 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
> >--
> >2.17.1.windows.2
> >
> >
> >
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
2019-06-04 21:18 [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure Wang, Jian J
2019-06-05 0:22 ` [edk2-devel] " Liming Gao
[not found] ` <15A525952F820008.28502@groups.io>
@ 2019-06-05 11:00 ` Laszlo Ersek
2019-06-05 14:25 ` Wang, Jian J
2 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2019-06-05 11:00 UTC (permalink / raw)
To: devel, jian.j.wang; +Cc: Dandan Bi, Xiaoyu Lu
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 <dandan.bi@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
2019-06-05 11:00 ` Laszlo Ersek
@ 2019-06-05 14:25 ` Wang, Jian J
0 siblings, 0 replies; 5+ messages in thread
From: Wang, Jian J @ 2019-06-05 14:25 UTC (permalink / raw)
To: devel@edk2.groups.io, lersek@redhat.com; +Cc: Bi, Dandan, Lu, XiaoyuX
Laszlo,
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> Sent: Wednesday, June 05, 2019 7:00 PM
> To: devel@edk2.groups.io; Wang, Jian J <jian.j.wang@intel.com>
> Cc: Bi, Dandan <dandan.bi@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>
> Subject: Re: [edk2-devel] [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure
>
> 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 <dandan.bi@intel.com>
> > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> > ---
> > 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".)
>
Agree. The fix is a bit rush. A BZ has been filed. Thanks for catching it.
https://bugzilla.tianocore.org/show_bug.cgi?id=1881
Regards,
Jian
> Thanks
> Laszlo
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-05 14:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-04 21:18 [PATCH] CryptoPkg/OpensslLib: fix VS2017 build failure Wang, Jian J
2019-06-05 0:22 ` [edk2-devel] " Liming Gao
[not found] ` <15A525952F820008.28502@groups.io>
2019-06-05 8:23 ` Liming Gao
2019-06-05 11:00 ` Laszlo Ersek
2019-06-05 14:25 ` Wang, Jian J
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox