* [Buildroot] [PATCH] package/libnss: fix build failure due to missing missing libnspr in link list
@ 2022-08-06 15:36 Giulio Benetti
2022-08-06 22:21 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Giulio Benetti @ 2022-08-06 15:36 UTC (permalink / raw)
To: buildroot; +Cc: Joseph Kogut, Giulio Benetti
FREEBL_NO_DEPEND is usually set to 1 and this means that:
```
build libfreebl3.so with no NSPR and libnssutil3.so dependencies by
default
```
But PR_SetError() and other PR_*() APIs are contained right in
NSPR(libnspr) that we already build and it's a libnss dependency, so let's
make libnss to link with libnspr by default by setting FREEBL_NO_DEPEND to
0.
Fixes:
http://autobuild.buildroot.net/results/c5b440bae5cd6dc6d5f1a632a6b5950b32d13f66/
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
package/libnss/libnss.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk
index 4283ef520f..bc878adc35 100644
--- a/package/libnss/libnss.mk
+++ b/package/libnss/libnss.mk
@@ -57,7 +57,8 @@ LIBNSS_BUILD_VARS = \
OS_ARCH="Linux" \
OS_RELEASE="2.6" \
OS_TEST=$(BR2_PACKAGE_LIBNSS_ARCH) \
- NSS_ENABLE_WERROR=0
+ NSS_ENABLE_WERROR=0 \
+ FREEBL_NO_DEPEND=0
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
# Disable Altivec if not supported
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/libnss: fix build failure due to missing missing libnspr in link list
2022-08-06 15:36 [Buildroot] [PATCH] package/libnss: fix build failure due to missing missing libnspr in link list Giulio Benetti
@ 2022-08-06 22:21 ` Thomas Petazzoni via buildroot
2022-08-08 23:34 ` Giulio Benetti
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-06 22:21 UTC (permalink / raw)
To: Giulio Benetti; +Cc: Joseph Kogut, buildroot
On Sat, 6 Aug 2022 17:36:51 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> FREEBL_NO_DEPEND is usually set to 1 and this means that:
> ```
> build libfreebl3.so with no NSPR and libnssutil3.so dependencies by
> default
> ```
> But PR_SetError() and other PR_*() APIs are contained right in
> NSPR(libnspr) that we already build and it's a libnss dependency, so let's
> make libnss to link with libnspr by default by setting FREEBL_NO_DEPEND to
> 0.
>
> Fixes:
> http://autobuild.buildroot.net/results/c5b440bae5cd6dc6d5f1a632a6b5950b32d13f66/
>
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Thanks for the debugging, but I have to say I am not convinced by the
explanation. Why is FREEBL_NO_DEPEND=1 the default if it doesn't work?
Why was it working before, and what broke it?
Setting or not setting FREEBL_NO_DEPEND has impact in a lot of parts of
the libnss code, I don't think we should do this lightly.
Could you research more when this broke (i.e which version bump in
Buildroot), and then which commit in NSS causes this breakage? I don't
want to blindly set this obscure variable.
Has this issue been reported upstream?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/libnss: fix build failure due to missing missing libnspr in link list
2022-08-06 22:21 ` Thomas Petazzoni via buildroot
@ 2022-08-08 23:34 ` Giulio Benetti
0 siblings, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2022-08-08 23:34 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Joseph Kogut, buildroot
Hi Thomas,
On 07/08/22 00:21, Thomas Petazzoni via buildroot wrote:
> Subject:
> Re: [Buildroot] [PATCH] package/libnss: fix build failure due to missing
> missing libnspr in link list
> From:
> Thomas Petazzoni via buildroot <buildroot@buildroot.org>
> Date:
> 07/08/22, 00:21
>
> To:
> Giulio Benetti <giulio.benetti@benettiengineering.com>
> CC:
> Joseph Kogut <joseph.kogut@gmail.com>, buildroot@buildroot.org
>
>
> On Sat, 6 Aug 2022 17:36:51 +0200
> Giulio Benetti<giulio.benetti@benettiengineering.com> wrote:
>
>> FREEBL_NO_DEPEND is usually set to 1 and this means that:
>> ```
>> build libfreebl3.so with no NSPR and libnssutil3.so dependencies by
>> default
>> ```
>> But PR_SetError() and other PR_*() APIs are contained right in
>> NSPR(libnspr) that we already build and it's a libnss dependency, so let's
>> make libnss to link with libnspr by default by setting FREEBL_NO_DEPEND to
>> 0.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/c5b440bae5cd6dc6d5f1a632a6b5950b32d13f66/
>>
>> Signed-off-by: Giulio Benetti<giulio.benetti@benettiengineering.com>
> Thanks for the debugging, but I have to say I am not convinced by the
> explanation. Why is FREEBL_NO_DEPEND=1 the default if it doesn't work?
> Why was it working before, and what broke it?
Yes, you're right. I'm going back to previous versions and I've found
this bug affects back to libnss 3.72 and still have to try older ones.
This is to find if it is something libnss related or something else in
the environemnt.
This bug didn't show up always with every version bump.
> Setting or not setting FREEBL_NO_DEPEND has impact in a lot of parts of
> the libnss code, I don't think we should do this lightly.
Yes, totally. I've realized only now that every call to PR_*() and
PORT_*() API would end up to abort(). So I've misinterpreted the meaning
of FREEBL_NO_DEPEND. It seemed like it implemented part of libnspr
locally but that's not true at all.
> Could you research more when this broke (i.e which version bump in
> Buildroot), and then which commit in NSS causes this breakage?
I'm doing like that and I'm back to 3.72, I'll keep rolling back.
Since Autobuilders didn't show up the problem before 3.77 I suspect
that the cause can be not due to libnss itself, but external, or more
likely libnss doesn't handle something external that is "too new".
So I keep on digging. It's a pity they have chosen to go for gyp
instead of other build system, this complicates things a lot since
actual Makefile is not linear at all. Anyway I don't see alternatives.
> I don't
> want to blindly set this obscure variable.
Yes
> Has this issue been reported upstream?
Still not. But usually I fix the problem and only later I report the
issue(Bug - xxxxx) with the patch fixing it.
Best regards
--
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-08 23:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-06 15:36 [Buildroot] [PATCH] package/libnss: fix build failure due to missing missing libnspr in link list Giulio Benetti
2022-08-06 22:21 ` Thomas Petazzoni via buildroot
2022-08-08 23:34 ` Giulio Benetti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox