I posted a question on StackOverflow, but figured I’d probably get more visibility here, as I see the mailings, etc.
But here’s the stackoverflow link (I can post the answer when we get it resolved from here, etc):
https://stackoverflow.com/questions/79660994/crystal-build-error-issue-with-libgc-on-mac-os-15-5
here’s my question and context:
ran an into an error, compiling or running a crystal
with kemal
web framework getting started app:
$ crystal build --link-flags="~/.asdf/shims/crystal/embedded/lib/libgc.a" src/early-registration-api-cr.cr
clang: error: no such file or directory: '/Users/matt.swieboda@tastytrade.com/.asdf/shims/crystal/embedded/lib/libgc.a'
Error: execution of command failed with exit status 1: cc "${@}" -o /Users/matt.swieboda@tastytrade.com/.cache/crystal/Users-matt.swieboda@tastytrade.com-.asdf-installs-crystal-1.16.3-src-ecr-process.cr/macro_run ~/.asdf/shims/crystal/embedded/lib/libgc.a -rdynamic -lgc -liconv
I’m on Mac OS 15.5 Sequoia, on a work laptop, but permissions should be decently set (via asdf
they are fine. ~/.asdf/
has full permissions, as does the ~/dev/cr
directory my project is in. I’m using iTerm 2, and zsh
. If anyone needs more context/info, I can happily provide it.
here is a potential solution I looked up, but I think it’s for *NIX / UNIX
(and from 2016): execution of command failed with code: 1: `cc -o "/root/.cache/crystal/var-app-staging-new-http.cr
something with libgc
is the issue.
using asdf
and where crystal
outputs:
$ where crystal
/Users/matt***/.asdf/shims/crystal
also this is on a work laptop with Zscaler
, and to my knowledge no other libgc
is installed via my homebrew
for ex, but perhaps from Xcode
command line tools, etc maybe.
can anyone help? Trying to get crystal
over at the company I work for (Tastytrade, USA, based in Chicago, and parent company is IG in London, UK), to speed up the backend, and other interesting use-cases.
Thanks so much, in advance! I love the crystal community a lot, and happy to help contribute more and more to it.