Hi Everyone,
I'm building Nettle 3.5.1 on an old PowerMac G5.
gcc -I. -I/usr/local/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -fPIC -pthread -ggdb3 -Wno-pointer-sign -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT xts-aes128.o -MD -MP -MF xts-aes128.o.d -c xts-aes128.c \ && true xts.c: In function 'xts_shift': xts.c:59: warning: integer constant is too large for 'long' type xts.c:59: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type
One self test failure, unrelated to XTS mode:
PASS: symbols dlopen failed: dlopen(../libnettle.so, 2): image not found ../run-tests: line 57: 86075 Abort trap "$1" $testflags FAIL: dlopen
Jeffrey Walton noloader@gmail.com writes:
Hi Everyone,
I'm building Nettle 3.5.1 on an old PowerMac G5.
gcc -I. -I/usr/local/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -fPIC -pthread -ggdb3 -Wno-pointer-sign -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT xts-aes128.o -MD -MP -MF xts-aes128.o.d -c xts-aes128.c \ && true xts.c: In function 'xts_shift': xts.c:59: warning: integer constant is too large for 'long' type xts.c:59: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type
This looks like it may be a real problem on big-endian 32-bit machines. A bit surprised that tests don't fail, the ci runs tests on (emulated) mips, and I also did pre-release tests on m68k.
In the code on master, this code is moved to block-internal.h, and use UINT64_C for the constants.
One self test failure, unrelated to XTS mode:
PASS: symbols dlopen failed: dlopen(../libnettle.so, 2): image not found ../run-tests: line 57: 86075 Abort trap "$1" $testflags FAIL: dlopen
Old problem, fixed recently, see https://git.lysator.liu.se/nettle/nettle/commit/c00f4b17f7f38c180ece4c92c50c...
Regards, /Niels
On Tue, Oct 29, 2019 at 3:01 PM Niels Möller nisse@lysator.liu.se wrote:
Jeffrey Walton noloader@gmail.com writes:
Hi Everyone,
I'm building Nettle 3.5.1 on an old PowerMac G5.
gcc -I. -I/usr/local/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -fPIC -pthread -ggdb3 -Wno-pointer-sign -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT xts-aes128.o -MD -MP -MF xts-aes128.o.d -c xts-aes128.c \ && true xts.c: In function 'xts_shift': xts.c:59: warning: integer constant is too large for 'long' type xts.c:59: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type xts.c:60: warning: integer constant is too large for 'long' type
This looks like it may be a real problem on big-endian 32-bit machines. A bit surprised that tests don't fail, the ci runs tests on (emulated) mips, and I also did pre-release tests on m68k.
In the code on master, this code is moved to block-internal.h, and use UINT64_C for the constants.
Yeah, I think you need this on the old Apple machines with the modified GCC 4.2.1:
0x8700000000000000ull
Wrapping it in a macro that adds the ULL may be a good idea. Something like:
#if (_LP64 || __LP64__) #define UINT64_C (x) x #else #define UINT64_C (x) xull #endif
Or you could switch to 32-bit data types for the GF Double function. 32-bit does not materially affect the double. You lose something like 0.002 cpb in the 32-bit version.
Jeff
nettle-bugs@lists.lysator.liu.se