I’m not able to run a simple program by using archlinux binaries from the community repository. I was able to run crystal scripts in the past without issues.
➜ ~ uname -a
Linux marcos-arch 5.4.32-1-lts #1 SMP Mon, 13 Apr 2020 12:21:10 +0000 x86_64 GNU/Linux
➜ ~ crystal -v
Crystal 0.34.0 (2020-04-07)
LLVM: 9.0.1
Default target: x86_64-pc-linux-gnu
➜ ~ cat test.cr
pp “hi”
➜ ~ crystal test.cr
/usr/bin/ld: /usr/local/lib/libgc.a(alloc.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(blacklst.o): relocation R_X86_64_32 against
.rodata.str1.1’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(finalize.o): relocation R_X86_64_32 against símboloGC_ll_hashtbl' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(headers.o): relocation R_X86_64_32S against símbolo
GC_arrays’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(malloc.o): relocation R_X86_64_32 against símboloGC_allocate_ml' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(mallocx.o): relocation R_X86_64_32S against símbolo
GC_obj_kinds’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(mark.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(mark_rts.o): relocation R_X86_64_32 against símbolo
GC_arrays’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(misc.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(new_hblk.o): relocation R_X86_64_32S against símbolo
GC_obj_kinds’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(obj_map.o): relocation R_X86_64_32S against símboloGC_arrays' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(os_dep.o): relocation R_X86_64_32 against símbolo
GC_jmp_buf’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(reclaim.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(thread_local_alloc.o): relocation R_X86_64_32 against símbolo
GC_arrays’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(pthread_support.o): relocation R_X86_64_32 against símboloGC_inner_start_routine' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(pthread_stop_world.o): relocation R_X86_64_32 against
.rodata.str1.1’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(allchblk.o): relocation R_X86_64_32S against símboloGC_obj_kinds' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(dbg_mlc.o): relocation R_X86_64_32 against símbolo
GC_check_heap_block’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(dyn_load.o): relocation R_X86_64_32S against.bss' can not be used when making un objeto PIE; recompile with -fPIE /usr/bin/ld: /usr/local/lib/libgc.a(gcj_mlc.o): relocation R_X86_64_32 against símbolo
GC_allocate_ml’ can not be used when making un objeto PIE; recompile with -fPIE
/usr/bin/ld: /usr/local/lib/libgc.a(mach_dep.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making un objeto PIE; recompile with -fPIE collect2: error: ld devolvió el estado de salida 1 Error: execution of command failed with code: 1:
cc “${@}” -o ‘/home/marcos/.cache/crystal/crystal-run-test.tmp’ -rdynamic -lpcre -lm /usr/local/lib/libgc.a -lpthread /usr/lib/crystal/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`
Gc version
➜ ~ pacman -Qi gc |grep Versión
Versión : 8.0.4-3
Same error happens if I try to compile from source.