shuppet / raku-api-discord

Raku module for interacting with the Discord API.
https://shuppet.com
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

zef install API::Discord failed on Apple M1 MacBook #54

Open deadshot465 opened 3 years ago

deadshot465 commented 3 years ago

Rakudo now already has a Apple Silicon formula on Homebrew, Zef also compiles without any problem, and running a simple Hello World Raku program also has no problem at all on Apple M1. However, when I tried to run zef install API::Discord, the following error message appeared:

===> Searching for: API::Discord
===> Updating fez mirror: http://360.zef.pm/
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated fez mirror: http://360.zef.pm/
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Searching for missing dependencies: Cro::WebSocket, Data::Dump, Object::Delayed, URI::Encode, Subset::Helper, Test::META
===> Searching for missing dependencies: META6:ver<0.0.24+>, URI, License::SPDX, Test::Output, Object::Trampoline:ver<0.0.9>:auth<cpan:ELIZABETH>, Cro::HTTP, Base64, Digest::SHA1::Native, Crypt::Random, JSON::Fast, OO::Monitors
===> Searching for missing dependencies: JSON::Class:ver<0.0.15+>, JSON::Name, IO::Socket::Async::SSL, IO::Path::ChildSecure, HTTP::HPACK, Cro::Core, Cro::TLS, JSON::JWT, DateTime::Parse, Log::Timeline, if, InterceptAllMethods:ver<0.0.1>:auth<cpan:ELIZABETH>, LibraryMake, Shell::Command, JSON::Class:ver<0.0.14+>
===> Searching for missing dependencies: File::Which, File::Find, OpenSSL, JSON::Marshal:ver<0.0.20+>, JSON::Unmarshal:ver<0.08+>, MIME::Base64, Digest::HMAC
===> Searching for missing dependencies: Digest
===> Building: Digest::SHA1::Native:ver<0.04>
[Digest::SHA1::Native] ld: library not found for -ltommath
[Digest::SHA1::Native] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[Digest::SHA1::Native] make: *** [/Users/deadshot465/.zef/store/p6-digest-sha1-native.git/e34d468341a572a7c089d672429cf88d21e07734/resources/libraries/libsha1.dylib] Error 1
[Digest::SHA1::Native] The spawned command '/usr/bin/make' exited unsuccessfully (exit code: 2, signal: 0)
[Digest::SHA1::Native]   in method build at /Users/deadshot465/.zef/store/p6-digest-sha1-native.git/e34d468341a572a7c089d672429cf88d21e07734/Build.pm line 14
[Digest::SHA1::Native]   in block <unit> at -e line 1
===> Building [FAIL]: Digest::SHA1::Native:ver<0.04>
Aborting due to build failure: Digest::SHA1::Native:ver<0.04> (use --force-build to override)

However, libtommath has already been installed via Homebrew. I think it has something to do with Digest::SHA1::Native dependency rather than raku-api-discord, but is there a workaround for it?

kawaii commented 3 years ago

I'm not at my laptop currently but I'll investigate this in a few hours. I have a feeling that some of the underlying dependencies for the Cro framework don't work on macOS yet though, as full Windows and macOS compatibility is planned for the 0.9 release of Cro.

deadshot465 commented 3 years ago

Thanks for the reply. I also tested on x86_64 MacBook, and it returns a different error message. If it helps:

===> Searching for: API::Discord
===> Updating fez mirror: http://360.zef.pm/
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated fez mirror: http://360.zef.pm/
===> Updated p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Searching for missing dependencies: Cro::WebSocket, Data::Dump, Object::Delayed, URI::Encode, Subset::Helper, Test::META
===> Searching for missing dependencies: Cro::HTTP, Base64, Digest::SHA1::Native, Crypt::Random, JSON::Fast, OO::Monitors, META6:ver<0.0.24+>, URI, License::SPDX, Test::Output, Object::Trampoline:ver<0.0.9>:auth<cpan:ELIZABETH>
===> Searching for missing dependencies: JSON::Class:ver<0.0.15+>, JSON::Name, JSON::Class:ver<0.0.14+>, if, LibraryMake, Shell::Command, IO::Socket::Async::SSL, IO::Path::ChildSecure, HTTP::HPACK, Cro::Core, Cro::TLS, JSON::JWT, DateTime::Parse, Log::Timeline, InterceptAllMethods:ver<0.0.1>:auth<cpan:ELIZABETH>
===> Searching for missing dependencies: JSON::Marshal:ver<0.0.20+>, JSON::Unmarshal:ver<0.08+>, MIME::Base64, OpenSSL, Digest::HMAC, File::Which, File::Find
===> Searching for missing dependencies: Digest
===> Building: Digest::SHA1::Native:ver<0.04>
===> Building [OK] for Digest::SHA1::Native:ver<0.04>
===> Testing: OpenSSL:ver<0.1.23>
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
[OpenSSL] WARNING: /usr/local/Cellar/rakudo/2021.02.1/bin/rakudo-m is loading libcrypto in an unsafe way
===> Testing [FAIL]: OpenSSL:ver<0.1.23>
Aborting due to test failure: OpenSSL:ver<0.1.23> (use --force-test to override)

Looks like Digest::SHA1::Native doesn't support Apple M1 yet, but it fails in tests when on x86_64 MacBook.