The Crystal Programming Language Forum

Stripped binaries in distro? expected?

I noticed the binaries from “apt-get crystal” seem to be stripped. Is that expected? I would have imagined they wouldn’t be, since it makes bug reports less interesting :)

Cheers.

ex:

$ cat bad.cr
A
exit

A = [1, 2, 3]
$ crystal -v
Crystal 0.33.0 [612825a53] (2020-02-14)

LLVM: 8.0.0
Default target: x86_64-unknown-linux-gnu
$ crystal bad.cr
BUG: [1, 2, 3] at /home/joshua/bad.cr:4:5 should have been expanded (Exception)
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues
$ ./dev/crystal/bin/crystal bad.cr 
Using compiled compiler at dev/crystal/.build/crystal
BUG: [1, 2, 3] at /home/joshua/bad.cr:4:5 should have been expanded (Exception)
  from dev/crystal/src/compiler/crystal/codegen/codegen.cr:2166:7 in 'visit'
  from dev/crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
  from dev/crystal/src/compiler/crystal/codegen/codegen.cr:2162:7 in 'accept'
  from dev/crystal/src/compiler/crystal/codegen/const.cr:129:13 in 'create_initialize_const_function'
  from dev/crystal/src/compiler/crystal/codegen/const.cr:106:56 in 'initialize_const'
  from dev/crystal/src/compiler/crystal/codegen/const.cr:197:18 in 'create_read_const_function'
  from dev/crystal/src/compiler/crystal/codegen/const.cr:189:56 in 'read_const_pointer'
  from dev/crystal/src/compiler/crystal/codegen/const.cr:170:16 in 'read_const'
  from dev/crystal/src/compiler/crystal/codegen/codegen.cr:1377:9 in 'visit'
  from dev/crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
  from dev/crystal/src/compiler/crystal/codegen/codegen.cr:2162:7 in 'accept'
  from dev/crystal/src/compiler/crystal/codegen/codegen.cr:626:9 in 'visit'
  from dev/crystal/src/compiler/crystal/syntax/visitor.cr:27:12 in 'accept'
  from dev/crystal/src/compiler/crystal/codegen/codegen.cr:2162:7 in 'accept'
  from dev/crystal/src/compiler/crystal/codegen/codegen.cr:67:7 in 'codegen'
  from dev/crystal/src/compiler/crystal/codegen/codegen.cr:65:5 in 'codegen:debug:single_module'
  from dev/crystal/src/compiler/crystal/compiler.cr:22:7 in 'codegen'
  from dev/crystal/src/compiler/crystal/compiler.cr:170:16 in 'compile'
  from dev/crystal/src/compiler/crystal/command.cr:275:3 in 'compile'
  from dev/crystal/src/compiler/crystal/command.cr:191:14 in 'run_command'
  from dev/crystal/src/compiler/crystal/command.cr:106:7 in 'run'
  from dev/crystal/src/compiler/crystal/command.cr:49:5 in 'run'
  from dev/crystal/src/compiler/crystal/command.cr:48:3 in 'run'
  from dev/crystal/src/compiler/crystal.cr:8:1 in '__crystal_main'
  from dev/crystal/src/crystal/main.cr:106:5 in 'main_user_code'
  from dev/crystal/src/crystal/main.cr:92:7 in 'main'
  from dev/crystal/src/crystal/main.cr:115:3 in 'main'
  from __libc_start_main
  from _start
  from ???
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues