in reply to Re^4: Installing Lingua::LinkParser
in thread Installing Lingua::LinkParser

As Anonymous Monk has suggested, can you show us what comes before the warnings/errors you've just posted.

Are you using the same compiler to build Lingua::LinkParser that built your perl ?

Cheers,
Rob

Replies are listed 'Best First'.
Re^6: Installing Lingua::LinkParser
by crossthelimit (Novice) on Apr 13, 2010 at 18:26 UTC
    Thanks for the prompt responses. Here's the immediate output after running 'make' command.
    -ubuntu:~/.cpan/build/Lingua-LinkParser-1.14-cLQyC8# make Skip blib/lib/Lingua/LinkParser.pm (unchanged) Skip blib/lib/Lingua/LinkParser/Sentence.pm (unchanged) Skip blib/lib/Lingua/LinkParser/Dictionary.pm (unchanged) Skip blib/lib/Lingua/LinkParser/Linkage/Sublinkage.pm (unchanged) Skip blib/lib/Lingua/LinkParser/Definitions.pm (unchanged) Skip blib/lib/Lingua/LinkParser/Linkage/Word.pm (unchanged) Skip blib/lib/Lingua/LinkParser/Linkage/Sublinkage/Link.pm (unchanged) Skip blib/lib/Lingua/LinkParser/Linkage.pm (unchanged) Skip blib/lib/Lingua/LinkParser/Simple.pm (unchanged) cc -c -I/home/aktest/link-4.1b/include/ -D_REENTRANT -D_GNU_SOURCE -D +DEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_S +OURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.14\" -DXS_VERSION +=\"1.14\" -fPIC "-I/usr/lib/perl/5.10/CORE" -DDICTIONARY_DIR=\".\" L +inkParser.c In file included from /home/aktest/link-4.1b/include/link-includes.h:2 +1, from LinkParser.xs:5: /home/aktest/link-4.1b/include/structures.h:94:1: warning: "assert" re +defined In file included from LinkParser.xs:2: /usr/lib/perl/5.10/CORE/perl.h:3770:1: warning: this is the location o +f the previous definition LinkParser.c:47:5: error: macro "assert" requires 2 arguments, but onl +y 1 given LinkParser.c: In function ‘S_croak_xs_usage’:
    Also the contents of Makefile.PL is
    WriteMakefile( 'NAME' => "Lingua::LinkParser", 'VERSION_FROM' => "lib/Lingua/LinkParser.pm", 'DEFINE' => "-DDICTIONARY_DIR=\\\".\\\"", ## if your libs are in a nonstandard location, changes these,i.e.: # 'LIBS' => "-L/dbrian/link-grammar-4.4.3/link-grammar/.lib +s/ -llink-grammar", # 'INC' => "-I/dbrian/link-grammar-4.4.3/link-grammar/", 'LIBS' => "-llink-grammar", 'INC' => "-I/home/aktest/link-4.1b/include/", 'OBJECT' => "", );
      You've got the wrong link-grammar source, I think. I grabbed this source and Lingua-LinkParser-1.14 built fine for me on linux (Mandrake-9.1), perl-5.12.0.

      Having grabbed that source, I unpacked it to /home/rob/perlmods, then did a 'cd' to /home/rob/perlmods/link-grammar-4.4.3. I then ran ./configure --disable-shared --enable-static. If you want to build a shared (dynamic) lib, then run ./configure --disable-static --enable-shared instead. And if you want to install to somewhere other than /usr/local you'll need to add the --prefix=/home/aktest (or whatever) argument to the command.

      After configure finished, I ran make followed by sudo make install. Then it was just a matter of building Lingua-LinkParser-1.14 in the "usual" way:
      perl Makefile.PL followed by make test and then sudo make install.
      See how you get on with that.

      Cheers,
      Rob.
        I followed these 2010 instructions in 2019 and found that Lingua::LinkParser fails tests but seems to work after installing with --force (cpanm). Now I can enjoy "Parsing Natural Language with Lingua::LinkParser" from TPJ:
        http://www.foo.be/docs/tpj/issues/vol5_3/tpj0503-0010.html
        Awesome !!! Thanks a ton Rob! It worked perfectly fine. The fact that Ubuntu already has link-grammar package (sudo apt-get install link-grammar) didn't help me in installing Lingua::LinkParser. I did a manual fetch of link-grammar as Rob suggested and followed the rest. Lingua::LinkParser working fine now..