Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#36035 - [xz] current PKGBUILD configure switches make check compilation fail
Attached to Project:
Arch Linux
Opened by Olivier Langlois (lano1106) - Friday, 05 July 2013, 15:02 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 02 November 2013, 22:15 GMT
Opened by Olivier Langlois (lano1106) - Friday, 05 July 2013, 15:02 GMT
Last edited by Pierre Schmitz (Pierre) - Saturday, 02 November 2013, 22:15 GMT
|
DetailsDescription:
lano1106@hpmini ~/dev/packages/xz/repos/core-i686/src/xz-5.0.5 $ make check Making check in src make[1]: Entering directory `/home/lano1106/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src' Making check in liblzma make[2]: Entering directory `/home/lano1106/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src/liblzma' Making check in api make[3]: Entering directory `/home/lano1106/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src/liblzma/api' make[3]: Nothing to be done for `check'. make[3]: Leaving directory `/home/lano1106/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src/liblzma/api' make[3]: Entering directory `/home/lano1106/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src/liblzma' /bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/liblzma/api -I../../src/liblzma/common -I../../src/liblzma/check -I../../src/liblzma/lz -I../../src/liblzma/rangecoder -I../../src/liblzma/lzma -I../../src/liblzma/delta -I../../src/liblzma/simple -I../../src/common -DTUKLIB_SYMBOL_PREFIX=lzma_ -D_FORTIFY_SOURCE=2 -pthread -fvisibility=hidden -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -Werror -march=native -O3 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT liblzma_la-sha256.lo -MD -MP -MF .deps/liblzma_la-sha256.Tpo -c -o liblzma_la-sha256.lo `test -f 'check/sha256.c' || echo './'`check/sha256.c libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/liblzma/api -I../../src/liblzma/common -I../../src/liblzma/check -I../../src/liblzma/lz -I../../src/liblzma/rangecoder -I../../src/liblzma/lzma -I../../src/liblzma/delta -I../../src/liblzma/simple -I../../src/common -DTUKLIB_SYMBOL_PREFIX=lzma_ -D_FORTIFY_SOURCE=2 -pthread -fvisibility=hidden -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -Werror -march=native -O3 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT liblzma_la-sha256.lo -MD -MP -MF .deps/liblzma_la-sha256.Tpo -c check/sha256.c -fPIC -DPIC -o .libs/liblzma_la-sha256.o check/sha256.c: In function `transform': check/sha256.c:85:11: error: `W[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] uint32_t W[16]; ^ check/sha256.c:85:11: error: `W[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[2]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[3]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[4]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[5]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[6]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[9]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[10]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[11]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[12]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[13]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[14]' may be used uninitialized in this function [-Werror=maybe-uninitialized] check/sha256.c:85:11: error: `W[15]' may be used uninitialized in this function [-Werror=maybe-uninitialized] cc1: all warnings being treated as errors make[3]: *** [liblzma_la-sha256.lo] Error 1 make[3]: Leaving directory `/home/lano1106/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src/liblzma' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/home/lano1106/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src/liblzma' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/home/lano1106/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src' make: *** [check-recursive] Error 1 To fix, just remove --enable-werror It doesn't change the resulting binary, it just indicates the compiler to not treat compiler warnings as errors. Additional info: * 5.0.5-1 Steps to reproduce: makepkg |
This task depends upon
Closed by Pierre Schmitz (Pierre)
Saturday, 02 November 2013, 22:15 GMT
Reason for closing: Upstream
Saturday, 02 November 2013, 22:15 GMT
Reason for closing: Upstream
This is an obscure problem.
I have tried various flags combination
Just: -O3 = ok
-march=native -O2 = error.
The weird aspect is that by looking the code, the compiler is wrong:
#define blk0(i) (W[i] = data[i])
#define blk2(i) (W[i & 15] += s1(W[(i - 2) & 15]) + W[(i - 7) & 15] \
+ s0(W[(i - 15) & 15]))
...
#define R(i) \
h(i) += S1(e(i)) + Ch(e(i), f(i), g(i)) + SHA256_K[i + j] \
+ (j ? blk2(i) : blk0(i)); \
...
// 64 operations, partially loop unrolled
for (unsigned int j = 0; j < 64; j += 16) {
R( 0); R( 1); R( 2); R( 3);
R( 4); R( 5); R( 6); R( 7);
R( 8); R( 9); R(10); R(11);
R(12); R(13); R(14); R(15);
}
so for j = 0, all W items will be initialized.
Would be curious to see if -march=native does this for all processors. Mine is:
lano1106@hpmini ~/dev/packages/xz/repos/core-i686/src/xz-5.0.5/src $ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU N455 @ 1.66GHz
Maybe we have stumbled on a gcc bug. I'm glad that Mr. Arch GCC has looked into this task!
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57832
// Avoid bogus warnings in transform().
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || __GNUC__ > 4
# pragma GCC diagnostic ignored "-Wuninitialized"
#endif
if you change that to
// Avoid bogus warnings in transform().
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || __GNUC__ > 4
# pragma GCC diagnostic ignored "-Wuninitialized"
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
it also address the problem.