Skip to contentSkip to conversation

package/pax-utils: needs wchar

PATCH New Fabrice Fontaine 2 participants 3 messages Oct 31, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pax-utils: needs wchar

pax-utils uses asprintf and so needs wchar since version 1.2.4 and
https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=9c0ec154d782795daa3b7d2ae273bbda2b36ae83

Fixes:
- http://autobuild.buildroot.org/results/613840edba8ea161bb900f3b56d8d3605961c78f

---
 package/pax-utils/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/pax-utils/Config.in +4 -0
index 58100e482a..ebcca98500 100644
@@ -1,7 +1,11 @@
 config BR2_PACKAGE_PAX_UTILS
 	bool "pax-utils"
+	depends on BR2_USE_WCHAR
 	help
 	  ELF related utils for ELF 32/64 binaries that can check files
 	  for security relevant properties.
 
 	  http://www.gentoo.org/proj/en/hardened/pax-utils.xml
+
+comment "pax-utils needs a toolchain w/ wchar"
+	depends on !BR2_USE_WCHAR
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 package/pax-utils: needs wchar

Quoted 2 lines · On Sat, 31 Oct 2020 16:08:36 +0100 Fabrice Fontaine…

pax-utils uses asprintf and so needs wchar since version 1.2.4 and
https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=9c0ec154d782795daa3b7d2ae273bbda2b36ae83

In fact, it seems like the build problem comes from gnulib, which is bundled in pax-utils. Usage of wctomb() was recently added in gnulib as of commit 5cdec0ff5ecf34474d90d8b57f50a148449cda0c. And it seems like there is code to not use wctomb() when wchar support is not available, but that logic doesn't seem to work.

I don't really care about pax-utils being not available with wchar disabled, but since gnulib is also used in lots of other projects, I'm fearing that we might see this issue elsewhere.

Could you check if the pax-utils copy of gnulib lib/vasnprintf.c includes commit 5cdec0ff5ecf34474d90d8b57f50a148449cda0c and report a bug to upstream gnulib ?

In the mean time, I have applied your patch, with an extended commit log.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/pax-utils: needs wchar

Hi Thomas,

Le sam. 31 oct. 2020 ? 21:42, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 13 lines
Quoted 2 lines · On Sat, 31 Oct 2020 16:08:36 +0100 Fabrice Fontaine…

pax-utils uses asprintf and so needs wchar since version 1.2.4 and
https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=9c0ec154d782795daa3b7d2ae273bbda2b36ae83

In fact, it seems like the build problem comes from gnulib, which is bundled in pax-utils. Usage of wctomb() was recently added in gnulib as of commit 5cdec0ff5ecf34474d90d8b57f50a148449cda0c. And it seems like there is code to not use wctomb() when wchar support is not available, but that logic doesn't seem to work.

Quoted 7 lines

I don't really care about pax-utils being not available with wchar disabled, but since gnulib is also used in lots of other projects, I'm fearing that we might see this issue elsewhere.

Could you check if the pax-utils copy of gnulib lib/vasnprintf.c includes commit 5cdec0ff5ecf34474d90d8b57f50a148449cda0c and report a bug to upstream gnulib ?

pax-utils copy of gnulib does not include commit 5cdec0ff5ecf34474d90d8b57f50a148449cda0c (there is no ENABLE_WCHAR_FALLBACK or wctomb_fallback).
So we should be able to drop wchar dependency as soon as pax-utils refresh gnulib.

Quoted 11 lines

In the mean time, I have applied your patch, with an extended commit log.

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice