Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 13.2.1 M2 processor brew install openssl error #20372

Closed
rstrazza opened this issue Feb 24, 2023 · 15 comments
Closed

macOS 13.2.1 M2 processor brew install openssl error #20372

rstrazza opened this issue Feb 24, 2023 · 15 comments
Labels
resolved: answered The issue contained a question which has been answered triaged: question The issue contains a question

Comments

@rstrazza
Copy link

I'm trying to install openssl@1.1 via brew, and it's failing during the make step.

OS

  • macOS Venture 13.2.1
  • Apple M2 Max
Darwin mbp 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020 arm64

Brew

Homebrew 4.0.3-140-gba8fd26
Homebrew/homebrew-core (git revision 955021b2c36; last commit 2023-02-24)
Homebrew/homebrew-cask (git revision 080a0c1e1c; last commit 2023-02-24)

Issue when running brew install openssl@1.1 or any formulae that depends on openssl@1.1 such as openjdk or gradle:

==> Fetching openssl@1.1
Warning: Building openssl@1.1 from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Users/someuser/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Users/someuser/homebrew)
==> Downloading https://www.openssl.org/source/openssl-1.1.1t.tar.gz
Already downloaded: /Users/someuser/Library/Caches/Homebrew/downloads/ec3feb171aa63b32c30a6e7423e78f743f92d1ef984b66b0ea548d08220c0ce6--openssl-1.1.1t.tar.gz
==> perl ./Configure --prefix=/Users/someuser/homebrew/Cellar/openssl@1.1/1.1.1t --openssldir=/Users/someuser/homebrew/etc/openssl@1.1 no-ssl3 no-ssl3-method no-zlib darwin64-arm64-cc enable-ec_nistp_64_gcc_128
==> make
Last 15 lines from /Users/someuser/Library/Logs/Homebrew/openssl@1.1/02.make:
clang  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/Users/someuser/homebrew/etc/openssl@1.1\"" -DENGINESDIR="\"/Users/someuser/homebrew/Cellar/openssl@1.1/1.1.1t/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_pk1.d.tmp -MT crypto/rsa/rsa_pk1.o -c -o crypto/rsa/rsa_pk1.o crypto/rsa/rsa_pk1.c
clang  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/Users/someuser/homebrew/etc/openssl@1.1\"" -DENGINESDIR="\"/Users/someuser/homebrew/Cellar/openssl@1.1/1.1.1t/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_pmeth.d.tmp -MT crypto/rsa/rsa_pmeth.o -c -o crypto/rsa/rsa_pmeth.o crypto/rsa/rsa_pmeth.c
clang  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/Users/someuser/homebrew/etc/openssl@1.1\"" -DENGINESDIR="\"/Users/someuser/homebrew/Cellar/openssl@1.1/1.1.1t/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_prn.d.tmp -MT crypto/rsa/rsa_prn.o -c -o crypto/rsa/rsa_prn.o crypto/rsa/rsa_prn.c
clang  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/Users/someuser/homebrew/etc/openssl@1.1\"" -DENGINESDIR="\"/Users/someuser/homebrew/Cellar/openssl@1.1/1.1.1t/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_pss.d.tmp -MT crypto/rsa/rsa_pss.o -c -o crypto/rsa/rsa_pss.o crypto/rsa/rsa_pss.c
clang  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/Users/someuser/homebrew/etc/openssl@1.1\"" -DENGINESDIR="\"/Users/someuser/homebrew/Cellar/openssl@1.1/1.1.1t/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_saos.d.tmp -MT crypto/rsa/rsa_saos.o -c -o crypto/rsa/rsa_saos.o crypto/rsa/rsa_saos.c
make[1]: *** [crypto/rsa/rsa_none.o] Killed: 9
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [crypto/rsa/rsa_pmeth.o] Killed: 9
make[1]: *** [crypto/rsa/rsa_lib.o] Killed: 9
make[1]: *** Deleting file `crypto/rsa/rsa_lib.o'
make[1]: *** [crypto/rsa/rsa_pss.o] Killed: 9
make[1]: *** [crypto/rsa/rsa_pk1.o] Killed: 9
make[1]: *** Deleting file `crypto/rsa/rsa_pk1.o'
/bin/sh: line 1: 66575 Killed: 9               cmp crypto/rsa/rsa_gen.d.tmp crypto/rsa/rsa_gen.d > /dev/null 2> /dev/null
make: *** [all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

These open issues may also help:
openssl@1.1: make keg_only on Linux https://github.com/Homebrew/homebrew-core/pull/119967

Thanks for any help in advance!

@rstrazza rstrazza added the issue: bug report The issue was opened to report a bug label Feb 24, 2023
@tom-cosgrove-arm
Copy link
Contributor

tom-cosgrove-arm commented Feb 25, 2023

Trying to reproduce this, on a clean macOS Ventura 13.2.1 VM, running on an M2 Pro Mac mini, brew install openssl@1.1 works fine

m2 $ sw_vers -productVersion; sysctl -n machdep.cpu.brand_string; uname -a
13.2.1
Apple M2 Pro
Darwin m2.local 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020 arm64

m2-vm $ sw_vers -productVersion; sysctl -n machdep.cpu.brand_string; uname -a
13.2.1
Apple M2 Pro (Virtual)
Darwin m2-vm.local 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:37:48 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_VMAPPLE arm64

m2-vm $ brew install openssl@1.1
==> Fetching dependencies for openssl@1.1: ca-certificates
==> Fetching ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2023-01-10
##################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:11fe9d0a98a2ac454fa1db95762a697c3340f46560ff27e5e9db8fdeb003f1
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:11fe9d0a98a2ac454fa1db95762a697c3340f46560ff27e5e9db8fd
##################################################################################################################################### 100.0%
==> Fetching openssl@1.1
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1t
##################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:e1e08ddd93298ef8776b202e4b2f86fc519bf27a72f7cfb082b69ff2868a0175
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:e1e08ddd93298ef8776b202e4b2f86fc519bf27a72f7cfb082b69ff
##################################################################################################################################### 100.0%
==> Installing dependencies for openssl@1.1: ca-certificates
==> Installing openssl@1.1 dependency: ca-certificates
==> Pouring ca-certificates--2023-01-10.all.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using:
  brew postinstall ca-certificates
==> Summary
🍺  /opt/homebrew/Cellar/ca-certificates/2023-01-10: 3 files, 216.9KB
==> Installing openssl@1.1
==> Pouring openssl@1.1--1.1.1t.arm64_ventura.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using:
  brew postinstall openssl@1.1
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /opt/homebrew/etc/openssl@1.1/certs

and run
  /opt/homebrew/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides LibreSSL.

If you need to have openssl@1.1 first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"' >> ~/.kshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"

==> Summary
🍺  /opt/homebrew/Cellar/openssl@1.1/1.1.1t: 8,101 files, 18MB
==> Running `brew cleanup openssl@1.1`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> openssl@1.1
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /opt/homebrew/etc/openssl@1.1/certs

and run
  /opt/homebrew/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides LibreSSL.

If you need to have openssl@1.1 first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"' >> ~/.kshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"

@tom-cosgrove-arm
Copy link
Contributor

Since the OP's brew install was trying to compile openssl-1.1.1t from source, try that separately, also on M2 Pro Mac mini.

That also completes successfully with no errors

m2 $ curl -sOL https://www.openssl.org/source/openssl-1.1.1t.tar.gz
m2 $ tar xfz openssl-1.1.1t.tar.gz
m2 $ cd openssl-1.1.1t

m2 $ perl ./Configure no-ssl3 no-ssl3-method no-zlib darwin64-arm64-cc enable-ec_nistp_64_gcc_128
Configuring OpenSSL version 1.1.1t (0x1010114fL) for darwin64-arm64-cc
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************

m2 $ make -j8
perl "-I." -Mconfigdata "util/dofile.pl" \
	    "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
perl "-I." -Mconfigdata "util/dofile.pl" \
	    "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
perl "-I." -Mconfigdata "util/dofile.pl" \
	    "-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
/Library/Developer/CommandLineTools/usr/bin/make depend && /Library/Developer/CommandLineTools/usr/bin/make _all
cc  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c
cc  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF apps/apps.d.tmp -MT apps/apps.o -c -o apps/apps.o apps/apps.c
:
:
${LDCMD:-cc} -arch arm64 -O3 -Wall -L. -Wl,-search_paths_first  \
		-o test/uitest test/uitest.o \
		 apps/libapps.a -lssl test/libtestutil.a -lcrypto
rm -f apps/openssl
rm -f fuzz/asn1-test
${LDCMD:-cc} -arch arm64 -O3 -Wall -L. -Wl,-search_paths_first  \
		-o fuzz/asn1-test fuzz/asn1.o fuzz/test-corpus.o \
		 -lssl -lcrypto
${LDCMD:-cc} -arch arm64 -O3 -Wall -L. -Wl,-search_paths_first  \
		-o apps/openssl apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o apps/ocsp.o apps/openssl.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o apps/rsa.o apps/rsautl.o apps/s_client.o apps/s_server.o apps/s_time.o apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/storeutl.o apps/ts.o apps/verify.o apps/version.o apps/x509.o \
		 apps/libapps.a -lssl -lcrypto

m2 $ echo $?
0

@tom-cosgrove-arm
Copy link
Contributor

The last few compile lines in the OP's post were also present in the log when building successfully from source

cc  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_pk1.d.tmp -MT crypto/rsa/rsa_pk1.o -c -o crypto/rsa/rsa_pk1.o crypto/rsa/rsa_pk1.c
cc  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_pmeth.d.tmp -MT crypto/rsa/rsa_pmeth.o -c -o crypto/rsa/rsa_pmeth.o crypto/rsa/rsa_pmeth.c
cc  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_prn.d.tmp -MT crypto/rsa/rsa_prn.o -c -o crypto/rsa/rsa_prn.o crypto/rsa/rsa_prn.c
cc  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_pss.d.tmp -MT crypto/rsa/rsa_pss.o -c -o crypto/rsa/rsa_pss.o crypto/rsa/rsa_pss.c
cc  -I. -Iinclude -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -MMD -MF crypto/rsa/rsa_saos.d.tmp -MT crypto/rsa/rsa_saos.o -c -o crypto/rsa/rsa_saos.o crypto/rsa/rsa_saos.c

However, the OP's log ends with

/bin/sh: line 1: 66575 Killed: 9               cmp crypto/rsa/rsa_gen.d.tmp crypto/rsa/rsa_gen.d > /dev/null 2> /dev/null

and there are no "cmp " lines in the build of OpenSSL 1.1.1t from source, suggesting that these come from Homebrew.

@tom-cosgrove-arm
Copy link
Contributor

tom-cosgrove-arm commented Feb 25, 2023

In summary, Homebrew can successfully install OpenSSL 1.1.1t on an M2 Mac, and OpenSSL 1.1.1t can be successfully built from source on an M2 Mac, so there is something in the OP's setup that is causing this problem

Warning: Building openssl@1.1 from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Users/someuser/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Users/someuser/homebrew)

I also see that https://docs.brew.sh/Installation says

Untar anywhere (unsupported)
Technically, you can just extract (or git clone) Homebrew wherever you want. However, you shouldn’t install outside the default, supported, best prefix. Many things will need to be built from source outside the default prefix. Building from source is slow, energy-inefficient, buggy and unsupported.

@tom-cosgrove-arm
Copy link
Contributor

Last try: After installing Homebrew into the unsupported directory /Users/tom on the M2 VM, following the instructions at https://docs.brew.sh/Installation, Homebrew still successfully builds OpenSSL 1.1.1t.

m2-vm $ git clone https://github.com/Homebrew/brew homebrew
Cloning into 'homebrew'...
remote: Enumerating objects: 228752, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 228752 (delta 8), reused 8 (delta 6), pack-reused 228707
Receiving objects: 100% (228752/228752), 65.32 MiB | 7.92 MiB/s, done.
Resolving deltas: 100% (168264/168264), done.

m2-vm $ eval "$(homebrew/bin/brew shellenv)"

m2-vm $ brew update --force --quiet
==> Homebrew has enabled anonymous aggregate formula and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).

==> Tapping homebrew/core
Cloning into '/Users/tom/homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1424384, done.
remote: Counting objects: 100% (307/307), done.
remote: Compressing objects: 100% (129/129), done.
remote: Total 1424384 (delta 188), reused 292 (delta 178), pack-reused 1424077
Receiving objects: 100% (1424384/1424384), 546.47 MiB | 8.49 MiB/s, done.
Resolving deltas: 100% (993233/993233), done.
Tapped 3 commands and 6538 formulae (6,890 files, 601.1MB).

m2-vm $ chmod -R go-w "$(brew --prefix)/share/zsh"

m2-vm $ brew install openssl@1.1
==> Fetching openssl@1.1
Warning: Building openssl@1.1 from source as the bottle needs:
- HOMEBREW_CELLAR: /opt/homebrew/Cellar (yours is /Users/tom/homebrew/Cellar)
- HOMEBREW_PREFIX: /opt/homebrew (yours is /Users/tom/homebrew)
==> Downloading https://www.openssl.org/source/openssl-1.1.1t.tar.gz
Already downloaded: /home/tom/Library/Caches/Homebrew/downloads/ec3feb171aa63b32c30a6e7423e78f743f92d1ef984b66b0ea548d08220c0ce6--openssl-1.1.1t.tar.gz
==> perl ./Configure --prefix=/Users/tom/homebrew/Cellar/openssl@1.1/1.1.1t --openssldir=/Users/tom/homebrew/etc/openssl@1.1 no-ssl3 no-ssl3
==> make
==> make install MANDIR=/Users/tom/homebrew/Cellar/openssl@1.1/1.1.1t/share/man MANSUFFIX=ssl
==> make test
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /Users/tom/homebrew/etc/openssl@1.1/certs

and run
  /Users/tom/homebrew/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /Users/tom/homebrew,
because macOS provides LibreSSL.

If you need to have openssl@1.1 first in your PATH, run:
  echo 'export PATH="/Users/tom/homebrew/opt/openssl@1.1/bin:$PATH"' >> ~/.kshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/Users/tom/homebrew/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/Users/tom/homebrew/opt/openssl@1.1/include"

==> Summary
🍺  /Users/tom/homebrew/Cellar/openssl@1.1/1.1.1t: 8,094 files, 18.0MB, built in 2 minutes 22 seconds
==> Running `brew cleanup openssl@1.1`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

m2-vm $ echo $?
0

This appears to be a local issue on the OP's machine: Homebrew successfully installs OpenSSL 1.1.1t, will build it for an (unsupported) non-standard installation directory, and OpenSSL 1.1.1t builds successfully on its own, on Apple Silicon M2 system.

@rstrazza
Copy link
Author

@tom-cosgrove-arm thank you so much for your time and detailed validation!

I had performed the same brew unsupported install steps as you described and tried once again with a clean setup but still had the same error. The one line that caught my attention between yours and mine is this one:

Yours:

==> perl ./Configure --prefix=/Users/tom/homebrew/Cellar/openssl@1.1/1.1.1t --openssldir=/Users/tom/homebrew/etc/openssl@1.1 no-ssl3 no-ssl3

Mine:

==> perl ./Configure --prefix=/Users/someuser/homebrew/Cellar/openssl@1.1/1.1.1t --openssldir=/Users/rbortoloto/homebrew/etc/openssl@1.1 no-ssl3 no-ssl3-method no-zlib darwin64-arm64-cc enable-ec_nistp_64_gcc_128

Not sure if that makes any difference, but as you pointed this appears to be a local environment issue associated with the brew install and not a problem with openssl.

Thank you!

@tom-cosgrove-arm
Copy link
Contributor

Hi, I see you've closed this now, but if you are still having problems, it would be helpful to look for any "error" lines from the Homebrew build logs and include them here

@rstrazza
Copy link
Author

Reopening per @tom-cosgrove-arm's suggestion to document the solution. Also posted this issue to stack overflow: https://stackoverflow.com/questions/75562209/macos-13-2-1-m2-processor-brew-install-openssl-error

@rstrazza rstrazza reopened this Feb 27, 2023
@tom-cosgrove-arm
Copy link
Contributor

Looking again, it seems from Last 15 lines from /Users/someuser/Library/Logs/Homebrew/openssl@1.1/02.make: that the build logs are in /Users/someuser/Library/Logs/Homebrew/openssl@1.1/, so if you could attach them here we can look for errors (or possible "permission denied"s)

@t8m t8m added triaged: question The issue contains a question resolved: answered The issue contained a question which has been answered and removed issue: bug report The issue was opened to report a bug labels Mar 1, 2023
@rstrazza
Copy link
Author

This was an issue with the user setup process on a company-provided Mac. I'm now able to install openssl.

@Ivopires
Copy link

Hi @rstrazza! Sorry for opening this issue after all this time.

But myself and a couple of coworkers, are facing a similar issue to yours. Could you please elaborate on the solution found?

Thanks in advance 🙏🏼

@jack338c
Copy link

@tom-cosgrove-arm
for some reason I want install openssl 1.0 on my intel mac mini ventura 13.3.1,but always no luck
Could you help me,
thank you
`jack6@jack6s-Mac-mini ~ % brew install openssl@1.0
==> Downloading https://formulae.brew.sh/api/formula.jws.json
-=O=- # # # #
Error: Formulae found in multiple taps:
* sidneys/homebrew/openssl@1.0
* rbenv/tap/openssl@1.0

Please use the fully-qualified name (e.g. sidneys/homebrew/openssl@1.0) to refer to the formula.
jack6@jack6s-Mac-mini ~ % brew install rbenv/tap/openssl@1.0
==> Fetching rbenv/tap/openssl@1.0
==> Downloading https://www.openssl.org/source/openssl-1.0.2t.tar.gz
Already downloaded: /Users/jack6/Library/Caches/Homebrew/downloads/5d2da6a9ed1a20ef9d1b1418d79aa674cf5577b70ca1ce436fdaadfa04f0429c--openssl-1.0.2t.tar.gz
==> Installing openssl@1.0 from rbenv/tap
==> perl ./Configure --prefix=/usr/local/Cellar/openssl@1.0/1.0.2t --openssldir=/usr/local/etc/openssl no-ssl2 no-ssl3 no-
==> make depend
==> make
==> make test
Last 15 lines from /Users/jack6/Library/Logs/Homebrew/openssl@1.0/04.make:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994:
140704585241580:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968:
140704585241580:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968:
140704585241580:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968:
make[1]: *** [test_ec] Error 1
make: *** [tests] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
https://github.com/rbenv/homebrew-tap/issues

These open issues may also help:
brew install rbenv/tap/openssl@1.0 not working anymore rbenv/homebrew-tap#1
jack6@jack6s-Mac-mini ~ % `

@rstrazza
Copy link
Author

Hi @rstrazza! Sorry for opening this issue after all this time.

But myself and a couple of coworkers, are facing a similar issue to yours. Could you please elaborate on the solution found?

Thanks in advance 🙏🏼

@Ivopires, apologies for the delayed reply. In my case, the problem was with my user permissions. One of my colleagues had a similar issue, and he solved it by doing the following:

"Not a home directory solution. Most tools only seem to work when Homebrew is in /opt. However, I was able to do a sudo mkdir /opt/homebrew. Then do a sudo tar copy of my "Untar Anywhere" install from my home directory into /opt/homebrew"

@piotrekk10
Copy link

piotrekk10 commented Jun 30, 2023

@tom-cosgrove-arm for some reason I want install openssl 1.0 on my intel mac mini ventura 13.3.1,but always no luck Could you help me, thank you `jack6@jack6s-Mac-mini ~ % brew install openssl@1.0 ==> Downloading https://formulae.brew.sh/api/formula.jws.json -=O=- # # # # Error: Formulae found in multiple taps: * sidneys/homebrew/openssl@1.0 * rbenv/tap/openssl@1.0

Please use the fully-qualified name (e.g. sidneys/homebrew/openssl@1.0) to refer to the formula. jack6@jack6s-Mac-mini ~ % brew install rbenv/tap/openssl@1.0 ==> Fetching rbenv/tap/openssl@1.0 ==> Downloading https://www.openssl.org/source/openssl-1.0.2t.tar.gz Already downloaded: /Users/jack6/Library/Caches/Homebrew/downloads/5d2da6a9ed1a20ef9d1b1418d79aa674cf5577b70ca1ce436fdaadfa04f0429c--openssl-1.0.2t.tar.gz ==> Installing openssl@1.0 from rbenv/tap ==> perl ./Configure --prefix=/usr/local/Cellar/openssl@1.0/1.0.2t --openssldir=/usr/local/etc/openssl no-ssl2 no-ssl3 no- ==> make depend ==> make ==> make test Last 15 lines from /Users/jack6/Library/Logs/Homebrew/openssl@1.0/04.make: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 140704585241580:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: 140704585241580:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: 140704585241580:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: make[1]: *** [test_ec] Error 1 make: *** [tests] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core): https://github.com/rbenv/homebrew-tap/issues

These open issues may also help: brew install rbenv/tap/openssl@1.0 not working anymore rbenv/homebrew-tap#1 jack6@jack6s-Mac-mini ~ % `

I had similiar issue with my MacBook Pro M1 recently. Try this:

  1. Remove all tap's for openssl
  2. Download curl -Lo openssl@1.0.rb https://raw.githubusercontent.com/rbenv/homebrew-tap/e472b7861b49cc082d1db0f66f265368da107589/Formula/openssl%401.0.rb
  3. Edit this file -> add # sign to the line system "make", "test" (comment out)
  4. Install openssl with brew install --formula --build-from-source ./openssl@1.0.rb
  5. Add to path in my example I'm adding this path export PATH="/opt/homebrew/Cellar/openssl@1.0/1.0.2u/bin:$PATH" to .zshrc
  6. Do source ~/.zshrc and check if path/version is correct which openssl, openssl version

@Selacy
Copy link

Selacy commented Jul 14, 2023

(base) selassie@Selassies-MacBook-Pro ~ % conda install -c "bioconda/label/cf201901" samtools
Collecting package metadata (current_repodata.json): failed

CondaSSLError: OpenSSL appears to be unavailable on this machine. OpenSSL is required to
download and install packages.

Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /bioconda/label/cf201901/osx-64/current_repodata.json (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

@rstrazza I tried all the steps and still getting this error, any help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved: answered The issue contained a question which has been answered triaged: question The issue contains a question
Projects
None yet
Development

No branches or pull requests

7 participants