vinivendra / Gryphon

The Swift to Kotlin translator.
https://vinivendra.github.io/Gryphon/
Other
609 stars 46 forks source link

Error while installing Gryphon on Apple M1 #108

Closed guilhermeluisdomingues closed 3 years ago

guilhermeluisdomingues commented 3 years ago

Describe the bug While installing Gryphon in M1 an error occurred to get the architecture name.

How to reproduce it brew install vinivendra/gryphon/gryphon

Your environment (please complete the following information):

Screenshots and code snippets

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
func-e                                                                                     mariadb@10.5                                                                               scorecard
==> Updated Formulae
Updated 920 formulae.

==> Installing gryphon from vinivendra/gryphon
==> Downloading https://rubygems.org/downloads/xcodeproj-1.16.0.gem
Already downloaded: /Users/guilhermedomingues/Library/Caches/Homebrew/downloads/9e7f02841e532e6e0113019acaa6459ebb34d50c4f4f856356ef4d38cfa5e2d4--xcodeproj-1.16.0.gem
==> Downloading https://github.com/vinivendra/Gryphon/archive/v0.16.tar.gz
Already downloaded: /Users/guilhermedomingues/Library/Caches/Homebrew/downloads/5ff2214a8d1ebc56496434a959011d68dfd375f19bb926c9b467d376e38e46a0--Gryphon-0.16.tar.gz
==> Downloading https://rubygems.org/downloads/xcodeproj-1.16.0.gem
Already downloaded: /Users/guilhermedomingues/Library/Caches/Homebrew/downloads/9e7f02841e532e6e0113019acaa6459ebb34d50c4f4f856356ef4d38cfa5e2d4--xcodeproj-1.16.0.gem
==> gem install --install-dir /opt/homebrew/Cellar/gryphon/0.16/libexec/vendor /Users/guilhermedomingues/Library/Caches/Homebrew/downloads/9e7f02841e532e6e0113019acaa6459ebb34d50c4f4f856356ef4d38cfa5e2d4--xcodeproj-1.16.0.gem --no-document
==> swift build --disable-sandbox
Last 15 lines from /Users/guilhermedomingues/Library/Logs/Homebrew/gryphon/02.swift:
[125/137] Compiling GryphonLib Utilities.swift
/private/tmp/gryphon-20210712-18791-1xs9dae/Gryphon-0.16/Sources/GryphonLib/Utilities.swift:213:62: error: cannot find 'architecture' in scope
        public static let systemIdentifier: String = osName + "-" + architecture
                                                                    ^~~~~~~~~~~~
[126/137] Compiling GryphonLib AuxiliaryFileContents.swift
[127/137] Compiling GryphonLib Compiler.swift
[128/137] Compiling GryphonLib Driver.swift
[129/137] Compiling GryphonLib SourceFile.swift
[130/137] Compiling GryphonLib SwiftSyntaxDecoder.swift
[131/137] Compiling GryphonLib Extensions.swift
[132/137] Compiling GryphonLib GryphonAST.swift
[133/137] Compiling GryphonLib GryphonSwiftLibrary.swift
[134/137] Compiling GryphonLib GryphonType.swift
[135/137] Compiling GryphonLib KotlinTranslationResult.swift
[136/137] Compiling GryphonLib KotlinTranslator.swift

Do not report this issue to Homebrew/brew or Homebrew/core!
vinivendra commented 3 years ago

Hi @guilhermeluisdomingues, thanks for reporting this bug!

When I created this code there was no M1, so I never considered Gryphon could run on an ARM architecture 😅

It should be fixed now but I don't have an M1 to test it with. Could you try installing with brew install vinivendra/gryphon/gryphon --HEAD and telling me if it works?

guilhermeluisdomingues commented 3 years ago

Hey @vinivendra, it works now! Thank you so much 😄