Giter Site home page Giter Site logo

Error compiling on Ruby 1.8.7 about ruby-unf_ext HOT 11 CLOSED

knu avatar knu commented on August 10, 2024
Error compiling on Ruby 1.8.7

from ruby-unf_ext.

Comments (11)

knu avatar knu commented on August 10, 2024

Having /usr/include/ruby/encoding.h is unusual and it seems something is seriously broken with your installation.
Ruby's header files should be placed inside each version specific directory and must not be globally exposed.

from ruby-unf_ext.

knu avatar knu commented on August 10, 2024

Solution: Just remove /usr/include/ruby/. If it was installed by some package, ask the vendor to fix it.

from ruby-unf_ext.

knu avatar knu commented on August 10, 2024

Maybe there are also /usr/include/ruby.h and /usr/lib/libruby*, which may as well be moved away.

from ruby-unf_ext.

postmodern avatar postmodern commented on August 10, 2024

Ah ha! I have ruby 1.8.7 installed into /opt/rubies/ruby-1.8.7-p371. For some reason extconf isn't finding it's headers, but instead using system's ruby headers.

from ruby-unf_ext.

postmodern avatar postmodern commented on August 10, 2024

Ah there is no encoding.h in /opt/rubies/ruby-1.8.7-p371/lib/ruby/1.8/x86_64-linux/.

from ruby-unf_ext.

knu avatar knu commented on August 10, 2024

ruby/encoding.h was introduced in ruby 1.9.

And ruby never installs its header files directly under /usr/include unless wrongly configured.

from ruby-unf_ext.

postmodern avatar postmodern commented on August 10, 2024

It appears have_header('ruby/encoding.h') in ext/unf/extconf.rb is causing -DHAVE_RUBY_ENCODING_H to be passed in, and thus ruby/encoding.h get's included in. You should probably also check the version of Ruby, since ruby/encoding.h should never be included for Ruby 1.8.x.

from ruby-unf_ext.

knu avatar knu commented on August 10, 2024

This is a bug of the ruby-devel rpm. I'll bug report the issue when I feel like it.
There are many other modules that do have_header("ruby/...") in their extconf.rb, so it doesn't help if I only "fix" my module.

from ruby-unf_ext.

postmodern avatar postmodern commented on August 10, 2024

Confirmed. I renamed /usr/include/ruby to /usr/include/ruby-1.9.1 and the module compiled.

from ruby-unf_ext.

knu avatar knu commented on August 10, 2024

Just filed a bug report: https://bugzilla.redhat.com/show_bug.cgi?id=245446

Thanks for the report. I wouldn't notice the issue if it weren't for this.

from ruby-unf_ext.

knu avatar knu commented on August 10, 2024

The URL I posted above was a wrong one. Follow this instead: https://bugzilla.redhat.com/show_bug.cgi?id=975660

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.