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

Thanks Rob. You're right, Link-Grammar is a C library. I have installed it locally. I modified the include location in Makefile.PL as per your suggestion and the number of errors reduced significantly. I am not sure if this error has to do with link-grammar.
/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’: LinkParser.c:47: error: ‘assert’ undeclared (first use in this functio +n) LinkParser.c:47: error: (Each undeclared identifier is reported only o +nce LinkParser.c:47: error: for each function it appears in.) LinkParser.c:47:5: error: macro "assert" requires 2 arguments, but onl +y 1 given LinkParser.c: In function ‘XS_Lingua__LinkParser_dictionary_create_lan +g’: LinkParser.c:126: warning: assignment makes pointer from integer witho +ut a cast LinkParser.c: In function ‘XS_Lingua__LinkParser_dictionary_create_def +ault_lang’: LinkParser.c:147: warning: assignment makes pointer from integer witho +ut a cast LinkParser.xs: In function ‘XS_Lingua__LinkParser_call_linkage_get_lin +k_domain_names’: LinkParser.xs:89: warning: assignment from incompatible pointer type LinkParser.c: In function ‘XS_Lingua__LinkParser_linkage_get_link_doma +in_names’: LinkParser.c:469: warning: assignment from incompatible pointer type LinkParser.xs: In function ‘XS_Lingua__LinkParser_call_linkage_get_wor +ds’: LinkParser.xs:166: warning: assignment from incompatible pointer type LinkParser.c: In function ‘XS_Lingua__LinkParser_linkage_get_words’: LinkParser.c:950: warning: assignment from incompatible pointer type LinkParser.c: In function ‘XS_Lingua__LinkParser_linkage_post_process’ +: LinkParser.c:1114: warning: passing argument 2 of ‘linkage_post_proces +s’ from incompatible pointer type LinkParser.c: In function ‘XS_Lingua__LinkParser_post_process_close’: LinkParser.c:2881: warning: passing argument 1 of ‘post_process_close’ + from incompatible pointer type LinkParser.c: In function ‘XS_Lingua__LinkParser_post_process_open’: LinkParser.c:2901: error: too few arguments to function ‘post_process_ +open’ LinkParser.c: In function ‘XS_Lingua__LinkParser_linkage_constituent_n +ode_get_label’: LinkParser.c:3285: warning: assignment makes pointer from integer with +out a cast LinkParser.c: In function ‘XS_Lingua__LinkParser_linkage_constituent_n +ode_get_child’: LinkParser.c:3315: warning: assignment makes pointer from integer with +out a cast LinkParser.c: In function ‘XS_Lingua__LinkParser_linkage_constituent_n +ode_get_next’: LinkParser.c:3346: warning: assignment makes pointer from integer with +out a cast make: *** [LinkParser.o] Error 1

Replies are listed 'Best First'.
Re^5: Installing Lingua::LinkParser
by syphilis (Archbishop) on Apr 13, 2010 at 08:39 UTC
    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
      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.
Re^5: Installing Lingua::LinkParser
by Anonymous Monk on Apr 13, 2010 at 08:08 UTC
    The interesting errors are before that.