Giter Site home page Giter Site logo

Comments (4)

jmcmahon avatar jmcmahon commented on August 10, 2024 6

Thanks for all the help on this issue. Here's what I did last week to solve the problem: I updated my Ansible provisioning scripts to do this essentially:

yum remove gcc48-c++

yum install gcc72-c++.x86_64

At the time I received the error, I didn't know that Amazon Linux/RedHat had one gcc RPM for C code, and another gcc (aka g++) for C++ code. I think long ago, gcc could compile C and C++ code via different command-line options and were essentially the same. I didn't know that they separated it into 2 separate RPMs. Looking at the output from yum search also adds to the confusion, btw.

$ yum search gcc
...
gcc72-c++.x86_64 : C++ support for GCC
...
gcc72.x86_64 : Various compilers (C, C++, Objective-C, Java, ...)
...

You'd think that the gcc72.x86_64 that I already had installed would have compiled the C++ code, without having to install the gcc72-c++.x86_64 RPM. Anyway, thanks to everyone's help with this ticket, I was able to fix. So rather than recompiling ruby with gcc48, I went the other way and installed 2 different 7.2 gcc compilers.

from ruby-unf_ext.

scicco avatar scicco commented on August 10, 2024 2

@jmcmahon I had similar problem (i'm on AWS with gcc 7.2.1 and g++ 4.8)

I fixed by adding this command before the installation of rvm and ruby:

alternatives --set gcc /usr/bin/gcc48

from ruby-unf_ext.

knu avatar knu commented on August 10, 2024

Those options are for GCC>=6, so their appearance could mean the ruby itself was compiled with a newer version of gcc and those options were saved in ruby's configuration as a result of its initial configuration process. So, the solution would be to install this extension with a newer version of g++ or recompile ruby with gcc 4.8. The same version of gcc & g++ must be used.

from ruby-unf_ext.

jmcmahon avatar jmcmahon commented on August 10, 2024

Thanks. This gives me some clues. I have gcc 7.2.1 and g++ 4.8.5 installed on the box which is controlled by /etc/alternatives. In addition. I have ruby 2.5.1 installed via rvm (using gemsets) and the os has an old version of ruby 2.0.0p648 in /usr/bin/ruby. Somewhere in the building of this extension, the ruby stdlib mkmf that makes the Makefile for the extension is pulling in gcc compiler options and then trying to build with g++, I think. Not sure yet.

from ruby-unf_ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.