crt.cr
crt.cr copied to clipboard
Error running on Ubuntu
(I originally thought it's related to another repo - https://github.com/lbarasti/twitch-url-checker/issues/1)
crystal src/url-checker.cr
/usr/bin/ld: cannot find -lgpm (this usually means you need to install the development package for libgpm)
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/oren/.cache/crystal/crystal-run-url-checker.tmp' -rdynamic -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'` -lyaml -lpcre -lm /usr/bin/../lib/crystal/lib/libgc.a -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -lncursesw -ltinfo -lgpm -ldl -L/usr/bin/../lib/crystal/lib -L/usr/lib -L/usr/local/lib`
I tried installing the following but I already had them installed (:
sudo apt-get install libgmp3-dev
sudo apt-get install -y libgmp-dev
Any ideas?
Installing this solved my issue
apt-get install libgpm-dev # needs only for static link
but the only example that works is color.cr. hello.cr prints nothing and border.cr shows:
In /home/oren/p/crystal/crt.cr/src/crt/window.cr:6:20
6 | def initialize(@row = -1, @col = -1, y = 0, x = 0)
^---
Error: instance variable '@row' of Crt::Window must be Int32, not Float64
~/p/crystal/crt.cr/examples crystal color.cr
~/p/crystal/crt.cr/examples crystal hello.cr
~/p/crystal/crt.cr/examples crystal border.cr
Showing last frame. Use --error-trace for full trace.
In /home/oren/p/crystal/crt.cr/src/crt/window.cr:6:20
6 | def initialize(@row = -1, @col = -1, y = 0, x = 0)
^---
Error: instance variable '@row' of Crt::Window must be Int32, not Float64
Hi @oren Updated for crystal-0.32.1. Could you try 0.4.1? 🙏
I see an improvement! the borer.cr seems to work (i see two rectangles). So now hello.cr and the code from the README don't work. BTW, I see similar issue in other ncurses libraries - https://github.com/agatan/ncurses.cr/issues/10