Skip to contentSkip to conversation

swuashfs-tools: Enable on musl

PATCH In review Khem Raj 3 participants 6 messages Feb 14, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 swuashfs-tools: Enable on musl

Upstream has a patch [1] to fix musl builds, Prior to this it would not build on musl due to missing GNU extentions for fnmatch

[1] https://github.com/plougher/squashfs-tools/commit/4280e74de14070869787a9166242f9ce2dafd82e

---
 meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb | 3 ---
 1 file changed, 3 deletions(-)
meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +0 -3
index 4fd33f8048..9bcf026ce2 100644
@@ -12,9 +12,6 @@ SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
 
 S = "${WORKDIR}/git/squashfs-tools"
 
-# needs FNM_EXTMATCH
-COMPATIBLE_HOST_libc-musl = 'null'
-
 EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}"
 
 PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr reproducible"
Signature · 1 line
2.25.0
#1 lore raw
Quoted 5 lines · Khem Raj

Upstream has a patch [1] to fix musl builds, Prior to this it would not build on musl due to missing GNU extentions for fnmatch

[1] https://github.com/plougher/squashfs-tools/commit/4280e74de14070869787a9166242f9ce2dafd82e
...

I did already remove a similar bogus squashfs-tools change from OE, with similar FNM_EXTMATCH "fixes" in ifupdown and elfutils also resulting in the expected runtime misbehaviour.

I am not a fan of this musl way of fixing build failures by turning them into runtime breakages.

cu
Adrian

author
#2 lore raw
Quoted 5 lines · Adrian Bunk
Quoted 3 lines · Khem Raj

Upstream has a patch [1] to fix musl builds, Prior to this it would not build on musl due to missing GNU extentions for fnmatch

Quoted 7 lines
Quoted 2 lines

[1] https://github.com/plougher/squashfs-tools/commit/4280e74de14070869787a9166242f9ce2dafd82e
...

I did already remove a similar bogus squashfs-tools change from OE, with similar FNM_EXTMATCH "fixes" in ifupdown and elfutils also resulting in the expected runtime misbehaviour.

I think it would be better to use gnulib implementation for these packages you point out
and those patches will be upstream worthy and make them portable as well.
At least it is calling out bad elements.

Quoted 2 lines

I am not a fan of this musl way of fixing build failures by turning them into runtime breakages.

#3 lore raw
Quoted 9 lines · Khem Raj
Quoted 8 lines · Adrian Bunk
Quoted 5 lines · Khem Raj

Upstream has a patch [1] to fix musl builds, Prior to this it would not build on musl due to missing GNU extentions for fnmatch

[1] https://github.com/plougher/squashfs-tools/commit/4280e74de14070869787a9166242f9ce2dafd82e
...

Quoted 8 lines
Quoted 3 lines

I did already remove a similar bogus squashfs-tools change from OE, with similar FNM_EXTMATCH "fixes" in ifupdown and elfutils also resulting in the expected runtime misbehaviour.

I think it would be better to use gnulib implementation for these packages you point out
and those patches will be upstream worthy and make them portable as well.

Yes, this would be better since the resulting code would be working.

But looking at the gnulib sources someone made gl_FUNC_FNMATCH_GNU do the wrong thing by "guessing yes" when cross-compiling for musl...

Quoted 1 line

At least it is calling out bad elements.

The only bad element is code that builds but silently does the wrong thing. Everything else is visible for users early during product development and can be mitigated.

cu
Adrian

author
#5 lore raw
Quoted 4 lines · Robert P. J. Day

"swuashfs"?

I think I sent a v2

Quoted 1 line

rday