crystal woe

in /usr/local/Cellar/crystal-lang/0.23.0/src/callstack.cr:1: while requiring “c/dlfcn”: can’t find file ‘c/dlfcn’ relative to ‘/usr/local/Cellar/crystal-lang/0.23.0/src’

require “c/dlfcn”
^

A-1007536:jstacker packrd$ crystal build parse_jstack.cr –cross-compile –target “x86_64-unknown-linux-gnu”

 

meant “you passed in an unknown target”

ffmpeg cross compile woes

mp3lame woe

 

i686-w64-mingw32-ranlib .libs/libmpgdecoder.a
creating libmpgdecoder.la
(cd .libs && rm -f libmpgdecoder.la && ln -s ../libmpgdecoder.la libmpgdecoder.la)
make[2]: Leaving directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git/mpglib’
Making all in libmp3lame
make[2]: Entering directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git/libmp3lame’
Making all in i386
make[3]: Entering directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git/libmp3lame/i386’
test -d .libs || mkdir .libs
test -d .libs || mkdir .libs
echo ‘# Generated by ltmain.sh – GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)’ >choose_table.lo
mkdir: cannot create directory ‘.libs’: File exists
Makefile:490: recipe for target ‘cpu_feat.lo’ failed
make[3]: *** [cpu_feat.lo] Error 1
make[3]: *** Waiting for unfinished jobs….
echo “pic_object=’.libs/choose_table.o'” >>choose_table.lo
echo “non_pic_object=’.libs/choose_table.o'” >>choose_table.lo
/usr/bin/nasm -f win32 -DWIN32 -i ../../libmp3lame/i386/ choose_table.nas -o .libs/choose_table.o -l choose_table.lo.lst
choose_table.nas:24: warning: label alone on a line without a colon might be in error
abinit.o
i686-w64-mingw32-ranlib .libs/libmpgdecoder.a
creating libmpgdecoder.la
(cd .libs && rm -f libmpgdecoder.la && ln -s ../libmpgdecoder.la libmpgdecoder.la)
make[2]: Leaving directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git/mpglib’
Making all in libmp3lame
make[2]: Entering directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git/libmp3lame’
Making all in i386
make[3]: Entering directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git/libmp3lame/i386’
test -d .libs || mkdir .libs
test -d .libs || mkdir .libs
echo ‘# Generated by ltmain.sh – GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)’ >choose_table.lo
mkdir: cannot create directory ‘.libs’: File exists
Makefile:490: recipe for target ‘cpu_feat.lo’ failed
make[3]: *** [cpu_feat.lo] Error 1
make[3]: *** Waiting for unfinished jobs….
echo “pic_object=’.libs/choose_table.o'” >>choose_table.lo
echo “non_pic_object=’.libs/choose_table.o'” >>choose_table.lo
/usr/bin/nasm -f win32 -DWIN32 -i ../../libmp3lame/i386/ choose_table.nas -o .libs/choose_table.o -l choose_table.lo.lst
choose_table.nas:24: warning: label alone on a line without a colon might be in error
choose_table.nas:78: warning: label alone on a line without a colon might be in error
choose_table.nas:102: warning: label alone on a line without a colon might be in error
choose_table.nas:109: warning: label alone on a line without a colon might be in error
choose_table.nas:341: warning: label alone on a line without a colon might be in error
choose_table.nas:353: warning: label alone on a line without a colon might be in error
choose_table.nas:414: warning: label alone on a line without a colon might be in error
choose_table.nas:426: warning: label alone on a line without a colon might be in error
choose_table.nas:447: warning: label alone on a line without a colon might be in error
make[3]: Leaving directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git/libmp3lame/i386’
Makefile:492: recipe for target ‘all-recursive’ failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git/libmp3lame’
Makefile:312: recipe for target ‘all-recursive’ failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory ‘/root/ffmpeg-windows-build-helpers/sandbox/win32/lame_git’
Makefile:240: recipe for target ‘all’ failed
make: *** [all] Error 2

after doing make again it “worked fine” so I presume this meant

meant “don’t build it multi thread (make -j ..) , it can conflict…” 😐

java woe

SEVERE: Servlet /webapp_name threw load() exception
java.lang.ArrayIndexOutOfBoundsException: 53882
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)

meant this

 

crystal lang namedtuple to a block

 

Try to pass namedtuple to a block to dereference it, get:

fails with “too many block arguments (given 2, expected maximum 1)”

fix seems to be “either use tuple”: https://groups.google.com/d/msg/crystal-lang/kkbE8jfBldM/-xS1zbukBAAJ

Or use “values” maybe?

[{first: ‘a’, second: ‘b’}].each do |both|
first, second = both.values # strongly type checked, but still a bit confusing/annoying to not know what the order is coming out of #values you have to lookup the definition 😐
end

linksys how to configure as a secondary router

This one is tricky.

I couldn’t even get to 192.168.1.1 when I had it “hooked in”

fix: reboot it, unplug it from “the network”, then hook up a plug from your laptop to it (could use wifi), then password admin on 192.168.1.1 works.

First option: just go in there and “disable dhcp” on it.

It’ll work but it will be super non trivial to be able to ever get back to it (assuming your normal router is on 192.168.0.1 type network).

If you ever want to change settings you’d have to reset the thing and start over from scratch, at the top here.

So if you want to still be able to access it,

go to router settings -> connectivity -> local network

and now “assign” it an IP address there that’s within your normal network, but *isn’t assigned out* by the other router.  So if the other router’s DHCP will be assigning out from

192.168.0.100 -> 192.168.0.199

and the router itself is on 192.168.0.1 (it probably is)

then one option: assign it 192.168.0.2 and disable dhcp, plug it back in to the “real” network, you’d theoretically be golden.

Unfortunately in order to be able to assign it to 192.168.0.2 linksys isn’t smart enough to realize you turned of DHCP so it requires those settings to “be close to but not overlap” its own IP address even if DHCP is disabled.

So set dhcp start ip address to 192.168.0.3

and now it should let you save by hitting OK.

Oh I forgot when it first comes up it will say “your router is not connected to the internet”

factory reset, then choose “manual setup” after checking the license agreements.

Phew!

Roger's meanderings, notes to himself, bug reports, and other things