Friday, October 31, 2008

installing Nokogiri

Looking into using tenderlove's new library, nokogiri. Looks faster than Hpricot, according to the benchmarks he provides, the syntax also looks really nice.

hmmm.... I installed racc, and frex... getting an error when creating the Make file. I really want to try this out. If I figure it out, or talk to someone who knows, I'll post a reply. For now, here is the error I'm getting.


-bash3.2.17:holtonma:Fri Oct 31 12:09:37>> sudo gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

rake RUBYARCHDIR=/opt/local/lib/ruby/gems/1.8/gems/nokogiri-1.0.1/lib RUBYLIBDIR=/opt/local/lib/ruby/gems/1.8/gems/nokogiri-1.0.1/lib
(in /opt/local/lib/ruby/gems/1.8/gems/nokogiri-1.0.1)
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for #include
... yes
checking for #include
... yes
checking for racc... yes
checking for frex... yes
creating Makefile
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c html_document.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c html_sax_parser.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c native.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_cdata.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_document.c
xml_document.c: In function ‘substitute_entities_set’:
xml_document.c:117: warning: unused parameter ‘klass’
xml_document.c: In function ‘load_external_subsets_set’:
xml_document.c:129: warning: unused parameter ‘klass’
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_dtd.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_node.c
xml_node.c: In function ‘new’:
xml_node.c:475: warning: unused parameter ‘klass’
xml_node.c: In function ‘new_from_str’:
xml_node.c:494: warning: unused parameter ‘klass’
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_node_set.c
xml_node_set.c: In function ‘allocate’:
xml_node_set.c:106: warning: unused parameter ‘klass’
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_reader.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_sax_parser.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_syntax_error.c
xml_syntax_error.c: In function ‘Nokogiri_error_handler’:
xml_syntax_error.c:162: warning: unused parameter ‘ctx’
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_text.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_xpath.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xml_xpath_context.c
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin8.10.1 -I. -I/opt/local/include/libxml2 -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c xslt_stylesheet.c
cc -dynamic -bundle -undefined suppress -flat_namespace -L/opt/local/lib -L"/opt/local/lib" -o native.bundle html_document.o html_sax_parser.o native.o xml_cdata.o xml_document.o xml_dtd.o xml_node.o xml_node_set.o xml_reader.o xml_sax_parser.o xml_syntax_error.o xml_text.o xml_xpath.o xml_xpath_context.o xslt_stylesheet.o -lruby -lxslt -lxml2 -lpthread -ldl -lobjc
ld: warning, duplicate dylib /opt/local/lib/libxml2.2.dylib
/opt/local/lib/ruby/gems/1.8/gems/hpricot-0.6.161/lib/hpricot/builder.rb:26: warning: `&' interpreted as argument prefix
Loaded suite -e
Started
..............................................................................................................................................................................................................................................
Finished in 2.551585 seconds.

238 tests, 701 assertions, 0 failures, 0 errors
/opt/local/lib/ruby/1.8/test/unit.rb:278: [BUG] Bus Error
ruby 1.8.6 (2007-03-13) [i686-darwin8.10.1]

rake aborted!
Command failed with status (): [/opt/local/bin/ruby -w -Ilib:ext:bin:test ...]

(See full trace by running task with --trace)


Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/nokogiri-1.0.1 for inspection.
Results logged to /opt/local/lib/ruby/gems/1.8/gems/nokogiri-1.0.1/gem_make.out

No comments: