Skip to content

Run, Build and Test generate warnings on M1 Macs "ld: warning: ignoring file [...], building for macOS-x86_64 but attempting to link with file built for unknown-arm64" #25

@bolandross

Description

@bolandross

Running a .cr file from the command line works fine, but inside this TextMate bundle, I am receiving a bunch of warnings:

ld: warning: ignoring file I-nt32.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file A-rgumentE-rror.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file I-nt64.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64

...
etc. finally resulting in:

attempting to link with file built for unknown-arm64
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: execution of command failed with code: 1: cc "${@}" -o /Users/bolandross/.cache/crystal/crystal-run-main.tmp -rdynamic -L/opt/homebrew/Cellar/crystal/1.6.0/libexec/../../../../lib -lgc -L/opt/homebrew/Cellar/libevent/2.1.12/lib -levent -liconv

any ideas how to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions