Opened 2 years ago

Last modified 17 months ago

#64037 assigned defect

openssl3: build failure on macOS 10.8

Reported by: mascguy (Christopher Nielsen) Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: fredowski, cjones051073 (Chris Jones)
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 (1)

openssl3-build-failure-10.8.log.xz (76.7 KB) - added by mascguy (Christopher Nielsen) 2 years ago.

Download all attachments as: .zip

Change History (9)

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

Description: modified (diff)

Changed 2 years ago by mascguy (Christopher Nielsen)

comment:2 Changed 2 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 2 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:4 Changed 2 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 17 months 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 17 months ago by barracuda156 (previous) (diff)

comment:6 Changed 17 months 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 17 months 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 17 months ago by barracuda156 (previous) (diff)

comment:8 Changed 17 months 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 ?

Note: See TracTickets for help on using tickets.