kemalcr / kemal

Fast, Effective, Simple Web Framework

Home Page:https://kemalcr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error running sample kemal app, crystal 1.0

greentornado opened this issue · comments

this is my error

± ~/work/sub_projects/crystal/kemal_app |master ?:8 ✗| → code .
→ shards install
Resolving dependencies
Fetching https://github.com/kemalcr/kemal.git
Fetching https://github.com/luislavena/radix.git
Fetching https://github.com/jeromegn/kilt.git
Fetching https://github.com/crystal-loot/exception_page.git
Installing radix (0.4.1)
Installing kilt (0.4.1)
Installing exception_page (0.1.5)
Installing kemal (1.0.0)
Writing shard.lock
± ~/work/sub_projects/crystal/kemal_app |master ?:9 ✗| → crystal run src/kemal_app.cr
→ crystal run src/kemal_app.cr
Undefined symbols for architecture x86_64:
  "_BIO_get_data", referenced from:
      _*OpenSSL::BIO::get_data<Pointer(LibCrypto::Bio)>:Pointer(Void) in O-penS-S-L-5858B-I-O-.o
  "_BIO_meth_new", referenced from:
      _~OpenSSL::BIO::CRYSTAL_BIO:init in _main.o
  "_BIO_meth_set_create", referenced from:
      _~OpenSSL::BIO::CRYSTAL_BIO:init in _main.o
  "_BIO_meth_set_ctrl", referenced from:
      _~OpenSSL::BIO::CRYSTAL_BIO:init in _main.o
  "_BIO_meth_set_destroy", referenced from:
      _~OpenSSL::BIO::CRYSTAL_BIO:init in _main.o
  "_BIO_meth_set_read_ex", referenced from:
      _~OpenSSL::BIO::CRYSTAL_BIO:init in _main.o
  "_BIO_meth_set_write_ex", referenced from:
      _~OpenSSL::BIO::CRYSTAL_BIO:init in _main.o
  "_BIO_set_data", referenced from:
      _*OpenSSL::BIO::set_data<Pointer(LibCrypto::Bio), Pointer(Void)>:Nil in O-penS-S-L-5858B-I-O-.o
  "_BIO_set_init", referenced from:
      _~procProc(Pointer(LibCrypto::Bio), Int32)@/usr/local/Cellar/crystal/1.0.0/src/openssl/bio.cr:67 in _main.o
  "_BIO_set_shutdown", referenced from:
      _~procProc(Pointer(LibCrypto::Bio), Int32)@/usr/local/Cellar/crystal/1.0.0/src/openssl/bio.cr:67 in _main.o
  "_SSL_CTX_set1_param", referenced from:
      _*OpenSSL::SSL::Context::Server@OpenSSL::SSL::Context#default_verify_param=<String>:Nil in O-penS-S-L-5858S-S-L-5858C-ontext5858S-erver.o
  "_SSL_CTX_set_options", referenced from:
      _*OpenSSL::SSL::Context::Server@OpenSSL::SSL::Context#add_options<LibSSL::Options>:LibSSL::Options in O-penS-S-L-5858S-S-L-5858C-ontext5858S-erver.o
  "_TLS_method", referenced from:
      _*OpenSSL::SSL::Context::default_method:Pointer(Void) in O-penS-S-L-5858S-S-L-5858C-ontext.o
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/Hai/.cache/crystal/crystal-run-kemal_app.tmp  -rdynamic -L/usr/local/lib -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lpcre -lgc -lpthread /usr/local/Cellar/crystal/1.0.0/src/ext/libcrystal.a -L/usr/local/Cellar/libevent/2.1.12/lib -levent -liconv -ldl`

I just running a simple kemal app

require "kemal"

# TODO: Write documentation for `KemalApp`
module KemalApp
  VERSION = "0.1.0"

  # TODO: Put your code here

  get "/" do
    "Hello World!"
  end

  Kemal.run
end

Not a Kemal issue. See crystal-lang/crystal#9477.

Not a Kemal issue. See crystal-lang/crystal#9477.

Thanks