Opened 3 years ago
Last modified 17 months ago
#65147 assigned defect
nettle fails to build for x86_64 with gcc10/gcc11: sha256-compress.asm:208:no such instruction (fix: add --disable-assembler)
Reported by: | barracuda156 | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | x86_64, snowleopard | Cc: | |
Port: | nettle |
Description
What is going on here?
/opt/x86_64/libexec/gcc10-bootstrap/bin/gcc -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT sha1-compress-2.o -MD -MP -MF sha1-compress-2.o.d -c sha1-compress-2.s sha256-compress.asm:87:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:89:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:96:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:98:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:99:no such instruction: `sha256msg1 %xmm2, %xmm1' sha256-compress.asm:106:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:108:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:109:no such instruction: `sha256msg1 %xmm3, %xmm2' sha256-compress.asm:117:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:119:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:123:no such instruction: `sha256msg2 %xmm4, %xmm1' sha256-compress.asm:124:no such instruction: `sha256msg1 %xmm4, %xmm3' sha256-compress.asm:129:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:131:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:135:no such instruction: `sha256msg2 %xmm1, %xmm2' sha256-compress.asm:136:no such instruction: `sha256msg1 %xmm1, %xmm4' sha256-compress.asm:141:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:143:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:147:no such instruction: `sha256msg2 %xmm2, %xmm3' sha256-compress.asm:148:no such instruction: `sha256msg1 %xmm2, %xmm1' sha256-compress.asm:153:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:155:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:159:no such instruction: `sha256msg2 %xmm3, %xmm4' sha256-compress.asm:160:no such instruction: `sha256msg1 %xmm3, %xmm2' sha256-compress.asm:165:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:167:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:171:no such instruction: `sha256msg2 %xmm4, %xmm1' sha256-compress.asm:172:no such instruction: `sha256msg1 %xmm4, %xmm3' sha256-compress.asm:177:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:179:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:183:no such instruction: `sha256msg2 %xmm1, %xmm2' sha256-compress.asm:184:no such instruction: `sha256msg1 %xmm1, %xmm4' sha256-compress.asm:189:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:191:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:195:no such instruction: `sha256msg2 %xmm2, %xmm3' sha256-compress.asm:196:no such instruction: `sha256msg1 %xmm2, %xmm1' sha256-compress.asm:201:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:203:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:207:no such instruction: `sha256msg2 %xmm3, %xmm4' sha256-compress.asm:208:no such instruction: `sha256msg1 %xmm3, %xmm2' sha256-compress.asm:213:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:215:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:219:no such instruction: `sha256msg2 %xmm4, %xmm1' sha256-compress.asm:220:no such instruction: `sha256msg1 %xmm4, %xmm3' sha256-compress.asm:225:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:227:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:231:no such instruction: `sha256msg2 %xmm1, %xmm2' sha256-compress.asm:232:no such instruction: `sha256msg1 %xmm1, %xmm4' sha256-compress.asm:237:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:239:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:243:no such instruction: `sha256msg2 %xmm2, %xmm3' sha256-compress.asm:247:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:249:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:253:no such instruction: `sha256msg2 %xmm3, %xmm4' sha256-compress.asm:257:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:259:no such instruction: `sha256rnds2 %xmm6, %xmm5' make[1]: *** [sha256-compress-2.o] Error 1 make[1]: *** Waiting for unfinished jobs.... sha1-compress.asm:73:no such instruction: `sha1rnds4 $0, %xmm5,%xmm4' sha1-compress.asm:78:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:80:no such instruction: `sha1rnds4 $0, %xmm6,%xmm4' sha1-compress.asm:81:no such instruction: `sha1msg1 %xmm1, %xmm0' sha1-compress.asm:86:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:88:no such instruction: `sha1rnds4 $0, %xmm5,%xmm4' sha1-compress.asm:89:no such instruction: `sha1msg1 %xmm2, %xmm1' sha1-compress.asm:96:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:98:no such instruction: `sha1msg2 %xmm3, %xmm0' sha1-compress.asm:99:no such instruction: `sha1rnds4 $0, %xmm6,%xmm4' sha1-compress.asm:100:no such instruction: `sha1msg1 %xmm3, %xmm2' sha1-compress.asm:104:no such instruction: `sha1nexte %xmm0, %xmm5' sha1-compress.asm:106:no such instruction: `sha1msg2 %xmm0, %xmm1' sha1-compress.asm:107:no such instruction: `sha1rnds4 $0, %xmm5,%xmm4' sha1-compress.asm:108:no such instruction: `sha1msg1 %xmm0, %xmm3' sha1-compress.asm:113:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:115:no such instruction: `sha1msg2 %xmm1, %xmm2' sha1-compress.asm:116:no such instruction: `sha1rnds4 $1, %xmm6,%xmm4' sha1-compress.asm:117:no such instruction: `sha1msg1 %xmm1, %xmm0' sha1-compress.asm:121:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:123:no such instruction: `sha1msg2 %xmm2, %xmm3' sha1-compress.asm:124:no such instruction: `sha1rnds4 $1, %xmm5,%xmm4' sha1-compress.asm:125:no such instruction: `sha1msg1 %xmm2, %xmm1' sha1-compress.asm:129:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:131:no such instruction: `sha1msg2 %xmm3, %xmm0' sha1-compress.asm:132:no such instruction: `sha1rnds4 $1, %xmm6,%xmm4' sha1-compress.asm:133:no such instruction: `sha1msg1 %xmm3, %xmm2' sha1-compress.asm:137:no such instruction: `sha1nexte %xmm0, %xmm5' sha1-compress.asm:139:no such instruction: `sha1msg2 %xmm0, %xmm1' sha1-compress.asm:140:no such instruction: `sha1rnds4 $1, %xmm5,%xmm4' sha1-compress.asm:141:no such instruction: `sha1msg1 %xmm0, %xmm3' sha1-compress.asm:145:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:147:no such instruction: `sha1msg2 %xmm1, %xmm2' sha1-compress.asm:148:no such instruction: `sha1rnds4 $1, %xmm6,%xmm4' sha1-compress.asm:149:no such instruction: `sha1msg1 %xmm1, %xmm0' sha1-compress.asm:154:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:156:no such instruction: `sha1msg2 %xmm2, %xmm3' sha1-compress.asm:157:no such instruction: `sha1rnds4 $2, %xmm5,%xmm4' sha1-compress.asm:158:no such instruction: `sha1msg1 %xmm2, %xmm1' sha1-compress.asm:162:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:164:no such instruction: `sha1msg2 %xmm3, %xmm0' sha1-compress.asm:165:no such instruction: `sha1rnds4 $2, %xmm6,%xmm4' sha1-compress.asm:166:no such instruction: `sha1msg1 %xmm3, %xmm2' sha1-compress.asm:170:no such instruction: `sha1nexte %xmm0, %xmm5' sha1-compress.asm:172:no such instruction: `sha1msg2 %xmm0, %xmm1' sha1-compress.asm:173:no such instruction: `sha1rnds4 $2, %xmm5,%xmm4' sha1-compress.asm:174:no such instruction: `sha1msg1 %xmm0, %xmm3' sha1-compress.asm:178:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:180:no such instruction: `sha1msg2 %xmm1, %xmm2' sha1-compress.asm:181:no such instruction: `sha1rnds4 $2, %xmm6,%xmm4' sha1-compress.asm:182:no such instruction: `sha1msg1 %xmm1, %xmm0' sha1-compress.asm:186:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:188:no such instruction: `sha1msg2 %xmm2, %xmm3' sha1-compress.asm:189:no such instruction: `sha1rnds4 $2, %xmm5,%xmm4' sha1-compress.asm:190:no such instruction: `sha1msg1 %xmm2, %xmm1' sha1-compress.asm:195:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:197:no such instruction: `sha1msg2 %xmm3, %xmm0' sha1-compress.asm:198:no such instruction: `sha1rnds4 $3, %xmm6,%xmm4' sha1-compress.asm:199:no such instruction: `sha1msg1 %xmm3, %xmm2' sha1-compress.asm:203:no such instruction: `sha1nexte %xmm0, %xmm5' sha1-compress.asm:205:no such instruction: `sha1msg2 %xmm0, %xmm1' sha1-compress.asm:206:no such instruction: `sha1rnds4 $3, %xmm5,%xmm4' sha1-compress.asm:207:no such instruction: `sha1msg1 %xmm0, %xmm3' sha1-compress.asm:211:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:213:no such instruction: `sha1msg2 %xmm1, %xmm2' sha1-compress.asm:214:no such instruction: `sha1rnds4 $3, %xmm6,%xmm4' sha1-compress.asm:217:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:219:no such instruction: `sha1msg2 %xmm2, %xmm3' sha1-compress.asm:220:no such instruction: `sha1rnds4 $3, %xmm5,%xmm4' sha1-compress.asm:222:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:224:no such instruction: `sha1rnds4 $3, %xmm6,%xmm4' sha1-compress.asm:226:no such instruction: `sha1nexte %xmm8, %xmm5' make[1]: *** [sha1-compress-2.o] Error 1 make[1]: Leaving directory `/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.7.3' make: *** [all] Error 2 make: Leaving directory `/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.7.3' Command failed: cd "/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.7.3" && /usr/bin/make -j4 -w all Exit code: 2 Error: Failed to build nettle: command execution failed
Attachments (2)
Change History (28)
Changed 3 years ago by barracuda156
Attachment: | config.log added |
---|
comment:1 Changed 3 years ago by barracuda156
comment:2 follow-up: 3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
The error looks like #58740, which that blacklist was added to fix, by blacklisting old gcc. I'm not sure if anybody tested newer gcc though. I'm not sure if any version of gcc is supposed to understand this code or not.
comment:3 follow-up: 4 Changed 3 years ago by barracuda156
Replying to ryandesign:
The error looks like #58740, which that blacklist was added to fix, by blacklisting old gcc. I'm not sure if anybody tested newer gcc though. I'm not sure if any version of gcc is supposed to understand this code or not.
I have built nettle
for ppc
with gcc7
and gcc11
many times, so it is not gcc issue, unless it is a) specific to x86_64
or b) specific to gcc10-bootstrap
(which would be rather surprising: it is essentially normal gcc10
without extra langs).
Some voodoo going on here. Also, as I noted in another ticket, blacklisting old gcc
makes Macports ignore gcc10-bootstrap
configure lines.
- S. If anyone wonders why use
gcc10-bootstrap
: I need to build one specific port forx86_64
, and thought to minimize compiling pain.gcc10-bootstrap
is already 2+ hrs. Building regulargcc11
would mean +5 hrs more.
comment:4 follow-ups: 5 16 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to barracuda156:
I have built
nettle
forppc
withgcc7
andgcc11
many times, so it is not gcc issue, unless it is a) specific tox86_64
It's definitely specific to x86_64. These are x86_64 instructions it's complaining about. I found some references to the fact that this can be caused by too-old binutils, even if gcc is new enough:
https://github.com/randombit/botan/commit/86e75d060d5353778fea1d65ef7cb0efba4c2a9c
comment:5 Changed 3 years ago by barracuda156
Replying to ryandesign:
Replying to barracuda156:
I have built
nettle
forppc
withgcc7
andgcc11
many times, so it is not gcc issue, unless it is a) specific tox86_64
It's definitely specific to x86_64. These are x86_64 instructions it's complaining about. I found some references to the fact that this can be caused by too-old binutils, even if gcc is new enough:
https://github.com/randombit/botan/commit/86e75d060d5353778fea1d65ef7cb0efba4c2a9c
Thank you!
This may explain it, perhaps. gcc10-bootstrap
uses OS ld
and as
, not Macports ones.
comment:6 follow-up: 7 Changed 3 years ago by kencu (Ken)
gcc10-bootstrap is supposed to use the system ld and as, so that it can be a freestanding compiler to build bootstrap tools without having any runtime deps. It was never meant to be a general-use compiler, just a compiler to bootstrap to general-use compilers.
If you want it to use a different ld and as, you are meant to find a way to force it to do so, specifically, as part of a bootstrapping process.
And the ancient "gas" assembler in older macos systems indeed has some major limitations for newer instructions.
For the Intel path, the idea was to use gcc10-bootstrap to build clang11-bootstrap (which has it's own assembler) and then go from there.
Why are we trying to build ports like nettle with gcc10-bootstrap anyway? Is that on a bootstrapping path?
comment:7 Changed 3 years ago by barracuda156
Replying to kencu:
Why are we trying to build ports like nettle with gcc10-bootstrap anyway? Is that on a bootstrapping path?
To save several hours of compilation time for libgcc11
+ gcc11
. Not relevant personally anymore, finding a fix for nettle
would have taken longer, so I went with building gcc11
.
I still don't think that extrapolating ban is a correct behavior of Macports build system, regardless of reasons why someone could need this. After all, notes in gcc10-bootstrap
port do not restrict its usage:
To use this bootstrap version of gcc instead of the default compiler, add the following lines to the Portfile:
So why not?
comment:8 Changed 3 years ago by barracuda156
Let me explain in some detail, so that I don't make an impression of doing something ridiculous and creating problems out of nowhere.
As you may remember, I was working on getting ghc
built for PPC. Long story short, ghc
uses itself to build, so I need a working ghc
for Intel to begin with. I went to Haskell site, and well, there is no support for 10.6 Intel (I did try to build what they had for 10.7, it failed, both with Xcode 3.2.6 and Xcode 4.2). I don't need it on 10.7, that gonna create a whole range of unneeded complications later for cross-building. So I went with Macports route instead.
ghc
in Macports needs a modern compiler, and I cannot use gcc11
which I already built for x86_64
before – outside of Macports – for above-mentioned purpose. The optimal way to get some compiler supporting 2011 standard is gcc10-bootstrap
. So I built that (tried universal, it failed, rebuilt again just for x86_64
).
Then ghc
has a list of dependencies, which in turn require few ports that need 2011 standard compiler. So I wanted to save some effort and avoid building gcc11
again, twice (because of libgcc11
). I already have built gcc
for x86_64
4 times just to get this thing going. And the only point is to build ghc
, otherwise I have no use case for these.
So while my case is rather uncommon, I don't think it is something crazy or absolutely unique. That was simply the fastest way to build ghc
for Intel, given 10.6.8.
comment:9 follow-up: 12 Changed 3 years ago by kencu (Ken)
You already found my current ghc for 10.6 Intel, I know, because you starred it.
That is the only recent ghc on Earth that works on 10.6.8 (and it works great!)
comment:10 Changed 3 years ago by kencu (Ken)
comment:11 Changed 3 years ago by kencu (Ken)
you can use that ghc to bootstrap to newer versions -- I just haven't got around to it yet. ghc needs a few patches to build on 10.6.8 -- I haven't upstreamed those either, and don't intend to any time soon.
I have no idea if you can use that ghc to build for PPC again though. Maybe.
comment:12 Changed 3 years ago by barracuda156
Replying to kencu:
You already found my current ghc for 10.6 Intel, I know, because you starred it.
That is the only recent ghc on Earth that works on 10.6.8 (and it works great!)
Oh! Sorry, it really dropped of my brain. I will try your version. Thanks.
By the way, nettle
stills fails with gcc11
and Macports cctools
. Can this be solved somehow?
comment:13 Changed 3 years ago by barracuda156
So back to the ticket issue: nettle
fails with gcc11
:(
/opt/x86_64/bin/gcc-mp-11 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -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 /opt/x86_64/bin/gcc-mp-11 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT sha1-compress-2.o -MD -MP -MF sha1-compress-2.o.d -c sha1-compress-2.s sha1-compress.asm:73:no such instruction: `sha1rnds4 $0, %xmm5,%xmm4' sha1-compress.asm:78:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:80:no such instruction: `sha1rnds4 $0, %xmm6,%xmm4' sha1-compress.asm:81:no such instruction: `sha1msg1 %xmm1, %xmm0' sha1-compress.asm:86:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:88:no such instruction: `sha1rnds4 $0, %xmm5,%xmm4' sha1-compress.asm:89:no such instruction: `sha1msg1 %xmm2, %xmm1' sha1-compress.asm:96:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:98:no such instruction: `sha1msg2 %xmm3, %xmm0' sha1-compress.asm:99:no such instruction: `sha1rnds4 $0, %xmm6,%xmm4' sha1-compress.asm:100:no such instruction: `sha1msg1 %xmm3, %xmm2' sha1-compress.asm:104:no such instruction: `sha1nexte %xmm0, %xmm5' sha1-compress.asm:106:no such instruction: `sha1msg2 %xmm0, %xmm1' sha1-compress.asm:107:no such instruction: `sha1rnds4 $0, %xmm5,%xmm4' sha1-compress.asm:108:no such instruction: `sha1msg1 %xmm0, %xmm3' sha1-compress.asm:113:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:115:no such instruction: `sha1msg2 %xmm1, %xmm2' sha1-compress.asm:116:no such instruction: `sha1rnds4 $1, %xmm6,%xmm4' sha1-compress.asm:117:no such instruction: `sha1msg1 %xmm1, %xmm0' sha1-compress.asm:121:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:123:no such instruction: `sha1msg2 %xmm2, %xmm3' sha1-compress.asm:124:no such instruction: `sha1rnds4 $1, %xmm5,%xmm4' sha1-compress.asm:125:no such instruction: `sha1msg1 %xmm2, %xmm1' sha1-compress.asm:129:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:131:no such instruction: `sha1msg2 %xmm3, %xmm0' sha1-compress.asm:132:no such instruction: `sha1rnds4 $1, %xmm6,%xmm4' sha1-compress.asm:133:no such instruction: `sha1msg1 %xmm3, %xmm2' sha1-compress.asm:137:no such instruction: `sha1nexte %xmm0, %xmm5' sha1-compress.asm:139:no such instruction: `sha1msg2 %xmm0, %xmm1' sha1-compress.asm:140:no such instruction: `sha1rnds4 $1, %xmm5,%xmm4' sha1-compress.asm:141:no such instruction: `sha1msg1 %xmm0, %xmm3' sha1-compress.asm:145:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:147:no such instruction: `sha1msg2 %xmm1, %xmm2' sha1-compress.asm:148:no such instruction: `sha1rnds4 $1, %xmm6,%xmm4' sha1-compress.asm:149:no such instruction: `sha1msg1 %xmm1, %xmm0' sha1-compress.asm:154:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:156:no such instruction: `sha1msg2 %xmm2, %xmm3' sha1-compress.asm:157:no such instruction: `sha1rnds4 $2, %xmm5,%xmm4' sha1-compress.asm:158:no such instruction: `sha1msg1 %xmm2, %xmm1' sha256-compress.asm:87:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:89:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha1-compress.asm:162:sha256-compress.asm:96:no such instruction: `sha1nexte %xmm3, %xmm6' no such instruction: `sha256rnds2 %xmm5, %xmm6'sha1-compress.asm:164:no such instruction: `sha1msg2 %xmm3, %xmm0' sha1-compress.asm:165:no such instruction: `sha1rnds4 $2, %xmm6,%xmm4' sha1-compress.asm:166:no such instruction: `sha1msg1 %xmm3, %xmm2' sha256-compress.asm:98:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:99:no such instruction: `sha256msg1 %xmm2, %xmm1' sha256-compress.asm:106:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:108:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:109:no such instruction: `sha256msg1 %xmm3, %xmm2' sha256-compress.asm:117:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:119:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:123:no such instruction: `sha256msg2 %xmm4, %xmm1' sha256-compress.asm:124:no such instruction: `sha256msg1 %xmm4, %xmm3' sha256-compress.asm:129:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:131:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:135:no such instruction: `sha256msg2 %xmm1, %xmm2' sha256-compress.asm:136:no such instruction: `sha256msg1 %xmm1, %xmm4' sha256-compress.asm:141:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:143:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:147:no such instruction: `sha256msg2 %xmm2, %xmm3' sha256-compress.asm:148:no such instruction: `sha256msg1 %xmm2, %xmm1' sha256-compress.asm:153:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:155:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:159:no such instruction: `sha256msg2 %xmm3, %xmm4' sha256-compress.asm:160:no such instruction: `sha256msg1 %xmm3, %xmm2' sha256-compress.asm:165:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:167:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:171:no such instruction: `sha256msg2 %xmm4, %xmm1' sha256-compress.asm:172:no such instruction: `sha256msg1 %xmm4, %xmm3' sha256-compress.asm:177:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:179:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:183:no such instruction: `sha256msg2 %xmm1, %xmm2' sha256-compress.asm:184:no such instruction: `sha256msg1 %xmm1, %xmm4' sha256-compress.asm:189:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:191:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:195:no such instruction: `sha256msg2 %xmm2, %xmm3' sha256-compress.asm:196:no such instruction: `sha256msg1 %xmm2, %xmm1' sha256-compress.asm:201:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:203:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:207:no such instruction: `sha256msg2 %xmm3, %xmm4' sha256-compress.asm:208:no such instruction: `sha256msg1 %xmm3, %xmm2' sha256-compress.asm:213:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:215:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:219:no such instruction: `sha256msg2 %xmm4, %xmm1' sha256-compress.asm:220:no such instruction: `sha256msg1 %xmm4, %xmm3' sha256-compress.asm:225:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:227:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:231:no such instruction: `sha256msg2 %xmm1, %xmm2' sha256-compress.asm:232:no such instruction: `sha256msg1 %xmm1, %xmm4' sha256-compress.asm:237:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:239:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:243:no such instruction: `sha256msg2 %xmm2, %xmm3' sha256-compress.asm:247:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:249:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha256-compress.asm:253:no such instruction: `sha256msg2 %xmm3, %xmm4' sha256-compress.asm:257:no such instruction: `sha256rnds2 %xmm5, %xmm6' sha256-compress.asm:259:no such instruction: `sha256rnds2 %xmm6, %xmm5' sha1-compress.asm:170:no such instruction: `sha1nexte %xmm0, %xmm5' sha1-compress.asm:172:no such instruction: `sha1msg2 %xmm0, %xmm1' sha1-compress.asm:173:no such instruction: `sha1rnds4 $2, %xmm5,%xmm4' sha1-compress.asm:174:no such instruction: `sha1msg1 %xmm0, %xmm3' sha1-compress.asm:178:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:180:no such instruction: `sha1msg2 %xmm1, %xmm2' sha1-compress.asm:181:no such instruction: `sha1rnds4 $2, %xmm6,%xmm4' sha1-compress.asm:182:no such instruction: `sha1msg1 %xmm1, %xmm0' sha1-compress.asm:186:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:188:no such instruction: `sha1msg2 %xmm2, %xmm3' sha1-compress.asm:189:no such instruction: `sha1rnds4 $2, %xmm5,%xmm4' sha1-compress.asm:190:no such instruction: `sha1msg1 %xmm2, %xmm1' sha1-compress.asm:195:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:197:no such instruction: `sha1msg2 %xmm3, %xmm0' sha1-compress.asm:198:no such instruction: `sha1rnds4 $3, %xmm6,%xmm4' sha1-compress.asm:199:no such instruction: `sha1msg1 %xmm3, %xmm2' sha1-compress.asm:203:no such instruction: `sha1nexte %xmm0, %xmm5' sha1-compress.asm:205:no such instruction: `sha1msg2 %xmm0, %xmm1' sha1-compress.asm:206:no such instruction: `sha1rnds4 $3, %xmm5,%xmm4' sha1-compress.asm:207:no such instruction: `sha1msg1 %xmm0, %xmm3' sha1-compress.asm:211:no such instruction: `sha1nexte %xmm1, %xmm6' sha1-compress.asm:213:no such instruction: `sha1msg2 %xmm1, %xmm2' sha1-compress.asm:214:no such instruction: `sha1rnds4 $3, %xmm6,%xmm4' sha1-compress.asm:217:no such instruction: `sha1nexte %xmm2, %xmm5' sha1-compress.asm:219:no such instruction: `sha1msg2 %xmm2, %xmm3' sha1-compress.asm:220:no such instruction: `sha1rnds4 $3, %xmm5,%xmm4' sha1-compress.asm:222:no such instruction: `sha1nexte %xmm3, %xmm6' sha1-compress.asm:224:no such instruction: `sha1rnds4 $3, %xmm6,%xmm4' sha1-compress.asm:226:no such instruction: `sha1nexte %xmm8, %xmm5' make[1]: *** [sha1-compress-2.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [sha256-compress-2.o] Error 1 make[1]: Leaving directory `/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.7.3' make: *** [all] Error 2 make: Leaving directory `/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.7.3' Command failed: cd "/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.7.3" && /usr/bin/make -j4 -w all Exit code: 2
comment:14 Changed 3 years ago by barracuda156
Summary: | nettle fails to build for x86_64 with gcc10-bootstrap: sha256-compress.asm:208:no such instruction → nettle fails to build for x86_64 with gcc10/gcc11: sha256-compress.asm:208:no such instruction |
---|
Changed 3 years ago by barracuda156
comment:15 Changed 3 years ago by barracuda156
UPD. It has built with --disable-assembler
config arg added.
macmini:bin svacchanda$ ./port -v installed nettle The following ports are currently installed: nettle @3.7.3_0 (active) requested_variants='' platform='darwin 10' archs='x86_64' date='2022-05-10T11:13:31+0800'
comment:16 follow-up: 19 Changed 3 years ago by barracuda156
Replying to ryandesign:
It's definitely specific to x86_64. These are x86_64 instructions it's complaining about. I found some references to the fact that this can be caused by too-old binutils, even if gcc is new enough:
https://github.com/randombit/botan/commit/86e75d060d5353778fea1d65ef7cb0efba4c2a9c
Maybe we could add a case for Intel build with gcc
in nettle
portfile? --disable-assembler
makes it work.
comment:17 Changed 3 years ago by barracuda156
Summary: | nettle fails to build for x86_64 with gcc10/gcc11: sha256-compress.asm:208:no such instruction → nettle fails to build for x86_64 with gcc10/gcc11: sha256-compress.asm:208:no such instruction (fix: add --disable-assembler) |
---|
comment:18 Changed 3 years ago by kencu (Ken)
for now, disabling the (failing) assembly is by far the easiest solution.
The only other solution available would be to install some new version of clang to use as the assembler, use MacPorts cctools (which uses that newer version of clang to assemble) and then force gcc10-bootstrap to use MacPorts cctools AS instead of /usr/bin/as as the assembler to make it all work.
Life is too short. Just disable assembly for this Frankenstein and then "Move along folks, nothing to see here ..."
comment:19 Changed 3 years ago by kencu (Ken)
Replying to barracuda156:
Maybe we could add a case for Intel build with
gcc
innettle
portfile?--disable-assembler
makes it work.
IMHO, we would not want to do that in general, as it would cripple the 99.9999999% of users who want a fast nettle to support 0.00000000001% of users who want to do something offbeat.
Just do that in your own local repo, and we'll leave macports alone.
Even when building with gcc, you can use MacPorts assembler to use a newer clang to assemble.
It's just this gcc10-bootstrap mess that has been created.
comment:20 Changed 3 years ago by kencu (Ken)
So:
Workarounds in the portfiles for these really off-piste corner cases should almost never be considered. They make the ports unmaintainable in general.
What is reasonable is generally applicable fixes for logic errors in Portfiles, and you have found a few of those. But testing whether the compiler is gcc10-bootstrap and disabling assembly if so is not a reasonable ask.
Please be circumspect in what you ask people to do. Supporting 10.6 to build PPC code is for an offshoot repo, not for the main macports repo. 1000 tickets about how ports don't build as PPC on SnowLeopard is not going to get anyone to fix that.
Homebrew outright trashed all universal building, all variants, all ports with github repos with < 100 (I think) forks, all ports that are not actively maintained upstram, and all systems except the last 3. That makes it very maintainable...
comment:21 Changed 2 years ago by barracuda156
nettle
still fails with gcc12
on 10.6.8 x86_64
:
ghash-set-key-2.s:66:no such instruction: `pclmullqhqdq %xmm0, %xmm2' make[1]: *** [ghash-set-key-2.o] Error 1 make[1]: *** Waiting for unfinished jobs.... ghash-update-2.s:101:no such instruction: `pclmullqlqdq %xmm3, %xmm7' ghash-update-2.s:102:no such instruction: `pclmullqhqdq %xmm3, %xmm5' ghash-update-2.s:103:no such instruction: `pclmulhqlqdq %xmm2, %xmm4' ghash-update-2.s:104:no such instruction: `pclmulhqhqdq %xmm2, %xmm6' ghash-update-2.s:110:no such instruction: `pclmullqhqdq %xmm0, %xmm7' /opt/x86_64/bin/gcc-mp-12 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT salsa20-2core.o -MD -MP -MF salsa20-2core.o.d -c salsa20-2core.s make[1]: *** [ghash-update-2.o] Error 1
comment:22 follow-up: 23 Changed 2 years ago by kencu (Ken)
if any clang >= clang-5.0 is installed, that will be used as the assembler.
we haven't required that, as there usually is such a beast installed.
comment:23 Changed 2 years ago by barracuda156
Replying to kencu:
if any clang >= clang-5.0 is installed, that will be used as the assembler.
we haven't required that, as there usually is such a beast installed.
Ultimately this is not a Macports fault, of course – it is badly written software (nettle), which assumes for granted some proprietary Clang functionality instead of checking which compiler is used and adjusting settings accordingly. (I do have an opinion that any software that builds from C/C++ must build with GCC, at least for supported archs, otherwise it is a garbage coding. But again, not Macports fault, but upstream one.)
comment:24 follow-ups: 25 26 Changed 17 months ago by aeiouaeiouaeiouaeiouaeiouaeiou
Is this still happening on the latest version (3.9.1)?
comment:25 Changed 17 months ago by barracuda156
Replying to aeiouaeiouaeiouaeiouaeiouaeiou:
Is this still happening on the latest version (3.9.1)?
I will need to check that.
comment:26 Changed 17 months ago by barracuda156
Replying to aeiouaeiouaeiouaeiouaeiouaeiou:
Is this still happening on the latest version (3.9.1)?
Yes, it is as broken on x86 as before:
/opt/x86_64/bin/gcc-mp-12 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT cbc-aes192-encrypt-2.o -MD -MP -MF cbc-aes192-encrypt-2.o.d -c cbc-aes192-encrypt-2.s /usr/bin/m4 ./m4-utils.m4 ./asm.m4 config.m4 machine.m4 cbc-aes256-encrypt-2.asm >cbc-aes256-encrypt-2.s /usr/bin/m4 ./m4-utils.m4 ./asm.m4 config.m4 machine.m4 poly1305-blocks.asm >poly1305-blocks.s /opt/x86_64/bin/gcc-mp-12 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT cbc-aes256-encrypt-2.o -MD -MP -MF cbc-aes256-encrypt-2.o.d -c cbc-aes256-encrypt-2.s /opt/x86_64/bin/gcc-mp-12 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT poly1305-blocks.o -MD -MP -MF poly1305-blocks.o.d -c poly1305-blocks.s /usr/bin/m4 ./m4-utils.m4 ./asm.m4 config.m4 machine.m4 ghash-set-key-2.asm >ghash-set-key-2.s /opt/x86_64/bin/gcc-mp-12 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT ghash-set-key-2.o -MD -MP -MF ghash-set-key-2.o.d -c ghash-set-key-2.s /usr/bin/m4 ./m4-utils.m4 ./asm.m4 config.m4 machine.m4 ghash-update-2.asm >ghash-update-2.s /usr/bin/m4 ./m4-utils.m4 ./asm.m4 config.m4 machine.m4 salsa20-2core.asm >salsa20-2core.s /opt/x86_64/bin/gcc-mp-12 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT ghash-update-2.o -MD -MP -MF ghash-update-2.o.d -c ghash-update-2.s ghash-set-key-2.s:70:no such instruction: `pclmullqhqdq %xmm0, %xmm4' ghash-set-key-2.s:77:no such instruction: `pclmulhqlqdq %xmm2, %xmm4' ghash-set-key-2.s:78:no such instruction: `pclmulhqhqdq %xmm2, %xmm6' ghash-set-key-2.s:79:no such instruction: `pclmullqlqdq %xmm3, %xmm7' ghash-set-key-2.s:80:no such instruction: `pclmullqhqdq %xmm3, %xmm2' ghash-set-key-2.s:86:no such instruction: `pclmullqhqdq %xmm0, %xmm7' ghash-set-key-2.s:92:no such instruction: `pclmullqhqdq %xmm0, %xmm2' /opt/x86_64/bin/gcc-mp-12 -I. -I/opt/x86_64/include -DHAVE_CONFIG_H -pipe -Os -arch x86_64 -ggdb3 -Wall -W -Wno-sign-compare -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT salsa20-2core.o -MD -MP -MF salsa20-2core.o.d -c salsa20-2core.s make[1]: *** [ghash-set-key-2.o] Error 1 make[1]: *** Waiting for unfinished jobs.... ghash-update-2.s:108:no such instruction: `pclmullqlqdq %xmm5, %xmm9' ghash-update-2.s:109:no such instruction: `pclmullqhqdq %xmm5, %xmm7' ghash-update-2.s:110:no such instruction: `pclmulhqlqdq %xmm4, %xmm6' ghash-update-2.s:111:no such instruction: `pclmulhqhqdq %xmm4, %xmm8' ghash-update-2.s:119:no such instruction: `pclmullqlqdq %xmm3, %xmm13' ghash-update-2.s:120:no such instruction: `pclmullqhqdq %xmm3, %xmm11' ghash-update-2.s:121:no such instruction: `pclmulhqlqdq %xmm2, %xmm10' ghash-update-2.s:122:no such instruction: `pclmulhqhqdq %xmm2, %xmm12' ghash-update-2.s:134:no such instruction: `pclmullqhqdq %xmm0, %xmm9' ghash-update-2.s:151:no such instruction: `pclmullqlqdq %xmm3, %xmm9' ghash-update-2.s:152:no such instruction: `pclmullqhqdq %xmm3, %xmm7' ghash-update-2.s:153:no such instruction: `pclmulhqlqdq %xmm2, %xmm6' ghash-update-2.s:154:no such instruction: `pclmulhqhqdq %xmm2, %xmm8' ghash-update-2.s:160:no such instruction: `pclmullqhqdq %xmm0, %xmm9' make[1]: *** [ghash-update-2.o] Error 1 make[1]: Leaving directory `/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.9.1' make: *** [all] Error 2 make: Leaving directory `/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.9.1' Command failed: cd "/opt/x86_64/var/macports/build/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/work/nettle-3.9.1" && /usr/bin/make -j4 -w all Exit code: 2 Error: Failed to build nettle: command execution failed Error: See /opt/x86_64/var/macports/logs/_opt_x86_64_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nettle/nettle/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
This may be due to:
Unless I remove this blacklist, Macports ignores the setting to use
gcc10-bootstrap
to build.