Skip to content

Getting started new example throws error on M1 chip #49

@sshquack

Description

@sshquack

I tried the create new example per docs on macOS arm64 and it throws the following error.

Steps to reproduce

❯ craftsman new:example

─────────────────────────────────────── Create an Example Project ────────────────────────────────────────
What would you like to name this project (e.g. MyExampleProject)? Craftsman01
File scaffolding for RecipeManagement was successful.
Database Migrations for RecipeManagement were successful.
TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an
exception.
      In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment
     variable: dlopen(libgit2-106a5f2, 0x0001): tried: 'libgit2-106a5f2' (no such file),
     '/usr/local/lib/libgit2-106a5f2' (no such file), '/usr/lib/libgit2-106a5f2' (no such file),
     '/Users/me/Desktop/code/csharp/libgit2-106a5f2' (no such file),
     '/usr/local/lib/libgit2-106a5f2' (no such file), '/usr/lib/libgit2-106a5f2' (no such file)
       at git_libgit2_init()
       at InitializeNativeLibrary()
       at cctor()
  at git_repository_init_ext(git_repository*& repository, FilePath path, GitRepositoryInitOptions options)
  at git_repository_init_ext(FilePath workdirPath, FilePath gitdirPath, Boolean isBare)
  at Init(String path, Boolean isBare)
  at Init(String path)
  at GitSetup(String solutionDirectory) in Utilities.cs:393
  at CreateNewDomainProject(String domainDirectory, IFileSystem fileSystem, DomainProject domainProject)
     in NewDomainProjectCommand.cs:115
  at Run(String buildSolutionDirectory, IFileSystem fileSystem) in NewExampleCommand.cs:41

Further technical details

Craftsman version (dotnet tool list -g):

❯ dotnet tool list -g
Package Id      Version      Commands
--------------------------------------
craftsman       0.12.3       craftsman
dotnet-ef       6.0.1        dotnet-ef

Environment info

❯ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.101
 Commit:    ef49f6213a

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  12.1
 OS Platform: Darwin
 RID:         osx.12-arm64
 Base Path:   /usr/local/share/dotnet/sdk/6.0.101/

Host (useful for support):
  Version: 6.0.1
  Commit:  3a25a7f1cc

.NET SDKs installed:
  6.0.101 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Git version

❯ git --version
git version 2.34.1

Libgit2 info

❯ brew info libgit2
libgit2: stable 1.3.0 (bottled), HEAD
C library of Git core methods that is re-entrant and linkable
https://libgit2.github.com/
/opt/homebrew/Cellar/libgit2/1.3.0 (102 files, 3.5MB) *
  Poured from bottle on 2021-12-21 at 11:05:13
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libgit2.rb
License: GPL-2.0-only
==> Dependencies
Build: cmake ✘, pkg-config ✔
Required: libssh2 ✔
==> Options
--HEAD
        Install HEAD version
==> Analytics
install: 5,007 (30 days), 23,757 (90 days), 60,775 (365 days)
install-on-request: 1,839 (30 days), 12,159 (90 days), 31,213 (365 days)
build-error: 0 (30 days)

I tried this with few different example type (BasicAuth, FK) and they all throw the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions