Reputation: 11
I'm trying to build an alpine:3.4 image with ruby 1.9.3 using rvm but I get the following error message:
io.o: In function `linux_iocparm_len':
/home/travis/.rvm/src/ruby-1.9.3-p551/io.c:8086: undefined reference to `_IOC_SIZE'
collect2: error: ld returned 1 exit status
Makefile:165: recipe for target 'miniruby' failed
I've been able to install both ruby 2.2 and 2.3 without any problems, but had no luck with 1.9.3
The command I used for 2.3 is
rvm install 2.3.0 --disable-binary --movable --autolibs=0
I've installed rvm from https://github.com/rvm/rvm/archive/stable.tar.gz
Upvotes: 1
Views: 1166
Reputation: 4530
I solved this by backporting the same conditionals the latest version of Ruby has for _IOC_SIZE
to ruby/io.c
. I was able to compile and install afterwards.
The pull request is https://github.com/ruby/ruby/pull/1485, the fix is https://github.com/rallen-temp/ruby/commit/cbaaf34a0aa3c90f6a43d4383258c14a803bed12.
I also referenced this issue in the PR. Hope this helps anyone else that runs into this.
Upvotes: 1