deepfryed / ots

ruby bindings to open text summarizer
43 stars 6 forks source link

Error installing ots #2

Closed sajeev86 closed 12 years ago

sajeev86 commented 12 years ago

Hi, I hope you can help me with this. I've noticed one or two comments about this problem people are having, but no solution.

I'm running on Lion (10.7.2), ruby 1.9.2-p290

I have libxml2 and glib installed (confirmed by brew install).

But when I run

gem install ots

It fails to build the gem extension:

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Any idea what might be my problem? Thanks.

deepfryed commented 12 years ago

sorry, i don't have a Lion environment to test (I've tested it fine on Leopard)

did you try ?

export CPPFLAGS=-I <path to glib include>
export LDFLAGS=-L <path to glib lib>
export PKG_CONFIG_PATH=<path to glib pkgconfig>

if so, please copy paste the mkmf.log output here so i can try to figure out what's going on

deepfryed commented 12 years ago

closing this for lack of response

sajeev86 commented 12 years ago

Sorry about not getting to you sooner.

I reseted and reinstalled my Mac with Lion. I've tried the ots install and I get this. I think it is a different message from the original problem.

Hope you can still help!

Fetching: ots-0.5.4.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing ots:
    ERROR: Failed to build gem native extension.

        /Users/sajeev86/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/sajeev86/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
extconf.rb:3:in ``': No such file or directory - pkg-config --cflags  glib-2.0 (Errno::ENOENT)
    from extconf.rb:3:in `<main>'

Might the problem be that I'm running through rvm? Because I had realised problems with it prior to the hard reset I performed on my comp.

deepfryed commented 12 years ago

you need to install homebrew and then glib with

brew install glib

If needed export the paths, for example if you install glib 2.30.2

 # setup the environment variables in order to install ots
 export CPPFLAGS=-I/usr/local/Cellar/glib/2.30.2/include/glib-2.0/
 export LDFLAGS=-L/usr/local/Cellar/glib/2.30.2/lib/
 export PKG_CONFIG_PATH=/usr/local/Cellar/glib/2.30.2/lib/pkgconfig/

cheers

sajeev86 commented 12 years ago

I have brew installed (installed git and postgres previously). I've followed your install instructions from the README.md

Could it be the libxml2? (I have that installed too)

deepfryed commented 12 years ago

no, your error message says it cannot find glib - you sure you installed it. Can you check the install paths in that case ?

    --ruby=/Users/sajeev86/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
extconf.rb:3:in ``': No such file or directory - pkg-config --cflags  glib-2.0 (Errno::ENOENT)
    from extconf.rb:3:in `<main>'
sajeev86 commented 12 years ago

how do I find more info on the glib install?

Cos I get this from brew install glib

Warning: glib already installed

And this from brew info glib

glib 2.30.2
http://developer.gnome.org/glib/
Depends on: gettext, libffi
/usr/local/Cellar/glib/2.30.2 (389 files, 13M)
http://github.com/mxcl/homebrew/commits/master/Library/Formula/glib.rb
deepfryed commented 12 years ago

try

ls /usr/local/Cellar/glib/

and see what version of glib you got there

sajeev86 commented 12 years ago
sajeev86$ ls /usr/local/Cellar/glib/
2.30.2
deepfryed commented 12 years ago

strike that, did you try looking under /usr/local/Cellar/glib/2.30.2/lib/pkgconfig/ ?

sajeev86 commented 12 years ago
sajeev86$ ls /usr/local/Cellar/glib/2.30.2/lib/pkgconfig/
gio-2.0.pc          gmodule-2.0.pc          gobject-2.0.pc
gio-unix-2.0.pc         gmodule-export-2.0.pc       gthread-2.0.pc
glib-2.0.pc         gmodule-no-export-2.0.pc
deepfryed commented 12 years ago

sure you did the following ?

export PKG_CONFIG_PATH=/usr/local/Cellar/glib/2.30.2/lib/pkgconfig/

If so, its end of the line. I cannot think of what could be wrong at this time. I can try if I get hold of a Lion machine but that may not happen very soon, sorry.

sajeev86 commented 12 years ago

That's kl I'll see if I can fix it then I'll post it here!

deepfryed commented 12 years ago

That would be much appreciated thanks.

deepfryed commented 12 years ago

@sajeev86 any updates ? I would love to know if you managed to sort out the issues.