Hi Everyone,
I bumped to Nettle 3.7. The build is resulting in:
gcc -I. -I/export/home/jwalton/tmp/ok2delete/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -m64 -march=native -fPIC -pthread -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT sha256-compress-2.o -MD -MP -MF sha256-compress-2.o.d -c sha256-compress-2.s gcc -I. -I/export/home/jwalton/tmp/ok2delete/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -m64 -march=native -fPIC -pthread -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT sexp.o -MD -MP -MF sexp.o.d -c sexp.c \ && true sha256-compress-2.ssha1-compress-2.s: Assembler messages: sha1-compress-2.s:73: Error: : no such instruction: `sha1rnds4 $0,%xmm5,%xmm4'Assembler messages: sha256-compress-2.s:87 : Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha1-compress-2.s:78sha256-compress-2.s: Error: no such instruction: `sha1nexte %xmm1,%xmm6':89 : Error: no such instruction: `sha256rnds2 %xmm6,%xmm5'sha1-compress-2.s:80 : Error: no such instruction: `sha1rnds4 $0,%xmm6,%xmm4' sha256-compress-2.ssha1-compress-2.s:96:81: Error: : Error: no such instruction: `sha1msg1 %xmm1,%xmm0'no such instruction: `sha256rnds2 %xmm5,%xmm6'
sha1-compress-2.s:86sha256-compress-2.s: Error: :98no such instruction: `sha1nexte %xmm2,%xmm5' : Error: sha1-compress-2.s:88: no such instruction: `sha256rnds2 %xmm6,%xmm5'Error: sha256-compress-2.sno such instruction: `sha1rnds4 $0,%xmm5,%xmm4':99 : Error: sha1-compress-2.sno such instruction: `sha256msg1 %xmm2,%xmm1' :89: Error: no such instruction: `sha1msg1 %xmm2,%xmm1' sha256-compress-2.s:106: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha1-compress-2.s:96sha256-compress-2.s: Error: no such instruction: `sha1nexte %xmm3,%xmm6' :108sha1-compress-2.s:98: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5': Error: no such instruction: `sha1msg2 %xmm3,%xmm0' sha256-compress-2.ssha1-compress-2.s:109:99: : Error: Error: no such instruction: `sha1rnds4 $0,%xmm6,%xmm4'no such instruction: `sha256msg1 %xmm3,%xmm2'
sha256-compress-2.s:117: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha256-compress-2.s:119: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5' sha256-compress-2.s:123: Error: no such instruction: `sha256msg2 %xmm4,%xmm1' sha256-compress-2.s:124: sha1-compress-2.sError: no such instruction: `sha256msg1 %xmm4,%xmm3' :100: Error: sha256-compress-2.sno such instruction: `sha1msg1 %xmm3,%xmm2' :129: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha1-compress-2.s:104: Error: no such instruction: `sha1nexte %xmm0,%xmm5'sha256-compress-2.s:131: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5' sha1-compress-2.s:106sha256-compress-2.s: :135: Error: Error: no such instruction: `sha1msg2 %xmm0,%xmm1'no such instruction: `sha256msg2 %xmm1,%xmm2'
sha256-compress-2.ssha1-compress-2.s:107:136: : Error: no such instruction: `sha256msg1 %xmm1,%xmm4' Error: no such instruction: `sha1rnds4 $0,%xmm5,%xmm4'sha256-compress-2.s :141: sha1-compress-2.sError: no such instruction: `sha256rnds2 %xmm5,%xmm6' :108: sha256-compress-2.sError: no such instruction: `sha1msg1 %xmm0,%xmm3':143: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5' sha1-compress-2.s:113: Error: sha256-compress-2.s:147: Error: no such instruction: `sha1nexte %xmm1,%xmm6'no such instruction: `sha256msg2 %xmm2,%xmm3'
sha256-compress-2.ssha1-compress-2.s:148:115: Error: : no such instruction: `sha256msg1 %xmm2,%xmm1' Error: sha256-compress-2.sno such instruction: `sha1msg2 %xmm1,%xmm2':153: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha256-compress-2.ssha1-compress-2.s:155: Error: :116: no such instruction: `sha256rnds2 %xmm6,%xmm5' Error: no such instruction: `sha1rnds4 $1,%xmm6,%xmm4' sha1-compress-2.s:117: Error: sha256-compress-2.sno such instruction: `sha1msg1 %xmm1,%xmm0':159: Error: no such instruction: `sha256msg2 %xmm3,%xmm4' sha256-compress-2.s:160sha1-compress-2.s: Error: no such instruction: `sha256msg1 %xmm3,%xmm2' :121: Error: no such instruction: `sha1nexte %xmm2,%xmm5'sha256-compress-2.s :165: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha1-compress-2.ssha256-compress-2.s:123: Error: no such instruction: `sha1msg2 %xmm2,%xmm3' sha1-compress-2.s:167: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5':124 : Error: no such instruction: `sha1rnds4 $1,%xmm5,%xmm4' sha256-compress-2.ssha1-compress-2.s:125:171: : Error: no such instruction: `sha256msg2 %xmm4,%xmm1'Error: no such instruction: `sha1msg1 %xmm2,%xmm1'
sha256-compress-2.s:172: Error: sha1-compress-2.s:129no such instruction: `sha256msg1 %xmm4,%xmm3' : Error: no such instruction: `sha1nexte %xmm3,%xmm6'sha256-compress-2.s :177: sha1-compress-2.sError: no such instruction: `sha256rnds2 %xmm5,%xmm6' :131: Error: sha256-compress-2.sno such instruction: `sha1msg2 %xmm3,%xmm0':179 : Error: no such instruction: `sha256rnds2 %xmm6,%xmm5'sha1-compress-2.s :132: Error: no such instruction: `sha1rnds4 $1,%xmm6,%xmm4' sha256-compress-2.s:183: Error: sha1-compress-2.s:133no such instruction: `sha256msg2 %xmm1,%xmm2' : sha256-compress-2.sError: :184no such instruction: `sha1msg1 %xmm3,%xmm2' : Error: no such instruction: `sha256msg1 %xmm1,%xmm4' sha1-compress-2.s:137: Error: no such instruction: `sha1nexte %xmm0,%xmm5' sha1-compress-2.s:139: sha256-compress-2.sError: no such instruction: `sha1msg2 %xmm0,%xmm1':189: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha1-compress-2.s:140sha256-compress-2.s:191: : Error: no such instruction: `sha256rnds2 %xmm6,%xmm5'Error: no such instruction: `sha1rnds4 $1,%xmm5,%xmm4'
sha1-compress-2.ssha256-compress-2.s:141: :195: Error: Error: no such instruction: `sha1msg1 %xmm0,%xmm3'no such instruction: `sha256msg2 %xmm2,%xmm3'
sha256-compress-2.s:196sha1-compress-2.s:145: : Error: no such instruction: `sha256msg1 %xmm2,%xmm1' Error: no such instruction: `sha1nexte %xmm1,%xmm6' sha256-compress-2.s:201: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6'sha1-compress-2.s:147 : Error: sha256-compress-2.s:203: Error: no such instruction: `sha1msg2 %xmm1,%xmm2'no such instruction: `sha256rnds2 %xmm6,%xmm5'
sha256-compress-2.ssha1-compress-2.s:148:207: : Error: Error: no such instruction: `sha256msg2 %xmm3,%xmm4' sha256-compress-2.s:208: Error: no such instruction: `sha256msg1 %xmm3,%xmm2' sha256-compress-2.s:213: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha256-compress-2.s:215: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5' sha256-compress-2.s:219: Error: no such instruction: `sha256msg2 %xmm4,%xmm1' sha256-compress-2.s:220: Error: no such instruction: `sha256msg1 %xmm4,%xmm3' sha256-compress-2.s:225: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha256-compress-2.s:227: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5' sha256-compress-2.s:231: Error: no such instruction: `sha256msg2 %xmm1,%xmm2' sha256-compress-2.s:232: Error: no such instruction: `sha256msg1 %xmm1,%xmm4' sha256-compress-2.s:237: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha256-compress-2.s:239: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5' sha256-compress-2.s:243: Error: no such instruction: `sha256msg2 %xmm2,%xmm3' sha256-compress-2.s:247: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha256-compress-2.s:249: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5' sha256-compress-2.s:253: Error: no such instruction: `sha256msg2 %xmm3,%xmm4' sha256-compress-2.s:257: Error: no such instruction: `sha256rnds2 %xmm5,%xmm6' sha256-compress-2.s:259: Error: no such instruction: `sha256rnds2 %xmm6,%xmm5' no such instruction: `sha1rnds4 $1,%xmm6,%xmm4' sha1-compress-2.s:149: Error: no such instruction: `sha1msg1 %xmm1,%xmm0' sha1-compress-2.s:154: Error: no such instruction: `sha1nexte %xmm2,%xmm5' sha1-compress-2.s:156: Error: no such instruction: `sha1msg2 %xmm2,%xmm3' sha1-compress-2.s:157: Error: no such instruction: `sha1rnds4 $2,%xmm5,%xmm4' sha1-compress-2.s:158: Error: no such instruction: `sha1msg1 %xmm2,%xmm1' sha1-compress-2.s:162: Error: no such instruction: `sha1nexte %xmm3,%xmm6' sha1-compress-2.s:164: Error: no such instruction: `sha1msg2 %xmm3,%xmm0' sha1-compress-2.s:165: Error: no such instruction: `sha1rnds4 $2,%xmm6,%xmm4' sha1-compress-2.s:166: Error: no such instruction: `sha1msg1 %xmm3,%xmm2' sha1-compress-2.s:170: Error: no such instruction: `sha1nexte %xmm0,%xmm5' sha1-compress-2.s:172: Error: no such instruction: `sha1msg2 %xmm0,%xmm1' sha1-compress-2.s:173: Error: no such instruction: `sha1rnds4 $2,%xmm5,%xmm4' sha1-compress-2.s:174: Error: no such instruction: `sha1msg1 %xmm0,%xmm3' sha1-compress-2.s:178: Error: no such instruction: `sha1nexte %xmm1,%xmm6' sha1-compress-2.s:180: Error: no such instruction: `sha1msg2 %xmm1,%xmm2' sha1-compress-2.s:181: Error: no such instruction: `sha1rnds4 $2,%xmm6,%xmm4' sha1-compress-2.s:182: Error: no such instruction: `sha1msg1 %xmm1,%xmm0' sha1-compress-2.s:186: Error: no such instruction: `sha1nexte %xmm2,%xmm5' sha1-compress-2.s:188: Error: no such instruction: `sha1msg2 %xmm2,%xmm3' sha1-compress-2.s:189: Error: no such instruction: `sha1rnds4 $2,%xmm5,%xmm4' sha1-compress-2.s:190: Error: no such instruction: `sha1msg1 %xmm2,%xmm1' sha1-compress-2.s:195: Error: no such instruction: `sha1nexte %xmm3,%xmm6' sha1-compress-2.s:197: Error: no such instruction: `sha1msg2 %xmm3,%xmm0' sha1-compress-2.s:198: Error: no such instruction: `sha1rnds4 $3,%xmm6,%xmm4' sha1-compress-2.s:199: Error: no such instruction: `sha1msg1 %xmm3,%xmm2' sha1-compress-2.s:203: Error: no such instruction: `sha1nexte %xmm0,%xmm5' sha1-compress-2.s:205: Error: no such instruction: `sha1msg2 %xmm0,%xmm1' sha1-compress-2.s:206: Error: no such instruction: `sha1rnds4 $3,%xmm5,%xmm4' sha1-compress-2.s:207: Error: no such instruction: `sha1msg1 %xmm0,%xmm3' sha1-compress-2.s:211: Error: no such instruction: `sha1nexte %xmm1,%xmm6' sha1-compress-2.s:213: Error: no such instruction: `sha1msg2 %xmm1,%xmm2' sha1-compress-2.s:214: Error: no such instruction: `sha1rnds4 $3,%xmm6,%xmm4' sha1-compress-2.s:217: Error: no such instruction: `sha1nexte %xmm2,%xmm5' sha1-compress-2.s:219: Error: no such instruction: `sha1msg2 %xmm2,%xmm3' sha1-compress-2.s:220: Error: no such instruction: `sha1rnds4 $3,%xmm5,%xmm4' sha1-compress-2.s:222: Error: no such instruction: `sha1nexte %xmm3,%xmm6' sha1-compress-2.s:224: Error: no such instruction: `sha1rnds4 $3,%xmm6,%xmm4' sha1-compress-2.s:226: Error: no such instruction: `sha1nexte %xmm8,%xmm5' gmake[1]: *** [sha1-compress-2.o] Error 1 gmake[1]: *** Waiting for unfinished jobs....
Jeff
Jeffrey Walton noloader@gmail.com writes:
Hi Everyone,
I bumped to Nettle 3.7. The build is resulting in:
Clearly, the assembler doesn't know of the sha-related instructions (introduced in 2013, according to https://en.wikipedia.org/wiki/Intel_SHA_extensions). Which assembler (and version) are you using? If it's difficult to upgrade the assembler, it could be worked around by replacing the instructions with equivalent .byte sequences.
Regards, /Niels
On Mon, Jan 4, 2021 at 4:00 PM Niels Möller nisse@lysator.liu.se wrote:
Jeffrey Walton noloader@gmail.com writes:
Hi Everyone,
I bumped to Nettle 3.7. The build is resulting in:
Clearly, the assembler doesn't know of the sha-related instructions (introduced in 2013, according to https://en.wikipedia.org/wiki/Intel_SHA_extensions). Which assembler (and version) are you using? If it's difficult to upgrade the assembler, it could be worked around by replacing the instructions with equivalent .byte sequences.
This makes no sense...
I added --disable-x86-sha-ni and it still produces the error. How is the ASM being used if it is disabled???
Jeff
On Sat, Mar 27, 2021 at 9:34 PM Jeffrey Walton noloader@gmail.com wrote:
This makes no sense...
I added --disable-x86-sha-ni and it still produces the error. How is the ASM being used if it is disabled???
Here's a demonstration of the configuration problem.
Jeffrey Walton noloader@gmail.com writes:
I added --disable-x86-sha-ni and it still produces the error. How is the ASM being used if it is disabled???
You need to choose *either* --enable-fat (now the default), *or* use the explicit config options for particular instructions. Mixing is not supported. Don't do that.
And I think this is at least the third time I point this out to you, most recently just a few days ago. If, e.g., you deeply dislike the way Nettle's configure works and would like it to change, your current behavior is not a productive way of improving anything. It is annoying me and wasting my time.
Regards, /Niels
On Sun, Mar 28, 2021 at 4:18 AM Niels Möller nisse@lysator.liu.se wrote:
Jeffrey Walton noloader@gmail.com writes:
I added --disable-x86-sha-ni and it still produces the error. How is the ASM being used if it is disabled???
You need to choose *either* --enable-fat (now the default), *or* use the explicit config options for particular instructions. Mixing is not supported. Don't do that.
And I think this is at least the third time I point this out to you, most recently just a few days ago. If, e.g., you deeply dislike the way Nettle's configure works and would like it to change, your current behavior is not a productive way of improving anything. It is annoying me and wasting my time.
--enable-fat turns on cpu identification and runtime switching. I need that. I need AES. I don't need SHA. It is impossible to get into a good configuration.
Nettle wastes a fair amount our time trying to work through these problems.
Jeff
Jeffrey Walton noloader@gmail.com writes:
--enable-fat turns on cpu identification and runtime switching. I need that. I need AES. I don't need SHA. It is impossible to get into a good configuration.
I don't think it's worthwhile to add complexity to configure and the fat machinery, and testing thereof, to make it flexible enough for that usecase. In your case, you need it to be able to use an assembler missing support for instructions added to the architecture 7.5 years ago. Are there other usecases where more flexibility would be beneficial?
I might consider it, if someone else wants to do the work, and it turns out it doesn't get too messy.
To get it to work in your setting, I would suggest one of:
(i) Stick to --disable-assembler, to get something that works but is slow (and unfortunately a performance regression since nettle-3.6).
(ii) Upgrade your assembler to a version that recognizes the sha instructions (not sure which assembler you're using, I did ask, when you reported the problem back in January, but I haven't seen an answer). I would be a bit surprised if support for these instructions is still missing in recent releases of Oracle's development tools, if that's what you're using.
Nettle wastes a fair amount our time trying to work through these problems.
To be honest, high performance on the proprietary and somewhat obscure Solaris operating system is not going to be a high priority to me, in particular version 11.3 which is soon officially end of support (January 2024, according to wikipedia, curiously the same date as for the much older Solaris 10). Correctness, which you'd get with --disable-assembler, is considerably more important. I'm willing to help getting Nettle to work on obscure and obsolete systems, as long as the cost in added complexity is small.
Regards, /Niels
nettle-bugs@lists.lysator.liu.se