#215 new
Vladimir Chizhov

native ext compilation failure

Reported by Vladimir Chizhov | April 13th, 2011 @ 05:34 AM

I can't install RedCloth with native extensions (via gem install). To clarify a problem I've checked out full source, created a separate build environment and ran rake compile. What I've got (that's similar to errors on gem install):

gcc -I. -I. -I/home/muzzy/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/x86_64-linux -I../../../../ext/redcloth_scan -fPIC -g -O2 -fPIC -O0 -Wall -Werror -c ../../../../ext/redcloth_scan/redcloth_inline.c
ragel/redcloth_inline.c.rl: In function ‘red_block’:
ragel/redcloth_inline.c.rl:114:9: error: ‘attr_regs’ undeclared (first use in this function)
ragel/redcloth_inline.c.rl:114:9: note: each undeclared identifier is reported only once for each function it appears in
make: *** [redcloth_inline.o] Error 1

My environment:
$ gem list bundler (1.0.12)
diff-lcs (1.1.2)
rake (0.8.7)
rake-compiler (0.7.7)
rspec (2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
rspec-mocks (2.5.0)
rvm (1.2.9)

  • ruby 1.8.7-p334 (the same with 1.9,2-p180)
  • ragel 6.6
  • gcc 4.6.0
  • OS: Linux x86_64

Do U need smth else about my machine?

Comments and changes to this ticket

  • Vladimir Chizhov

    Vladimir Chizhov April 13th, 2011 @ 05:36 AM

    Oops, please sorry. The error message, I've submitted, was after monkey-patching-experiments. On a clean code base it will be:

    gcc -I. -I. -I/home/muzzy/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/x86_64-linux -I../../../../ext/redcloth_scan -fPIC -g -O2 -fPIC -O0 -Wall -Werror -c ../../../../ext/redcloth_scan/redcloth_inline.c
    ragel/redcloth_inline.c.rl: In function ‘red_block’:
    ragel/redcloth_inline.c.rl:99:9: error: variable ‘attr_regs’ set but not used [-Werror=unused-but-set-variable]
    cc1: all warnings being treated as errors

  • Vladimir Chizhov

    Vladimir Chizhov April 18th, 2011 @ 02:31 AM

    I've downgraded my gcc from 4.6.0 to 4.5.2 and now everything is ok. So, the reason is obvious.

  • lolilolicon

    lolilolicon April 21st, 2011 @ 09:07 AM

    Confirmed. gcc 4.5.2 compiles fine, and gcc 4.6.0 fails with the same error as comment #1.
    I suggest removing -Werror from the gcc options in extconf.rb.

  • steveT

    steveT May 17th, 2011 @ 11:03 PM

    Yeah, pretty please take out the -Werror and put up a new version of the gem.

  • ben

    ben May 30th, 2011 @ 06:37 PM

    I noticed this bug on Archlinux and just want to point out that this is a regression from 4.2.3 to 4.2.4.
    Maybe this can help to fix the bug.

  • Pablo Olmos de Aguilera C.

    Pablo Olmos de Aguilera C. June 12th, 2011 @ 10:58 PM

    I'm running into the same error on Arch Linux x86, using GCC 4.6.0 and RedCloth 4.2.7 gem (through gem install RedCloth).

    Any chance this is going to be fixed?

  • René

    René June 21st, 2011 @ 09:05 AM

    I have the same error on Fedora 15 with GCC 4.6

    gcc-Version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC)

    Any idea when this is going to be fixed?

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

RedCloth is a Ruby library for converting Textile into HTML

Shared Ticket Bins

Referenced by