1

I am using rvm, ruby 1.9.3, link-grammar (sudo apt-get install link-grammar), and pkg-config. I have the same setup on OSX, and it works great.

Running 'gem install linkparser' fails on this:

/usr/local/include/link-grammar/link-includes.h:16:36
  fatal error: link-grammar/api-types.h: No such file or directory

I've tried installing link-grammer manually as well, then running:

gem install linkparser -- --with-link-grammar=/usr/local
gem install linkparser -- --with-link-grammar=/usr/share
gem install linkparser -- --with-link-grammar=/usr/share/link-grammar

I get the same error every time.

Does anyone know how I can get linkparser to recognize link-grammar?

Thanks

ampli
  • 141
  • 2
  • 7
airlok
  • 425
  • 3
  • 14

3 Answers3

1

While not a direct answer, I had a simlar problem with Python.

Installing the linkparser-dev package helps.

Charles Merriam
  • 19,908
  • 6
  • 73
  • 83
0

You should try:

gem install linkparser -- --with-opt-dir=/usr/local

OR:

gem install linkparser -- --with-link-grammar-dir=/usr/local
mpapis
  • 52,729
  • 14
  • 121
  • 158
  • Same problem for each case. gem_make.out fails on: "checking for link-grammar/link-includes.h... no" – airlok Mar 31 '12 at 16:12
  • does /usr/local/include/link-grammar/link-includes.h exists ? – mpapis Mar 31 '12 at 17:33
  • In order for the extconf.rb to be able to see the options, they need to be split from the arguments to 'gem', otherwise gem thinks they're invalid options for the 'install' subcommand and ignores them. You split them from the gem options using the empty option ('--'). So: `gem install linkparser -- --with-link-grammar-dir=/usr/local` – Michael Granger Apr 01 '12 at 19:39
  • I used the extra '--' in all cases. – airlok Apr 01 '12 at 22:21
0

I successfully installed it by doing the following:

wget http://www.abisource.com/downloads/link-grammar/4.7.4/link-grammar-4.7.4.tar.gz
tar zxvf link-grammar-4.7.4.tar.gz
cd link-grammar-4.7.4
mkdir -p /home/MYUSER/usr/local
./configure --prefix=/home/MYUSER/usr/local
make
make install

gem install linkparser -- --with-link-grammar-dir=/home/MYUSER/usr/local/

Source: http://code.tripodtravel.co.nz/2010/01/02/installing-link-parser-on-dreamhost/

airlok
  • 425
  • 3
  • 14
  • I suspect it would actually work with the version installed from apt if you just included the '--' in the 'gem install' command. Another thing I was going to suggest was ensuring that you have the '-dev' version of link-grammar installed, as linkparser needs the development headers. But good to see you found a workaround. – Michael Granger Apr 01 '12 at 19:42