Closed skaji closed 3 years ago
Hi @skaji
I have just uploaded a release (1.903 / 1.9.3) with your proposed patch. I do not have access to a Apple M1 or a newer brew
install, could you please test it when possible and report any issues.
Thanks for your issue report and patch.
I was able to install Crypt-OpenSSL-X509-1.903. @jonasbn Thank you!
❯ wget https://cpan.metacpan.org/authors/id/J/JO/JONASBN/Crypt-OpenSSL-X509-1.903.tar.gz
❯ tar xf Crypt-OpenSSL-X509-1.903.tar.gz
❯ cd Crypt-OpenSSL-X509-1.903
❯ perl Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Crypt::OpenSSL::X509
Writing MYMETA.yml and MYMETA.json
❯ make
cp X509.pm blib/lib/Crypt/OpenSSL/X509.pm
Running Mkbootstrap for X509 ()
chmod 644 "X509.bs"
"/Users/skaji/env/plenv/versions/5.32.1/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- X509.bs blib/arch/auto/Crypt/OpenSSL/X509/X509.bs 644
"/Users/skaji/env/plenv/versions/5.32.1/bin/perl" "-Iinc" "/Users/skaji/env/plenv/versions/5.32.1/lib/perl5/5.32.1/ExtUtils/xsubpp" -typemap '/Users/skaji/env/plenv/versions/5.32.1/lib/perl5/5.32.1/ExtUtils/typemap' -typemap '/Users/skaji/try/20210404/Crypt-OpenSSL-X509-1.903/typemap' X509.xs > X509.xsc
Warning: Aliases 'subject_hash' and 'hash' have identical values in X509.xs, line 422
mv X509.xsc X509.c
cc -c -I/opt/homebrew/opt/openssl@1.1/include -fno-common -DPERL_DARWIN -mmacosx-version-min=11.2 -fno-strict-aliasing -pipe -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -Wno-error=implicit-function-declaration -O2 -g -Wall -Werror -Wno-deprecated-declarations -DVERSION=\"1.903\" -DXS_VERSION=\"1.903\" "-I/Users/skaji/env/plenv/versions/5.32.1/lib/perl5/5.32.1/darwin-2level/CORE" X509.c
rm -f blib/arch/auto/Crypt/OpenSSL/X509/X509.bundle
LD_RUN_PATH="/opt/homebrew/opt/openssl@1.1/lib" cc -mmacosx-version-min=11.2 -bundle -undefined dynamic_lookup -fstack-protector-strong X509.o -o blib/arch/auto/Crypt/OpenSSL/X509/X509.bundle \
-L/opt/homebrew/opt/openssl@1.1/lib -lcrypto -lssl \
chmod 755 blib/arch/auto/Crypt/OpenSSL/X509/X509.bundle
❯ make test
"/Users/skaji/env/plenv/versions/5.32.1/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- X509.bs blib/arch/auto/Crypt/OpenSSL/X509/X509.bs 644
PERL_DL_NONLAZY=1 "/Users/skaji/env/plenv/versions/5.32.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00-version.t t/pod.t t/utf8.t t/x509-ec.t t/x509.t
t/00-version.t .. # Running Crypt::OpenSSL::X509 test suite against LibreSSL 2.8.3
t/00-version.t .. ok
t/pod.t ......... ok
t/utf8.t ........ ok
t/x509-ec.t ..... ok
t/x509.t ........ ok
All tests successful.
Files=5, Tests=76, 2 wallclock secs ( 0.03 usr 0.01 sys + 0.24 cusr 0.09 csys = 0.37 CPU)
Result: PASS
❯ make install
"/Users/skaji/env/plenv/versions/5.32.1/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- X509.bs blib/arch/auto/Crypt/OpenSSL/X509/X509.bs 644
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /Users/skaji/env/plenv/versions/5.32.1/lib/perl5/site_perl/5.32.1/darwin-2level/auto/Crypt/OpenSSL/X509/X509.bundle
Installing /Users/skaji/env/plenv/versions/5.32.1/lib/perl5/site_perl/5.32.1/darwin-2level/Crypt/OpenSSL/X509.pm
Appending installation info to /Users/skaji/env/plenv/versions/5.32.1/lib/perl5/5.32.1/darwin-2level/perllocal.pod
❯ perl -MCrypt::OpenSSL::X509\ 999999
Crypt::OpenSSL::X509 version 999999 required--this is only version 1.903.
BEGIN failed--compilation aborted.
Description
The default path of homebrew for M1 Mac has been changed from
/usr/local
to/opt/homebrew
. As a result, we cannot build perl-crypt-openssl-x509 on M1 Mac.I think we can follow https://github.com/radiator-software/p5-net-ssleay/pull/158 :
Expected behaviour
Successfully build perl-crypt-openssl-x509 on M1 Mac
Actual behaviour
Failed to build perl-crypt-openssl-x509 on M1 Mac
Operating system and version
M1 Mac
Crypt::OpenSSL::X509 version
1.902
Perl version
5.32.1
OpenSSL version
1.1.1k
Output, if available
Step by step guide to reproducing the issue