Opened 3 years ago

Closed 11 days ago

#64037 closed defect (wontfix)

openssl3 @3.0.0: error: invalid instruction mnemonic 'adcxq'

Reported by: mascguy (Christopher Nielsen) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: mountainlion Cc: fredowski, cjones051073 (Chris Jones), RobK88
Port: openssl3

Description (last modified by mascguy (Christopher Nielsen))

I'm seeing the following build failure on my macOS 10.8 VM, with Xcode/CLT 5.1.1:

info:build /usr/bin/clang  -I. -Icrypto -Iinclude -Iproviders/implementations/include -Iproviders/common/include  -DMD5_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -fPIC -arch x86_64 -pipe -Os -arch x86_64 -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/opt/local/libexec/openssl3/etc/openssl\"" -DENGINESDIR="\"/opt/local/libexec/openssl3/lib/engines-3\"" -DMODULESDIR="\"/opt/local/libexec/openssl3/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -I/opt/local/include -MMD -MF crypto/bn/liblegacy-lib-rsaz_exp.d.tmp -MT crypto/bn/liblegacy-lib-rsaz_exp.o -c -o crypto/bn/liblegacy-lib-rsaz_exp.o crypto/bn/rsaz_exp.c
:info:build crypto/bn/rsaz-x86_64.s:418:2: error: invalid instruction mnemonic 'adcxq'
:info:build  adcxq %rcx,%r9
:info:build  ^~~~~
[...more of the same...]

:info:build  adcxq %r/usr/bin/clang  -I. -Icrypto -Iinclude -Iproviders/implementations/include -Iproviders/common/include  -DMD5_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -fPIC -arch x86_64 -pipe -Os -arch x86_64 -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/opt/local/libexec/openssl3/etc/openssl\"" -DENGINESDIR="\"/opt/local/libexec/openssl3/lib/engines-3\"" -DMODULESDIR="\"/opt/local/libexec/openssl3/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -I/opt/local/include -MMD -MF crypto/bn/liblegacy-lib-rsaz_exp_x2.d.tmp -MT crypto/bn/liblegacy-lib-rsaz_exp_x2.o -c -o crypto/bn/liblegacy-lib-rsaz_exp_x2.o crypto/bn/rsaz_exp_x2.c
:info:build crypto/bn/rsaz-x86_64.s:1092:2: error: invalid instruction mnemonic 'adcxq'
:info:build  adcxq %rbx,%r13
:info:build  ^~~~~
[...more of the same...]

Note that updating the portfile to blacklist older Xcode clangs solves the issue.

However, given that our 10.8 buildbot is running Xcode 5.1.1 as well - and builds succeed there - thus far I've chalked it up to quirks in my particular 10.8 setup.

Also of note, this port builds successfully on every one of my other macOS VMs - including 10.6 and 10.7, as well as 10.9 through 10.15. It also builds successfully on my physical installations, for 10.12 through 10.15.

Attachments (2)

openssl3-build-failure-10.8.log.xz (76.7 KB) - added by mascguy (Christopher Nielsen) 3 years ago.
openssl_version_3.3.2_main.log (20.9 KB) - added by RobK88 5 weeks ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 3 years ago by mascguy (Christopher Nielsen)

Description: modified (diff)

Changed 3 years ago by mascguy (Christopher Nielsen)

comment:2 Changed 3 years ago by cjones051073 (Chris Jones)

Looks a bit similar to this old bug report

https://github.com/openssl/openssl/issues/494

Could you check to see if any of the suggestions there as to what might be wrong apply in your case for some weird reason ??

comment:3 Changed 3 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

See #47035 for a previous report of this. Seems like some cases were caused by a mismatch between Xcode and CLT versions, and/or bad clang version matching code in openssl scripts.

comment:5 Changed 2 years ago by barracuda156

It still fails on 10.8.5 with Xcode 5.1.1:

/usr/bin/clang -fPIC -arch x86_64 -pipe -Os -arch x86_64 -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/opt/bootstrap/libexec/openssl3/etc/openssl\"" -DENGINESDIR="\"/opt/bootstrap/libexec/openssl3/lib/engines-3\"" -DMODULESDIR="\"/opt/bootstrap/libexec/openssl3/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -I/opt/bootstrap/include -c -o crypto/bn/liblegacy-lib-rsaz-x86_64.o crypto/bn/rsaz-x86_64.s
/usr/bin/clang  -I. -Icrypto -Iinclude -Iproviders/implementations/include -Iproviders/common/include  -DMD5_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -fPIC -arch x86_64 -pipe -Os -arch x86_64 -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/opt/bootstrap/libexec/openssl3/etc/openssl\"" -DENGINESDIR="\"/opt/bootstrap/libexec/openssl3/lib/engines-3\"" -DMODULESDIR="\"/opt/bootstrap/libexec/openssl3/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -I/opt/bootstrap/include -MMD -MF crypto/bn/liblegacy-lib-rsaz_exp.d.tmp -MT crypto/bn/liblegacy-lib-rsaz_exp.o -c -o crypto/bn/liblegacy-lib-rsaz_exp.o crypto/bn/rsaz_exp.c
crypto/bn/rsaz-x86_64.s:418:2: error: invalid instruction mnemonic 'adcxq'
 adcxq %rcx,%r9
 ^~~~~
crypto/bn/rsaz-x86_64.s:421:2: error: invalid instruction mnemonic 'adcxq'
 adcxq %rax,%r10
 ^~~~~

make[1]: *** [crypto/bn/liblegacy-lib-rsaz-x86_64.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_openssl3/openssl3/work/openssl-3.0.6'
make: *** [build_sw] Error 2
Last edited 2 years ago by barracuda156 (previous) (diff)

comment:6 Changed 2 years ago by cjones051073 (Chris Jones)

Can you please check exact what version, and variants of, cctools and ld64 you have installed ?

comment:7 in reply to:  6 Changed 2 years ago by barracuda156

Replying to cjones051073:

Can you please check exact what version, and variants of, cctools and ld64 you have installed ?

None are dependencies of openssl:

10:bin svacchanda$ ./port rdeps openssl3
The following ports are dependencies of openssl3 @3.0.6_0+legacy:
  zlib
    xz
      gettext
        libiconv
          gperf
        libtextstyle
          ncurses
        gettext-runtime
        gettext-tools-libs

So whatever Xcode 5.1.1 has, I guess.

openssl1 also fails likewise, btw.

Last edited 2 years ago by barracuda156 (previous) (diff)

comment:8 Changed 2 years ago by cjones051073 (Chris Jones)

That is not what I asked.

Do you actually have them installed, regardless of if they are deps or not, and if so what versions and variants ?

comment:9 Changed 5 weeks ago by RobK88

The latest version of openssl (version 3.3.2_0) also fails to build on Mtn Lion with a different error. See attached main.log or see below.

P.S. I also tried using clang-15. Same problem.

openssl-3.3.2-x86_64'
:info:build /usr/bin/perl util/mkinstallvars.pl PREFIX=. BINDIR=apps APPLINKDIR=ms LIBDIR= INCLUDEDIR=include "INCLUDEDIR=./include" ENGINESDIR=engines MODULESDIR=providers "VERSION=3.3.2" "LDLIBS=-lz " > builddata.pm
:info:build /usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
:info:build "pairs" is not exported by the List::Util module
:info:build Can't continue after import errors at util/mkinstallvars.pl line 14
:info:build BEGIN failed--compilation aborted at util/mkinstallvars.pl line 14.
:info:build make: *** [builddata.pm] Error 255
:info:build make: *** Waiting for unfinished jobs....
:info:build Precedence problem: open local should be open(local) at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_openssl3/openssl3/work/openssl-3.3.2-x86_64/util/perl/OpenSSL/paramnames.pm line 672.
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_openssl3/openssl3/work/openssl-3.3.2-x86_64'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_openssl3/openssl3/work/openssl-3.3.2-x86_64" && /usr/bin/make -j2 -w all 
:info:build Exit code: 2
:error:build Failed to build openssl3: command execution failed
:debug:build Error code: NONE
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_openssl3/openssl3/main.log for details.

Changed 5 weeks ago by RobK88

comment:10 Changed 5 weeks ago by RobK88

FYI -- openssl3 @3.3.2_0 also fails to build on Lion (10.7.5) with the same error

comment:11 Changed 5 weeks ago by cjones051073 (Chris Jones)

I do not maintain this port.

comment:12 Changed 5 weeks ago by cjones051073 (Chris Jones)

Owner: cjones051073 deleted

comment:13 in reply to:  9 Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: RobK88 added
Keywords: mountainlion added
Summary: openssl3: build failure on macOS 10.8openssl3 @3.0.0: error: invalid instruction mnemonic 'adcxq'

Replying to RobK88:

The latest version of openssl (version 3.3.2_0) also fails to build on Mtn Lion with a different error.

Different errors belong in different tickets.

comment:14 Changed 5 weeks ago by RobK88

@ryandesign - Sorry...I will open a new ticket....

comment:15 Changed 11 days ago by neverpanic (Clemens Lang)

Resolution: wontfix
Status: assignedclosed

10.8 is outside of my support policy of (current-2;current). I will not investigate or fix this myself. Feel free to open a pull request if you find a solution.

Note: See TracTickets for help on using tickets.