Fedora Core 12 make error

52 views
Skip to first unread message

tashpool

unread,
Jan 18, 2010, 5:52:37 PM1/18/10
to nokogiri-talk
Good Afternoon, sorry to bother but I've hit a snag when trying to
install nokogiri on my Fedora Core 12 workstation.

[root@ ruby]# gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.9.1 (2009-12-07 patchlevel 376) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /root/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/

[root @ ruby]# yum install -y libxml2 libxml2-devel libxslt libxslt-
devel
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Package libxml2-2.7.6-1.fc12.x86_64 already installed and latest
version
Package libxml2-devel-2.7.6-1.fc12.x86_64 already installed and latest
version
Package libxslt-1.1.26-1.fc12.x86_64 already installed and latest
version
Package libxslt-devel-1.1.26-1.fc12.x86_64 already installed and
latest version
Nothing to do

----------------------------------------------------------------------------------------------------

[root @ ruby]# gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for iconv.h in /opt/local/include/,/opt/local/include/
libxml2,/opt/local/include,/opt/local/include,/opt/local/include/
libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/
include,/usr/local/include/libxml2,/usr/include,/usr/include/
libxml2... yes
checking for libxml/parser.h in /opt/local/include/,/opt/local/include/
libxml2,/opt/local/include,/opt/local/include,/opt/local/include/
libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/
include,/usr/local/include/libxml2,/usr/include,/usr/include/
libxml2... yes
checking for libxslt/xslt.h in /opt/local/include/,/opt/local/include/
libxml2,/opt/local/include,/opt/local/include,/opt/local/include/
libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/
include,/usr/local/include/libxml2,/usr/include,/usr/include/
libxml2... yes
checking for libexslt/exslt.h in /opt/local/include/,/opt/local/
include/libxml2,/opt/local/include,/opt/local/include,/opt/local/
include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/
local/include,/usr/local/include/libxml2,/usr/include,/usr/include/
libxml2... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile

make
gcc -I. -I/usr/include/libxml2 -I/usr/include -I/usr/local/include/
ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -
I/usr/local/include/ruby-1.9.1 -I. -
DHAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS -
DHAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS -
DHAVE_XMLRELAXNGSETVALIDSTRUCTUREDERRORS -
DHAVE_XMLSCHEMASETVALIDSTRUCTUREDERRORS -
DHAVE_XMLSCHEMASETPARSERSTRUCTUREDERRORS -I/opt/local/include/ -I/opt/
local/include/libxml2 -I/opt/local/include -fPIC -D_XOPEN_SOURCE=1 -
O2 -g -Wall -Wno-parentheses -fPIC -g -DXP_UNIX -O3 -Wall -Wcast-
qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -o
xml_reader.o -c xml_reader.c
In file included from /usr/local/include/ruby-1.9.1/ruby.h:32,
from ./nokogiri.h:16,
from ./xml_reader.h:4,
from xml_reader.c:1:
/usr/local/include/ruby-1.9.1/ruby/ruby.h: In function ‘NUM2INT’:
/usr/local/include/ruby-1.9.1/ruby/ruby.h:413: warning: conversion to
‘int’ from ‘long int’ may alter its value
...
...
...<cut for brevity>
...
...
In file included from /usr/local/include/ruby-1.9.1/ruby.h:32,
from ./nokogiri.h:16,
from nokogiri.c:1:
/usr/local/include/ruby-1.9.1/ruby/ruby.h: In function ‘NUM2INT’:
/usr/local/include/ruby-1.9.1/ruby/ruby.h:413: warning: conversion to
‘int’ from ‘long int’ may alter its value
In file included from ./xml_document.h:5,
from ./nokogiri.h:75,
from nokogiri.c:1:
/usr/local/include/ruby-1.9.1/ruby/backward/st.h:2:2: warning:
#warning use "ruby/st.h" instead of bare "st.h"
nokogiri.c: In function ‘Init_nokogiri’:
nokogiri.c:37: error: ‘strdup’ undeclared (first use in this function)
nokogiri.c:37: error: (Each undeclared identifier is reported only
once
nokogiri.c:37: error: for each function it appears in.)
make: *** [nokogiri.o] Error 1


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/
nokogiri-1.4.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/
ext/nokogiri/gem_make.out

----------------------------------------------------------------------------------------------------

strdup is a C function for string copying I believe. Been looking
through the docs, but not sure what else I could be missing. Thanks
for taking a look and would appreciate any help!

Also, under Red Hat, libxml2-devel is misspelled on
http://nokogiri.org/tutorials/installing_nokogiri.html

Mike Dalessio

unread,
Jan 19, 2010, 7:56:20 AM1/19/10
to nokogiri-talk
On Mon, Jan 18, 2010 at 5:52 PM, tashpool <tash...@gmail.com> wrote:
Good Afternoon, sorry to bother but I've hit a snag when trying to
install nokogiri on my Fedora Core 12 workstation.

Hi! Please checkout the code in github master, I've added an explicit "include <string.h>" there. Run 'rake install_gem' and let us know if that works.
 

Thanks for the heads-up. This has been fixed.

 

--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To post to this group, send email to nokogi...@googlegroups.com.
To unsubscribe from this group, send email to nokogiri-tal...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nokogiri-talk?hl=en.






--
mike dalessio
mi...@csa.net

tashpool

unread,
Jan 19, 2010, 1:35:13 PM1/19/10
to nokogiri-talk
On Jan 19, 5:56 am, Mike Dalessio <mike.dales...@gmail.com> wrote:
> Hi! Please checkout the code in github master, I've added an explicit
> "include <string.h>" there. Run 'rake install_gem' and let us know if that
> works.

Good Afternoon. First off, thank you for the reply and your help.
This is my first foray into Linux/Ruby so please bear with me. Hit a
stopping point when trying to use the 'rake install_gem' command.

1. I cloned the nokogiri project
$ git clone git://github.com/tenderlove/nokogiri.git

2. Next, I attempted to run the rake command listed above and hit a
number of missing requirements. I installed these one by one with
gems until I hit the rexical requirement.

[root@ nokogiri]# rake install_gem
(in /home/csuser/projects/git_stuff/nokogiri)
error loading "/usr/local/lib/ruby/gems/1.9.1/gems/hoe-2.5.0/lib/hoe/
rubyforge.rb": no such file to load -- openssl. skipping...
error loading "/usr/local/lib/ruby/gems/1.9.1/gems/hoe-2.5.0/lib/hoe/
rubyforge.rb": no such file to load -- openssl. skipping...
which: no dot in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/
usr/bin:/root/bin)
warning: couldn't activate the rubyforge plugin, skipping
warning: couldn't activate the debugging plugin, skipping
rake-compiler must be configured first to enable cross-compilation
rm -r doc
rm -r pkg
rm -rf lib/nokogiri/css/generated_parser.rb
rm -r tmp/x86_64-linux/nokogiri/1.9.1
/usr/local/bin/racc -l -o lib/nokogiri/css/generated_parser.rb lib/
nokogiri/css/parser.y
rex --independent -o lib/nokogiri/css/generated_tokenizer.rb lib/
nokogiri/css/tokenizer.rex
/usr/local/lib/ruby/gems/1.9.1/gems/rexical-1.0.4/lib/rexical/
rexcmd.rb:66:in `initialize': undefined method `collect' for #<String:
0x00000001c65b10> (NoMethodError)
from /usr/local/lib/ruby/gems/1.9.1/gems/rexical-1.0.4/bin/rex:18:in
`new'
from /usr/local/lib/ruby/gems/1.9.1/gems/rexical-1.0.4/bin/rex:18:in
`<top (required)>'
from /usr/local/bin/rex:19:in `load'
from /usr/local/bin/rex:19:in `<main>'
need rexical, sudo gem install rexical

[root@ nokogiri]# gem list --local

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
gemcutter (0.3.0)
hoe (2.5.0)
json_pure (1.2.0)
racc (1.4.6)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rake-compiler (0.7.0)
rexical (1.0.4)
rubyforge (2.0.3)
sqlite3-ruby (1.2.5)

I have the rexical gem listed as installed and those errors and
warnings are none to appealing.

Iñaki Baz Castillo

unread,
Jan 19, 2010, 1:40:42 PM1/19/10
to nokogi...@googlegroups.com

rexical doesn't work with Ruby 1.9. Try the following:

- Install rexical em for Ruby1.8:

gem1.8 install rexical

- Depending on your environment it will create an executable "rex" under
/usr/bin/ or /usr/local/bin, so check:

~# which rex

you will get something as:

/usr/bin/rex
or
/usr/local/bin/rex

- Check such file and inspect the top line to know which Ruby version it uses.

- In case it uses ruby1.9 just delete the file and do again:

~# which rex

- Now you should get a different file. Ensure it uses Ruby1.8.


--
Iñaki Baz Castillo <i...@aliax.net>

Reply all
Reply to author
Forward
0 new messages