reneeb has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I want to install Languag::Prolog::Yaswi on my Windows machine under cygwin. Everything works fine, but when compiling opaque.c I get the following error:
gcc -c -I. -I/usr/lib/pl-5.2.6/include -DPERL_USE_SAFE_PUTENV -fno-st +rict-alias ing -pipe -I/usr/local/include -DUSEIMPORTLIB -g -O0 -DVERSION=\"0.0 +7\" -DXS_V ERSION=\"0.07\" "-I/usr/lib/perl5/5.8/cygwin/CORE" opaque.c opaque.c:13: error: parse error before "perl_opaque" opaque.c:13: warning: data definition has no type or storage class opaque.c: In function `perl_opaque_acquire': opaque.c:19: error: `PL_blob_t' undeclared (first use in this function +) opaque.c:19: error: (Each undeclared identifier is reported only once opaque.c:19: error: for each function it appears in.) opaque.c:19: error: `type' undeclared (first use in this function) opaque.c:20: warning: initialization makes pointer from integer withou +t a cast opaque.c: In function `perl_opaque_release': opaque.c:30: error: `PL_blob_t' undeclared (first use in this function +) opaque.c:30: error: `type' undeclared (first use in this function) opaque.c:31: warning: initialization makes pointer from integer withou +t a cast opaque.c: In function `perl_opaque_write': opaque.c:43: error: `PL_blob_t' undeclared (first use in this function +) opaque.c:43: error: `type' undeclared (first use in this function) opaque.c:44: warning: initialization makes pointer from integer withou +t a cast opaque.c: At top level: opaque.c:51: error: parse error before "perl_opaque" opaque.c:52: error: `PL_BLOB_MAGIC' undeclared here (not in a function +) opaque.c:52: error: initializer element is not constant opaque.c:52: error: (near initialization for `perl_opaque') opaque.c:53: error: `PL_BLOB_UNIQUE' undeclared here (not in a functio +n) opaque.c:53: error: `PL_BLOB_NOCOPY' undeclared here (not in a functio +n) opaque.c:53: warning: excess elements in scalar initializer opaque.c:53: warning: (near initialization for `perl_opaque') opaque.c:54: warning: excess elements in scalar initializer opaque.c:54: warning: (near initialization for `perl_opaque') opaque.c:55: warning: excess elements in scalar initializer opaque.c:55: warning: (near initialization for `perl_opaque') opaque.c:56: warning: excess elements in scalar initializer opaque.c:56: warning: (near initialization for `perl_opaque') opaque.c:57: warning: excess elements in scalar initializer opaque.c:57: warning: (near initialization for `perl_opaque') opaque.c:58: warning: excess elements in scalar initializer opaque.c:58: warning: (near initialization for `perl_opaque') opaque.c:59: warning: data definition has no type or storage class opaque.c: In function `pl_get_perl_opaque': opaque.c:106: error: `PL_blob_t' undeclared (first use in this functio +n) opaque.c:106: error: `type' undeclared (first use in this function) make[1]: *** [opaque.o] Error 1 make[1]: Leaving directory `/home/Renee/.cpan/build/Language-Prolog-Ya +swi-0.08/L ow' make: *** [subdirs] Error 2 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible


Has anyone experience in installing the module under cygwin?

Cheers,
Renee

Replies are listed 'Best First'.
Re: Problems installing Language::Prolog::Yaswi
by Madcap Laughs (Acolyte) on Jan 12, 2006 at 06:33 UTC
    The readme for L::P::Y-0.08 says you need SWI-Prolog 5.4.x or newer. Looks like you're using an older version of SWI-Prolog (5.2.5?) - one that presumably does not define 'PL_blob_t' and the various PL_BLOB_* constants.

    I think the best advice is to get the latest L::P::Y distro (version 0.08), and the latest version of SWI-Prolog (version 5.6.1).

    Cheers,
    Rob
      I've installed the newes SWI Prolog for Windows and linked the /usr/bin/pl to the Windows Prolog. It seems to work on the command line, but I still get the above mentioned error message when I try to install the module.

      I've even tried to install the module under Windows, but there I get the error message that one .h file could not be found.
        Strange. SWI-Prolog.h (which is #include'd in opaque.c) defines 'PL_blob_t' and the various 'PL_BLOB_*' constants. So - if SWI-Prolog.h has been found, those errors should not arise ... and if SWI_Prolog.h was not found, then you should also have received an error message telling you about that.(You're sure it's the updated version of pl that's being found ? .... not still getting that old SWI-Prolog.h that knows nothing of 'PL_blob_t' and friends ?)

        L::P::Y-0.08 is compiling ok for me against pl-5.6.1. I'm using the MinGW port of gcc in a native Win32 environment (not Cygwin) but I would not expect that to make a big difference. And I'm using the SWI-Prolog Windows binary (apparently built using a Microsoft compiler) provided on the website. I changed the name of pl\lib\libpl.lib to pl\lib\libpl.a so that the library could be found for linking purposes. Alternatively you could probably amend the Low/Makefile.PL so that 'pl.dll' gets used for linking.

        I just noticed that for Windows 95/98/ME they are recommending that you use pl-5.4.7. Is that relevant to your situation ?

        Cheers,
        Rob