Closed kanedo closed 7 years ago
Hi @kanedo,
So that I can investigate this further, could you please let me know your version of CentOS and provide some steps to reproduce the issue (e.g. in VirtualBox)?
Hi @mudge , the centos version is CentOS release 6.9 (Final)
unfortunately this is happening on a shared hosting and i dont know their full setup
I was able to reproduce this on CentOS 6.9 using git, gcc, re2 and Ruby from Linuxbrew.
The problem seems to be with the version of re2 installed via Linuxbrew itself as it is not compiled correctly as a shared library (e.g. it seems to at least be missing the required -fPIC
flag as the errors you saw indicate).
I was able to get the gem working by following the official re2 installation instructions, compiling my own version of re2 and then attempting to install the gem again.
As you're on shared hosting, does that mean you can't write anywhere outside your home directory? If so, you should still be able to compile to your own location like so (replace /home/user/.re2
with wherever you want to install the re2 library):
$ gcc --version
gcc (Homebrew gcc 5.3.) 5.3.0
$ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58052) [x86_64-linux]
$ git clone https://code.googlesource.com/re2
$ cd re2
$ make prefix=/home/user/.re2
$ make test prefix=/home/user/.re2
$ make install prefix=/home/user/.re2
$ make testinstall prefix=/home/user/.re2
$ gem install re2 -- --with-re2-dir=/home/user/.re2
I hope that solves your issue and please let me know how you get on.
thank you very much @mudge that worked.
To use it with bundler also set bundle config build.re2 --with-re2-dir=/home/user/.re2
I tried to install this gem on a centos server and got a lot of linker errors. I've installed it using:
The full log is the following:
I've installed re2 via linux brew: