cracklib: Modify patch to compile with GCC 14
PATCH 1/1 cracklib: Modify patch to compile with GCC 14
GCC 14 implicitly turns a warning into a compiler error:
| ../../git/src/lib/packlib.c: In function ‘PWClose’:
| ../../git/src/lib/packlib.c:554:40: error: passing argument 1 of ‘HwmsHostToBigEndian’ from incompatible pointer type [-Wincompatible-pointer-types]
| 554 | HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32);
| | ~~~~~~~^~~~~
| | |
| | uint32_t * {aka unsigned int *}
| ../../git/src/lib/packlib.c:142:27: note: expected ‘char *’ but argument is of type ‘uint32_t *’ {aka ‘unsigned int *’}
| 142 | HwmsHostToBigEndian(char *pHwms, int nLen,int nBitType)
| | ~~~~~~^~~~~Add the cast to (char *) to silence it.
--- ...0001-packlib.c-support-dictionary-byte-order-dependent.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch +1 -1
@@ -303,7 +303,7 @@ index 9396e1d..d0bb181 100644 + PWDICT tmp_pwp; + + memcpy(&tmp_pwp, pwp, sizeof(PWDICT)); -+ HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); ++ HwmsHostToBigEndian((char *)tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); + fwrite(tmp_pwp.hwms, 1, sizeof(tmp_pwp.hwms), pwp->wfp); } }
Signature · 1 line
2.44.0
Thanks for fixing this, however I would also suggest to submit this upstream and see if this is acceptable
Quoted 45 lines · Zoltan Boszormenyi via lists.openembedded.org
GCC 14 implicitly turns a warning into a compiler error:
| ../../git/src/lib/packlib.c: In function ‘PWClose’: | ../../git/src/lib/packlib.c:554:40: error: passing argument 1 of ‘HwmsHostToBigEndian’ from incompatible pointer type [-Wincompatible-pointer-types] | 554 | HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); | | ~~~~~~~^~~~~ | | | | | uint32_t * {aka unsigned int *} | ../../git/src/lib/packlib.c:142:27: note: expected ‘char *’ but argument is of type ‘uint32_t *’ {aka ‘unsigned int *’} | 142 | HwmsHostToBigEndian(char *pHwms, int nLen,int nBitType) | | ~~~~~~^~~~~Add the cast to (char *) to silence it.
Signed-off-by Zoltán Böszörményi <[email protected]>--- ...0001-packlib.c-support-dictionary-byte-order-dependent.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch +1
-2@@ -303,7 +303,7 @@ index 9396e1d..d0bb181 100644 + PWDICT tmp_pwp; + + memcpy(&tmp_pwp, pwp, sizeof(PWDICT)); -+ HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); ++ HwmsHostToBigEndian((char *)tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); + fwrite(tmp_pwp.hwms, 1, sizeof(tmp_pwp.hwms), pwp->wfp); } } --2.44.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198734): https://lists.openembedded.org/g/openembedded-core/message/198734
Mute This Topic: https://lists.openembedded.org/mt/105797819/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 2 lines · Khem Raj via lists.openembedded.org
Thanks for fixing this, however I would also suggest to submit this upstream and see if this is acceptable
The patch this is changing one of our patches but I can't tell if the code being patched by the patch is "ours" or upstream.
Cheers,
Richard
Quoted 8 lines · Richard Purdie
Quoted 2 lines · Khem Raj via lists.openembedded.org
Thanks for fixing this, however I would also suggest to submit this upstream and see if this is acceptable
The patch this is changing one of our patches but I can't tell if the code being patched by the patch is "ours" or upstream.
its the behavior coming from our own patch so in that case perhaps no need to bother upstream. However, the patch itself is also submitted upstream which has some feedback to reimplement the logic, so perhaps for now we are ok to accept it locally.
Quoted 4 lines
Cheers,
Richard
2024. 04. 29. 20:08 keltezéssel, Khem Raj írta:
Quoted 4 lines
Quoted 2 lines · Richard Purdie
On Mon, 2024-04-29 at 08:03 -0700, Khem Raj via lists.openembedded.org wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Thanks for fixing this, however I would also suggest to submit this upstream and see if this is acceptable
The patch this is changing one of our patches but I can't tell if the code being patched by the patch is "ours" or upstream.
its the behavior coming from our own patch so in that case perhaps no need to bother upstream. However, the patch itself is also submitted upstream which has some feedback to reimplement the logic, so perhaps for now we are ok to accept it locally.
Thank you.
FYI, I have upgraded my laptop to Fedora 40 that has GCC 14. I tried building pieces of Yocto 4.3 and 5.0, and observed some other failures.
One of them was vala-native. Upgrading the vala recipe to 0.56.17 fixes the build error, but it also needs newer dependencies.
First gobject-introspection 1.80.x, which needs glib 2.80.0.
In turn, glib 2.80.0 wants to use gobject-introspection by default, which can be disabled. It is the current state of affairs, as older glib versions do not use gobject-introspection.
The other way is to introduce a glib-2.0-initial recipe (built with -Dintrospection=disabled) and add glib-2.0-initial as a build dependency to gobject-introspection, and add gobject-introspection to the glib-2.0 recipe.
What would be the recommended way if I wanted to post my GCC 14 build fix patches?
Thanks in advance,
Zoltán Böszörményi
A message that is not in the archive (sent off-list or not yet received): [email protected]
2024. 04. 30. 10:17 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
Quoted 29 lines
2024. 04. 29. 20:08 keltezéssel, Khem Raj írta:
Quoted 4 lines
Quoted 2 lines · Richard Purdie
On Mon, 2024-04-29 at 08:03 -0700, Khem Raj via lists.openembedded.org wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Thanks for fixing this, however I would also suggest to submit this upstream and see if this is acceptable
The patch this is changing one of our patches but I can't tell if the code being patched by the patch is "ours" or upstream.
its the behavior coming from our own patch so in that case perhaps no need to bother upstream. However, the patch itself is also submitted upstream which has some feedback to reimplement the logic, so perhaps for now we are ok to accept it locally.
Thank you.
FYI, I have upgraded my laptop to Fedora 40 that has GCC 14. I tried building pieces of Yocto 4.3 and 5.0, and observed some other failures.
One of them was vala-native. Upgrading the vala recipe to 0.56.17 fixes the build error, but it also needs newer dependencies.
First gobject-introspection 1.80.x, which needs glib 2.80.0.
In turn, glib 2.80.0 wants to use gobject-introspection by default, which can be disabled. It is the current state of affairs, as older glib versions do not use gobject-introspection.
Quoted 7 lines
The other way is to introduce a glib-2.0-initial recipe (built with -Dintrospection=disabled) and add glib-2.0-initial as a build dependency to gobject-introspection, and add gobject-introspection to the glib-2.0 recipe.
What would be the recommended way if I wanted to post my GCC 14 build fix patches?
Nevermind, I can see that master-next has this change already.
Quoted 13 lines
Thanks in advance,
Zoltán Böszörményi-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198754): https://lists.openembedded.org/g/openembedded-core/message/198754
Mute This Topic: https://lists.openembedded.org/mt/105797819/3617728
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-