Skip to contentSkip to conversation

package/xfsprogs: disable crc32selftest

PATCH New Yann E. MORIN 2 participants 2 messages Dec 7, 2015 – Dec 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/xfsprogs: disable crc32selftest

xfsprogs generates a crc32 table, and wants to test it. So it builds a native crc32selftest binary. So far, so good; except the host may not have the required headers (uuid/uuid.h), and probably libs (like libuuid).

And anyway, testing the table on the host is flawed, as it does not mean it would be correct on the target (due to differences in bitness, endianness, alignment...).

So we just disable the crc32selftest for Buildroot.

Fixes:

    http://autobuild.buildroot.org/results/5d0/5d0ed24b4d368fed100bc3c4959520ebaa48e693/
    http://autobuild.buildroot.org/results/aef/aef223ee2646599eaab7c82f63ff5f19569d69a5/
    http://autobuild.buildroot.org/results/fb6/fb6679f3b1473169702c303ee5060abe7559b0b3/
    ....
Cc Vicente Olivert Riera <[email protected]>
---
 package/xfsprogs/0002-no-crc32-checks.patch | 32 +++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/xfsprogs/0002-no-crc32-checks.patch
package/xfsprogs/0002-no-crc32-checks.patch new file +32 -0
new file mode 100644
index 0000000..2cf6634
@@ -0,0 +1,32 @@
+libxfs: do not try to run the crc32selftest
+
+Even though the crc32selftest is natively compiled (because it is to be
+executed), it fails in cross-compilation as the host may lack the
+required headers, like uuid/uuid.h (e.g. in a minimal environment).
+
+Moreover, running the crc32selftest natively is completely wrong,
+because it passing on the host does not mean it would still pass n the
+target (because endianness or bitness or alignment differences).
+
+So, just disable running the crc32selftest altogether.
+
+Note that there's a remaining bug-in-hiding, because the crc32 table
+generator is natively built, but with the target CLFAGS.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff -durN xfsprogs-4.3.0.orig/libxfs/Makefile xfsprogs-4.3.0/libxfs/Makefile
+--- xfsprogs-4.3.0.orig/libxfs/Makefile	2015-09-22 03:42:41.000000000 +0200
++++ xfsprogs-4.3.0/libxfs/Makefile	2015-12-07 18:45:27.190082913 +0100
+@@ -105,9 +105,9 @@
+ # don't try linking xfs_repair with a debug libxfs.
+ DEBUG = -DNDEBUG
+ 
+-LDIRT = gen_crc32table crc32table.h crc32selftest
++LDIRT = gen_crc32table crc32table.h
+ 
+-default: crc32selftest ltdepend $(LTLIBRARY)
++default: ltdepend $(LTLIBRARY)
+ 
+ crc32table.h: gen_crc32table.c
+ 	@echo "    [CC]     gen_crc32table"
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 package/xfsprogs: disable crc32selftest

Quoted 36 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

xfsprogs generates a crc32 table, and wants to test it. So it builds a native crc32selftest binary. So far, so good; except the host may not have the required headers (uuid/uuid.h), and probably libs (like libuuid).

And anyway, testing the table on the host is flawed, as it does not mean it would be correct on the target (due to differences in bitness, endianness, alignment...).

So we just disable the crc32selftest for Buildroot.

Fixes:

    http://autobuild.buildroot.org/results/5d0/5d0ed24b4d368fed100bc3c4959520ebaa48e693/
    http://autobuild.buildroot.org/results/aef/aef223ee2646599eaab7c82f63ff5f19569d69a5/
    http://autobuild.buildroot.org/results/fb6/fb6679f3b1473169702c303ee5060abe7559b0b3/
    ....
Cc Vicente Olivert Riera <[email protected]>
---
 package/xfsprogs/0002-no-crc32-checks.patch | 32 +++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/xfsprogs/0002-no-crc32-checks.patch
package/xfsprogs/0002-no-crc32-checks.patch new file +4 -0
new file mode 100644
index 0000000..2cf6634
@@ -0,0 +1,32 @@
+libxfs: do not try to run the crc32selftest
+
+Even though the crc32selftest is natively compiled (because it is to be
+executed), it fails in cross-compilation as the host may lack the

package/xfsprogs/0002-no-crc32-checks.patch line 14

Quoted 10 lines
package/xfsprogs/0002-no-crc32-checks.patch new file +10 -0
+required headers, like uuid/uuid.h (e.g. in a minimal environment).
+
+Moreover, running the crc32selftest natively is completely wrong,
+because it passing on the host does not mean it would still pass n the
+target (because endianness or bitness or alignment differences).
+
+So, just disable running the crc32selftest altogether.
+
+Note that there's a remaining bug-in-hiding, because the crc32 table
+generator is natively built, but with the target CLFAGS.

s/CLFAGS/CFLAGS/

Committed with that fixed, thanks.

Signature · 1 line
Bye, Peter Korsgaard