添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

After the (default) crystal version is updated to 0.31.0, linking against libgc.a will fail, in this and this builds.

$ crystal spec
/usr/bin/ld: /usr/bin/../lib/crystal/lib/libgc.a(alloc.o): unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/travis/.cache/crystal/crystal-run-spec.tmp' -rdynamic -lpcre -lm /usr/bin/../lib/crystal/lib/libgc.a -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/bin/../lib/crystal/lib -L/usr/lib -L/usr/local/lib`
The command "crystal spec" exited with 1.

One of builds (tempdir) uses default Travis CI environment, Ubuntu Trusty. Another build (crystal-rpm) uses CentOS 6 (rpm-4.8.1) and Fedora 22 (rpm-4.12.0.1) via Docker is also failing with same error.

Although, I’ve not tested outside of Travis CI.

/cc @jhass, @bcardiff, (limited for new user’s restriction)

This problem is very similar to this article which is for Go: