crystal-community / icr

Interactive console for Crystal programming language
MIT License
505 stars 40 forks source link

Fails to build on macOS #93

Closed martinffx closed 6 years ago

martinffx commented 6 years ago

I've installed the latest Crystal via homebrew:

crystal -v
Crystal 0.24.1 (2018-01-27)

LLVM: 5.0.1
Default target: x86_64-apple-macosx

And have installed all the required libraries:

xcode-select --install
brew install \
  bdw-gc \
  gmp \
  libevent \
  libxml2 \
  libyaml \
  llvm
brew link llvm --force

And am getting the following error when running make:

$ make
/usr/local/bin/crystal build --release --no-debug -o bin/icr src/icr/cli.cr
Package libssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libssl' found
Package libcrypto was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcrypto.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcrypto' found

How do I get the required openssl libs into my PKG_CONFIG_PATH path?

jwoertink commented 6 years ago

I have this in my .bash_profile

export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
veelenga commented 6 years ago

Relates to https://github.com/crystal-lang/crystal/issues/4745.

@jwoertink I was able to reproduce it locally and can confirm your comment solves the issue.

Thank you.