* [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
@ 2021-02-23 16:27 Andrei Gherzan
2021-02-23 17:12 ` [oe] " Martin Jansa
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Gherzan @ 2021-02-23 16:27 UTC (permalink / raw)
To: openembedded-devel; +Cc: Khem Raj
From: Khem Raj <raj.khem@gmail.com>
We are seeing warnigs with gcc-10 even on target builds e.g.
| In file included from nsinstall.c:20:
| /usr/include/unistd.h:520:14: note: in a call to function ‘getcwd’ declared with attribute ‘write_only (1, 2)’
| 520 | extern char *getcwd (char *__buf, size_t __size) __THROW __wur
| | ^~~~~~
| nsinstall.c:70:16: error: argument 1 is null but the corresponding size argument 2 value is 4096 [-Werror=nonnull]
| 70 | #define GETCWD getcwd
| | ^
| nsinstall.c:246:13: note: in expansion of macro ‘GETCWD’
| 246 | todir = GETCWD(0, PATH_MAX);
| | ^~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta-oe/recipes-support/nss/nss_3.51.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-oe/recipes-support/nss/nss_3.51.1.bb b/meta-oe/recipes-support/nss/nss_3.51.1.bb
index 3e3c3a3fd..348c2c13f 100644
--- a/meta-oe/recipes-support/nss/nss_3.51.1.bb
+++ b/meta-oe/recipes-support/nss/nss_3.51.1.bb
@@ -62,7 +62,6 @@ do_configure_prepend_libc-musl () {
do_compile_prepend_class-native() {
export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr
export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
- export NSS_ENABLE_WERROR=0
}
do_compile_prepend_class-nativesdk() {
@@ -76,6 +75,7 @@ do_compile_prepend_class-native() {
do_compile() {
export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr
+ export NSS_ENABLE_WERROR=0
export CROSS_COMPILE=1
export NATIVE_CC="${BUILD_CC}"
--
2.30.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 16:27 [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types Andrei Gherzan
@ 2021-02-23 17:12 ` Martin Jansa
2021-02-23 17:15 ` Khem Raj
0 siblings, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2021-02-23 17:12 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: openembedded-devel, Khem Raj
[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]
On Tue, Feb 23, 2021 at 04:27:05PM +0000, Andrei Gherzan wrote:
> From: Khem Raj <raj.khem@gmail.com>
>
> We are seeing warnigs with gcc-10 even on target builds e.g.
Do you use gcc-10 in dunfell builds?
dunfell has 9.3.0 gcc, so either you're using gcc-10 through some
backports or the warning is reproducible also with gcc-9, but I'm not
seeing nss failures in my dunfell builds.
Cheers,
>
> | In file included from nsinstall.c:20:
> | /usr/include/unistd.h:520:14: note: in a call to function ‘getcwd’ declared with attribute ‘write_only (1, 2)’
> | 520 | extern char *getcwd (char *__buf, size_t __size) __THROW __wur
> | | ^~~~~~
> | nsinstall.c:70:16: error: argument 1 is null but the corresponding size argument 2 value is 4096 [-Werror=nonnull]
> | 70 | #define GETCWD getcwd
> | | ^
> | nsinstall.c:246:13: note: in expansion of macro ‘GETCWD’
> | 246 | todir = GETCWD(0, PATH_MAX);
> | | ^~~~~~
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta-oe/recipes-support/nss/nss_3.51.1.bb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-support/nss/nss_3.51.1.bb b/meta-oe/recipes-support/nss/nss_3.51.1.bb
> index 3e3c3a3fd..348c2c13f 100644
> --- a/meta-oe/recipes-support/nss/nss_3.51.1.bb
> +++ b/meta-oe/recipes-support/nss/nss_3.51.1.bb
> @@ -62,7 +62,6 @@ do_configure_prepend_libc-musl () {
> do_compile_prepend_class-native() {
> export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr
> export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
> - export NSS_ENABLE_WERROR=0
> }
>
> do_compile_prepend_class-nativesdk() {
> @@ -76,6 +75,7 @@ do_compile_prepend_class-native() {
>
> do_compile() {
> export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr
> + export NSS_ENABLE_WERROR=0
>
> export CROSS_COMPILE=1
> export NATIVE_CC="${BUILD_CC}"
> --
> 2.30.1
>
>
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 201 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 17:12 ` [oe] " Martin Jansa
@ 2021-02-23 17:15 ` Khem Raj
2021-02-23 17:19 ` Andrei Gherzan
0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2021-02-23 17:15 UTC (permalink / raw)
To: Martin Jansa; +Cc: Andrei Gherzan, openembeded-devel
On Tue, Feb 23, 2021 at 9:12 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> On Tue, Feb 23, 2021 at 04:27:05PM +0000, Andrei Gherzan wrote:
> > From: Khem Raj <raj.khem@gmail.com>
> >
> > We are seeing warnigs with gcc-10 even on target builds e.g.
>
> Do you use gcc-10 in dunfell builds?
>
> dunfell has 9.3.0 gcc, so either you're using gcc-10 through some
> backports or the warning is reproducible also with gcc-9, but I'm not
> seeing nss failures in my dunfell builds.
I think its the native one he is running into issues. Perhaps he has
newer build host OS which has gcc 10
>
> Cheers,
>
> >
> > | In file included from nsinstall.c:20:
> > | /usr/include/unistd.h:520:14: note: in a call to function ‘getcwd’ declared with attribute ‘write_only (1, 2)’
> > | 520 | extern char *getcwd (char *__buf, size_t __size) __THROW __wur
> > | | ^~~~~~
> > | nsinstall.c:70:16: error: argument 1 is null but the corresponding size argument 2 value is 4096 [-Werror=nonnull]
> > | 70 | #define GETCWD getcwd
> > | | ^
> > | nsinstall.c:246:13: note: in expansion of macro ‘GETCWD’
> > | 246 | todir = GETCWD(0, PATH_MAX);
> > | | ^~~~~~
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> > meta-oe/recipes-support/nss/nss_3.51.1.bb | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta-oe/recipes-support/nss/nss_3.51.1.bb b/meta-oe/recipes-support/nss/nss_3.51.1.bb
> > index 3e3c3a3fd..348c2c13f 100644
> > --- a/meta-oe/recipes-support/nss/nss_3.51.1.bb
> > +++ b/meta-oe/recipes-support/nss/nss_3.51.1.bb
> > @@ -62,7 +62,6 @@ do_configure_prepend_libc-musl () {
> > do_compile_prepend_class-native() {
> > export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr
> > export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
> > - export NSS_ENABLE_WERROR=0
> > }
> >
> > do_compile_prepend_class-nativesdk() {
> > @@ -76,6 +75,7 @@ do_compile_prepend_class-native() {
> >
> > do_compile() {
> > export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr
> > + export NSS_ENABLE_WERROR=0
> >
> > export CROSS_COMPILE=1
> > export NATIVE_CC="${BUILD_CC}"
> > --
> > 2.30.1
> >
>
> >
> >
> >
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 17:15 ` Khem Raj
@ 2021-02-23 17:19 ` Andrei Gherzan
2021-02-23 17:30 ` Martin Jansa
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Gherzan @ 2021-02-23 17:19 UTC (permalink / raw)
To: Khem Raj, Martin Jansa; +Cc: openembedded
On Tue, 23 Feb 2021, at 17:15, Khem Raj wrote:
> On Tue, Feb 23, 2021 at 9:12 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> >
> > On Tue, Feb 23, 2021 at 04:27:05PM +0000, Andrei Gherzan wrote:
> > > From: Khem Raj <raj.khem@gmail.com>
> > >
> > > We are seeing warnigs with gcc-10 even on target builds e.g.
> >
> > Do you use gcc-10 in dunfell builds?
> >
> > dunfell has 9.3.0 gcc, so either you're using gcc-10 through some
> > backports or the warning is reproducible also with gcc-9, but I'm not
> > seeing nss failures in my dunfell builds.
>
> I think its the native one he is running into issues. Perhaps he has
> newer build host OS which has gcc 10
That is indeed the case. I'm running 10.2.0 on my host as of now.
Andrei
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 17:19 ` Andrei Gherzan
@ 2021-02-23 17:30 ` Martin Jansa
2021-02-23 17:47 ` Andrei Gherzan
0 siblings, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2021-02-23 17:30 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: Khem Raj, openembedded
[-- Attachment #1: Type: text/plain, Size: 946 bytes --]
On Tue, Feb 23, 2021 at 05:19:16PM +0000, Andrei Gherzan wrote:
> On Tue, 23 Feb 2021, at 17:15, Khem Raj wrote:
> > On Tue, Feb 23, 2021 at 9:12 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> > >
> > > On Tue, Feb 23, 2021 at 04:27:05PM +0000, Andrei Gherzan wrote:
> > > > From: Khem Raj <raj.khem@gmail.com>
> > > >
> > > > We are seeing warnigs with gcc-10 even on target builds e.g.
> > >
> > > Do you use gcc-10 in dunfell builds?
> > >
> > > dunfell has 9.3.0 gcc, so either you're using gcc-10 through some
> > > backports or the warning is reproducible also with gcc-9, but I'm not
> > > seeing nss failures in my dunfell builds.
> >
> > I think its the native one he is running into issues. Perhaps he has
> > newer build host OS which has gcc 10
>
> That is indeed the case. I'm running 10.2.0 on my host as of now.
_on your host_, but why is it needed for target builds which should use
gcc-cross-* 9.3.0?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 201 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 17:30 ` Martin Jansa
@ 2021-02-23 17:47 ` Andrei Gherzan
2021-02-23 21:30 ` Andrei Gherzan
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Gherzan @ 2021-02-23 17:47 UTC (permalink / raw)
To: Martin Jansa; +Cc: Khem Raj, openembedded
On Tue, 23 Feb 2021, at 17:30, Martin Jansa wrote:
> On Tue, Feb 23, 2021 at 05:19:16PM +0000, Andrei Gherzan wrote:
> > On Tue, 23 Feb 2021, at 17:15, Khem Raj wrote:
> > > On Tue, Feb 23, 2021 at 9:12 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> > > >
> > > > On Tue, Feb 23, 2021 at 04:27:05PM +0000, Andrei Gherzan wrote:
> > > > > From: Khem Raj <raj.khem@gmail.com>
> > > > >
> > > > > We are seeing warnigs with gcc-10 even on target builds e.g.
> > > >
> > > > Do you use gcc-10 in dunfell builds?
> > > >
> > > > dunfell has 9.3.0 gcc, so either you're using gcc-10 through some
> > > > backports or the warning is reproducible also with gcc-9, but I'm not
> > > > seeing nss failures in my dunfell builds.
> > >
> > > I think its the native one he is running into issues. Perhaps he has
> > > newer build host OS which has gcc 10
> >
> > That is indeed the case. I'm running 10.2.0 on my host as of now.
>
> _on your host_, but why is it needed for target builds which should use
> gcc-cross-* 9.3.0?
Good point. Let me take a deeper look into it and come back to you.
Andrei
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 17:47 ` Andrei Gherzan
@ 2021-02-23 21:30 ` Andrei Gherzan
2021-02-23 21:37 ` Martin Jansa
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Gherzan @ 2021-02-23 21:30 UTC (permalink / raw)
To: Martin Jansa; +Cc: Khem Raj, openembedded
On Tue, 23 Feb 2021, at 17:47, Andrei Gherzan wrote:
> On Tue, 23 Feb 2021, at 17:30, Martin Jansa wrote:
> > On Tue, Feb 23, 2021 at 05:19:16PM +0000, Andrei Gherzan wrote:
> > > On Tue, 23 Feb 2021, at 17:15, Khem Raj wrote:
> > > > On Tue, Feb 23, 2021 at 9:12 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> > > > >
> > > > > On Tue, Feb 23, 2021 at 04:27:05PM +0000, Andrei Gherzan wrote:
> > > > > > From: Khem Raj <raj.khem@gmail.com>
> > > > > >
> > > > > > We are seeing warnigs with gcc-10 even on target builds e.g.
> > > > >
> > > > > Do you use gcc-10 in dunfell builds?
> > > > >
> > > > > dunfell has 9.3.0 gcc, so either you're using gcc-10 through some
> > > > > backports or the warning is reproducible also with gcc-9, but I'm not
> > > > > seeing nss failures in my dunfell builds.
> > > >
> > > > I think its the native one he is running into issues. Perhaps he has
> > > > newer build host OS which has gcc 10
> > >
> > > That is indeed the case. I'm running 10.2.0 on my host as of now.
> >
> > _on your host_, but why is it needed for target builds which should use
> > gcc-cross-* 9.3.0?
>
> Good point. Let me take a deeper look into it and come back to you.
I have taken a look into this and I think the conclusion is that your builds are not running on hosts with gcc-10+. The target build compiles a native tool: check nss/coreconf/nsinstall. This is why, as part of the recipe, we are passing the NATIVE_CC (as BUILD_CC) to get this pointing to the host's gcc. The Makefile in the path above uses it for compiling nsinstall.
```
ifdef NATIVE_CC
CC=$(NATIVE_CC)
endif
```
So this patch remains relevant for builds where this patch is not applied (for example dunfell) and on which the host provides gcc 10+.
--
Andrei
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 21:30 ` Andrei Gherzan
@ 2021-02-23 21:37 ` Martin Jansa
2021-02-23 21:39 ` Andrei Gherzan
0 siblings, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2021-02-23 21:37 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: Khem Raj, openembedded
[-- Attachment #1: Type: text/plain, Size: 2178 bytes --]
OK, thanks for looking into that, I was assuming that native nsinstall is
provided by nss-native dependency we have and wasn't aware that it's built
for host as part of target build as well.
+1
On Tue, Feb 23, 2021 at 10:31 PM Andrei Gherzan <andrei@gherzan.com> wrote:
> On Tue, 23 Feb 2021, at 17:47, Andrei Gherzan wrote:
> > On Tue, 23 Feb 2021, at 17:30, Martin Jansa wrote:
> > > On Tue, Feb 23, 2021 at 05:19:16PM +0000, Andrei Gherzan wrote:
> > > > On Tue, 23 Feb 2021, at 17:15, Khem Raj wrote:
> > > > > On Tue, Feb 23, 2021 at 9:12 AM Martin Jansa <
> martin.jansa@gmail.com> wrote:
> > > > > >
> > > > > > On Tue, Feb 23, 2021 at 04:27:05PM +0000, Andrei Gherzan wrote:
> > > > > > > From: Khem Raj <raj.khem@gmail.com>
> > > > > > >
> > > > > > > We are seeing warnigs with gcc-10 even on target builds e.g.
> > > > > >
> > > > > > Do you use gcc-10 in dunfell builds?
> > > > > >
> > > > > > dunfell has 9.3.0 gcc, so either you're using gcc-10 through some
> > > > > > backports or the warning is reproducible also with gcc-9, but
> I'm not
> > > > > > seeing nss failures in my dunfell builds.
> > > > >
> > > > > I think its the native one he is running into issues. Perhaps he
> has
> > > > > newer build host OS which has gcc 10
> > > >
> > > > That is indeed the case. I'm running 10.2.0 on my host as of now.
> > >
> > > _on your host_, but why is it needed for target builds which should use
> > > gcc-cross-* 9.3.0?
> >
> > Good point. Let me take a deeper look into it and come back to you.
>
> I have taken a look into this and I think the conclusion is that your
> builds are not running on hosts with gcc-10+. The target build compiles a
> native tool: check nss/coreconf/nsinstall. This is why, as part of the
> recipe, we are passing the NATIVE_CC (as BUILD_CC) to get this pointing to
> the host's gcc. The Makefile in the path above uses it for compiling
> nsinstall.
>
> ```
> ifdef NATIVE_CC
> CC=$(NATIVE_CC)
> endif
> ```
>
> So this patch remains relevant for builds where this patch is not applied
> (for example dunfell) and on which the host provides gcc 10+.
>
> --
> Andrei
>
[-- Attachment #2: Type: text/html, Size: 2966 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 21:37 ` Martin Jansa
@ 2021-02-23 21:39 ` Andrei Gherzan
2021-02-23 22:28 ` Andrei Gherzan
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Gherzan @ 2021-02-23 21:39 UTC (permalink / raw)
To: Martin Jansa; +Cc: Khem Raj, openembedded
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
On Tue, 23 Feb 2021, at 21:37, Martin Jansa wrote:
> OK, thanks for looking into that, I was assuming that native nsinstall is provided by nss-native dependency we have and wasn't aware that it's built for host as part of target build as well.
I should have known this before sending the patch. As a self-inflicted punishment, I'll push a proper fix as well but please go with this for now.
Cheers,
Andrei
[-- Attachment #2: Type: text/html, Size: 717 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [oe] [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types
2021-02-23 21:39 ` Andrei Gherzan
@ 2021-02-23 22:28 ` Andrei Gherzan
0 siblings, 0 replies; 10+ messages in thread
From: Andrei Gherzan @ 2021-02-23 22:28 UTC (permalink / raw)
To: Martin Jansa; +Cc: Khem Raj, openembedded
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
On Tue, 23 Feb 2021, at 21:39, Andrei Gherzan wrote:
> On Tue, 23 Feb 2021, at 21:37, Martin Jansa wrote:
>> OK, thanks for looking into that, I was assuming that native nsinstall is provided by nss-native dependency we have and wasn't aware that it's built for host as part of target build as well.
>
> I should have known this before sending the patch. As a self-inflicted punishment, I'll push a proper fix as well but please go with this for now.
I've pushed the fix for both master and dunfell. master has a v2 because that was initially the dunfell one but without the subject tag (missed it initially).
master - https://lists.openembedded.org/g/openembedded-devel/message/89697
dunfell - https://lists.openembedded.org/g/openembedded-devel/message/89698
--
Andrei
[-- Attachment #2: Type: text/html, Size: 1754 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-02-23 22:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 16:27 [meta-oe][dunfell][PATCH] nss: Disable Werror across all recipe types Andrei Gherzan
2021-02-23 17:12 ` [oe] " Martin Jansa
2021-02-23 17:15 ` Khem Raj
2021-02-23 17:19 ` Andrei Gherzan
2021-02-23 17:30 ` Martin Jansa
2021-02-23 17:47 ` Andrei Gherzan
2021-02-23 21:30 ` Andrei Gherzan
2021-02-23 21:37 ` Martin Jansa
2021-02-23 21:39 ` Andrei Gherzan
2021-02-23 22:28 ` Andrei Gherzan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.