Bugs: Browse | Submit New | Admin
I believe these are the kind of changes that need to go in to make it compile with 1.9.1 and 1.9.2 RSTRING(foo)->len and RSTRING(foo)->ptr becomes: RSTRING_LEN(foo) and RSTRING_PTR(foo) RARRAY(bar)->len and RARRAY(bar)->ptr becomes: RARRAY_LEN(bar) and RARRAY_PTR(bar) I am attaching the patches that I'm using currently.
Add A Comment:
Date: 2012-01-17 13:26 Sender: Derek Wang I also got similar issue when installing xslt gem. Here is the errors I got: gcc -I. -I/Users/wang/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1. 9.1/x86_64-darwin11.2.0 -I/Users/wang/.rvm/rubies/ruby-1.9.2-p290 /include/ruby-1.9.1/ruby/backward -I/Users/wang/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -Wall -I/usr/include/libxml2 -I/usr/include/libxml2 -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -DUSE_ERROR_HANDLER -DUSE_EXSLT -o extfunc.o -c extfunc.c In file included from /usr/include/libxml2/libxml/parser.h:798, from /usr/include/libxml2/libxml/globals.h:18, from /usr/include/libxml2/libxml/threads.h:35, from /usr/include/libxml2/libxml/xmlmemory.h:218 , from xslt.h:33, from extfunc.c:19: /usr/include/libxml2/libxml/encoding.h:41: error: conflicting types for ‘OnigUChar’ /Users/wang/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/o niguruma.h:106: error: previous declaration of ‘OnigUChar’ was here extfunc.c: In function ‘value2xpathObj’: extfunc.c:141: warning: implicit conversion shortens 64-bit value into a 32-bit value make: *** [extfunc.o] Error 1 I am using ruby 1.9.2p290 on Mac OS Lion, and I am trying to install ruby-xslt (0.9.8). Do you think this patch would solve the problem? if so , can you advise how to apply this patch?
Date: 2010-10-27 06:41 Sender: Bernhard Haslhofer I have the same problem. libxslt-ruby doesn't compile on my system. Here is the error message I receive when calling "gem install ruby-xslt": /usr/local/Cellar/ruby/1.9.2-p0/bin/ruby extconf.rb extconf.rb:18:Warning: Gem::SourceIndex#search support for String patterns is deprecated, use #find_name checking for atan() in -lm... no checking for atan() in -lm... yes checking for inflate() in -lz... yes checking for xmlXPtrNewRange() in -lxml2... yes checking for libxml/xmlversion.h... no checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libx ml2... yes checking for xsltApplyStylesheet() in -lxslt... yes checking for xslt.h... no checking for xslt.h in /opt/include/libxslt,/usr/local/include/li bxslt,/usr/include/libxslt... yes checking for exsltLibexsltVersion() in -lexslt... yes checking for exslt.h... no checking for exslt.h in /opt/include/libexslt,/usr/local/include/ libexslt,/usr/include/libexslt... yes checking for libxml/ruby_libxml.h... yes checking for libxml/ruby_xml_document.h... yes creating extconf.h creating Makefile make /usr/bin/cc -I. -I/usr/local/Cellar/ruby/1.9.2-p0/include/ruby-1. 9.1/x86_64-darwin10.4.0 -I/usr/local/Cellar/ruby/1.9.2-p0/include /ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p0/include/ruby-1.9.1 -I. -I/usr/local/Cellar/ruby/1.9.2-p0/lib/ruby/gems/1.9.1/gems/libxml -ruby-1.1.4/ext -I/usr/include/libxml2 -I/usr/include/libxslt -I/usr/include/libexslt -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/local/Cellar/readline/6.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -march=core2 -msse4.1 -w -pipe -fno-common -o libxslt.o -c libxslt.c In file included from /usr/include/libxml2/libxml/parser.h:798, from libxslt.h:10, from libxslt.c:5: /usr/include/libxml2/libxml/encoding.h:41: error: conflicting types for ‘OnigUChar’ /usr/local/Cellar/ruby/1.9.2-p0/include/ruby-1.9.1/ruby/oniguruma .h:106: error: previous declaration of ‘OnigUChar’ was here make: *** [libxslt.o] Error 1
Date: 2010-06-11 09:19 Sender: Pratik Sinha Some patches for ruby1.9.2. I saw that there were some additional incompatibilities with ruby1.9.2 regarding STR2CSTR. ruby 1.9.1 patch file is called xslt-patches.tar.gz ruby 1.9.2 patch files is called xslt-patches2.tar.gz