<mps>
would someone on gitter type one message, I'm trying to rewrite irssi triggers to rewrite gitter messages
<FromGitter>
<straight-shoota> one message
<mps>
thanks
elf_fortrez has quit [Quit: Client closed]
<FromGitter>
<rishavs> two message
<mps>
also thanks
<FromGitter>
<lebogan> Hi. After a lot of head scratching and mild cussing, I finally managed to compile crystal 1.0.0 on a Raspberry Pi 4 running Raspbian Buster 10. Why? Cuz Crystal is cool. `crystal -v` shows the version minus the compile date. Ok. When I try to build an application I get this error: `Error: can't find file 'prelude'` 'prelude' is located in /usr/share/crystal/src. How do I tell crystal that? Thanks
<FromGitter>
<RespiteSage> What's the output of `crystal env`?
<FromGitter>
<RespiteSage> Huh. I'd expect that to work, then.
<FromGitter>
<RespiteSage> Maybe try deleting everything in that cache directory?
<FromGitter>
<Blacksmoke16> `ls /usr/share/crystal/src/` prints what?
<FromGitter>
<lebogan> ls prints a lot .cr files including prelude
<FromGitter>
<RespiteSage> What's the command you're using to compile? And does this happen with an empty source file?
<FromGitter>
<RespiteSage> Also, you only have the one crystal binary that you're using, right?
<FromGitter>
<lebogan> Just a test hello.cr with puts "Hello". I have only one binary.
<FromGitter>
<lebogan> I built the binary using llvm-7. Is this a problem?
<FromGitter>
<RespiteSage> I'm really not sure. I know the most recent LLVM release that Crystal is definitely compatible with is LLVM 11. I'm not sure what the earliest is.
<FromGitter>
<RespiteSage> And I have no idea how it would affect the prelude.
<FromGitter>
<RespiteSage> Or whether it would.
<FromGitter>
<RespiteSage> I'm sorry, I have to go now, else I'd try to help you more to figure out what's wrong. Good luck.
notzmv has quit [Ping timeout: 256 seconds]
<straight-shoota>
The error is definitely that the compiler can't find the stdlib source code
<straight-shoota>
Maybe try `CRYSTAL_PATH=/usr/share/crystal/src/ crystal build` (even though it already reports this path)
<FromGitter>
<Blacksmoke16> is it possible its a symlink and something doesnt follow those?
<straight-shoota>
Yeah, some file system trouble could be a reason for this not working
<FromGitter>
<lebogan> I removed the cache.
<FromGitter>
<lebogan> I ran `CRYSTAL_PATH=/usr/share/crystal/src/ crystal run ./hello.cr ` ⏎ Now I'm getting a different error like: Invalid memory access (signal 11) at address 0x0 ⏎ [0xb1cea8] ??? ⏎ [0xa4c2bc] __crystal_sigfault_handler +148 ⏎ Invalid memory access (signal 11) at address 0x0 Error: execution of command failed with code: 1: `cc "${@}" -o /home/pi/.cache/crystal/crystal-run-hello.tmp -rdynamic
<straight-shoota>
Well it seems that at least found you your stdlib sources
<straight-shoota>
It seems weird tho that there's supposedly an invalid memory access in Crystal code while executing cc
<FromGitter>
<lebogan> I'm going to redo all this using llvm-9 instead of 7. Shot in the dark.
notzmv has joined #crystal-lang
ur5us has joined #crystal-lang
mps has quit [Ping timeout: 265 seconds]
mps has joined #crystal-lang
<FromGitter>
<lebogan> Ok. So I can cross-compile apps and the Portalier version 0.33.0 works. Thanks @Blacksmoke16 , @RespiteSage , straight-shoota for all your help. 1.0.0 would be nice though.
<FromGitter>
<Blacksmoke16> wait
<FromGitter>
<Blacksmoke16> what happens if you remove the `/usr/share/crystal/src/ext/libcrystal.a`
<FromGitter>
<Blacksmoke16> pretty sure in 1.0.0 that is no longer used so maybe it's causing issues?
<FromGitter>
<Daniel-Worrall> 1) 0 still uses it, 1.1 has it removed