-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.2.0 Build fails on Ubuntu 14.04.1 (x86_64) #690
Comments
Please install libffi-dev via apt-get or use '--enabled-shared' option |
Thank you, this fixes it for me. |
Same issue with Debian 7 ; |
I added this issue into FAQ: https://github.com/sstephenson/ruby-build/wiki#build-failure-of-fiddle-with-ruby-220 |
@hsbt Can you add these packages to "suggested build environment" on the top? That would help people who paste these instructions prior to installing Ruby versions on their respective systems. |
@mislav done! Thanks for your advice. |
Hi, I'm using Debian jessie. sudo apt-get install libffi-dev sudo apt-get update; apt-cache search libffi with Debian Wheezy (in an other server), I get more, do you know why? My source.list seems well configured.. |
Sorry, my /etc/apt/preferences was not empty |
Same goes for CentOS 6.x where you'll need to |
|
I'm having this exact issue on Ubuntu 14.04.1 LTS but I have |
same here with 14.04.1 LTS. I have the libffi-dev. |
sovled after installed libffi-dev, thanks |
Have same issue on Ubuntu 15.04 Alpha
|
I am on 14.04.1 LTS and successfully installed 2.2 with |
A guy on my SO issue said that he fixed it by setting |
I also had the same issue with 14.04. LTS. Solved after installing libffi-dev. |
@ryanburnette We(ruby-core) added -fPIC option for next release of Ruby 2.2 🙇 |
👍 |
👏 |
Related to rbenv/ruby-build#690
I had same problem, install libffi did not work but after I installed gcc using linuxbrew the ruby 2.2.0 installed successfully but installing gcc took 70 minutes on my VM. |
I have same issue with Ruby 2.2.1 on FreeBSD 9.3-STABLE amd64 I was able to fix it using:
Then build:
|
@naskoblg We already fixed FreeBSD issue with upstream. see https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/49957 |
@hsbt, so from what I've gathered, I do not have to manually install linking shared-object fiddle.so
/usr/bin/ld: ./libffi-3.2.1/.libs/libffi.a(raw_api.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
./libffi-3.2.1/.libs/libffi.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [../../.ext/x86_64-linux/fiddle.so] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20150319171236.15537/ruby-2.2.1/ext/fiddle'
make[1]: *** [ext/fiddle/all] Error 2 The error message suggests, as @naskoblg already verified, that adding |
Installing |
Installing |
thanks, |
on Amazon Linux 2014.09, same as @zachad for Centos, of course.
|
Added libffi-dev as ruby dependency, so we avoid problems when building 2.2.x. Ref: rbenv/ruby-build#690
Hi all. Please try to Ruby 2.2.2 |
Works for me, thanks! |
@aried3r 👍 Thanks for your feedback |
After installing the UPDATE: installed after sudo -ing all the installation thing, but this is not good for long-term solution, right? |
Having this issue with all 2.x. libffi-dev is installed. $ RUBY_CONFIGURE_OPTS=--enable-shared
$ rbenv install 2.2.2
Downloading ruby-2.2.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz
error: failed to download ruby-2.2.2.tar.gz
BUILD FAILED (LinuxMint 17.2 using ruby-build 20150803) |
After fiddling around a whole bunch, I found some errors in the logs related to certificates. This answer by Scott Emmons here (not the "correct" solution on that page but the second one down) fixed my problem. |
Thank you, helped for Ubuntu 15.10 with Ruby 2.2.1. |
A couple "Configure PostgreSQL" commands didn't work as-is; clarified where password is asked. rbenv install 2.2.0 gives an obscure warning fixed by having libffi-devel [rbenv/ruby-build#690]. Their FAQ actually suggests more [https://github.com/rbenv/ruby-build/wiki#suggested-build-environment]: dnf install -y gcc bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel but `bzip2 libffi-devel readline-devel` 3 were enough to build. nodejs is the obvious option to satisfy ExecJS, otherwise sprockets/es6 gem refuses to load.
installing sudo apt-get install libffi-dev worked for me on ubuntu 14.04.1. Thanks! |
For AWS, after running yum install libffi-devel still issue occured, and need to execute yum install gcc and its fixed the issue. |
ruby-build version:
20141225-1-g45b75ed
The acutal error is:
I've included the full build log below, please let me know if you need me to test anything or I can give you better information:
The text was updated successfully, but these errors were encountered: