ruby-build: 2.5.1 fails on FreeBSD 12.0 when using gcc
On a fresh installation of FreeBSD 12.0, ruby-build fails with the following error:
$ rbenv install 2.5.1
Downloading ruby-2.5.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.bz2
Installing ruby-2.5.1...
BUILD FAILED (FreeBSD 12.0-RELEASE using ruby-build 20180822)
Inspect or clean up the working tree at /tmp/ruby-build.20181227204543.15196
Results logged to /tmp/ruby-build.20181227204543.15196.log
Last 10 log lines:
>>> probes.o:(.eh_frame): SHT_X86_64_UNWIND
>>> output section .eh_frame: SHT_PROGBITS
*** [ruby-glommed.o] Error code 1
make: stopped in /tmp/ruby-build.20181227204543.15196/ruby-2.5.1
--- transdb.h ---
transdb.h updated
1 error
make: stopped in /tmp/ruby-build.20181227204543.15196/ruby-2.5.1
The full build log is:
ruby-build.20181227204543.15196.log
A workaround that works for me is to force clang use with CC=clang rbenv install 2.5.1
.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (2 by maintainers)
The problem seems to be with DTrace support, specifically by the following lines in the Makefile, generated with a default
./configure
(FreeBSD 12.0-RELEASE-p2):The link is dead, and lost to time (couldn’t find it at archive.org either).
If you’re ok with ruby without DTrace support, you can build it with:
I’ve only tested this on FreeBSD 12, installing ruby 2.6.0