Steve_BZ has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I have a simple list generation problem, where my program needs to generate a series of lists from a few rules. The SQL would be fairly nightmarish, but I thought maybe some Prolog might help. So I tried to install AI::Prolog under MSW. I seem to be having a lot of problems with the dependencies. So I have two questions:
1 - Is there an easier version of Prolog to install?
2 - Can I fix this one?
I am working through the errors one by one, but the current one just goes straight over my head.
If I try to run the program, with some failed dependencies to try to see what works and what doesn't the code:
use warnings; use strict; use Term::ReadLine; use Term::ReadKey; use Pod::Usage 1.12; use aliased 'AI::Prolog';
Generates:
OK, so it looks like I have a problem with ReadKey. I check the download, it's fine. I run nmake, although it looks quite wordy, there are a couple of warnings, but no fatal errors:Can't load 'C:/Perl/site/lib/auto/Term/ReadKey/ReadKey.dll' for module + Term::ReadKey: load_file:Invalid access to memory location at C:/Per +l/lib/DynaLoader.pm line 229. at C:\Documents and Settings\Steve.Cookson\My Documents\Projects\Endo +scopy System\Endoscopia\aiprolog.pl line 21 Compilation failed in require at C:\Documents and Settings\Steve.Cooks +on\My Documents\Projects\Endoscopy System\Endoscopia\aiprolog.pl line + 21. BEGIN failed--compilation aborted at C:\Documents and Settings\Steve.C +ookson\My Documents\Projects\Endoscopy System\Endoscopia\aiprolog.pl +line 21.
Howver, when I run nmake test, I get fatal errors:Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. gcc -c -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_F +CRYPT -DNO _HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_C +ONTEXT -DP ERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fn +o-strict-a liasing -O2 -DVERSION=\"2.30\" -DXS_VERSION=\"2.30\" "-IC:\Perl\l +ib\CORE" ReadKey.c In file included from ReadKey.xs:6: ppport.h:227:1: warning: "PERL_UNUSED_DECL" redefined In file included from ReadKey.xs:4: C:/Perl/lib/CORE/perl.h:188:1: warning: this is the location of the pr +evious def inition Running Mkbootstrap for Term::ReadKey () C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 ReadKey. +bs dlltool --def ReadKey.def --output-exp dll.exp g++ -o blib\arch\auto\Term\ReadKey\ReadKey.dll -Wl,--base-file + -Wl,dll.b ase -mdll -L"C:\Perl\lib\CORE" ReadKey.o -Wl,--image-base,0x19000000 +C:\Perl\li b\CORE\perl58.lib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -l +advapi32 - lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm - +lversion - lodbc32 -lodbccp32 -lmsvcrt dll.exp dlltool --def ReadKey.def --base-file dll.base --output-exp dl +l.exp g++ -o blib\arch\auto\Term\ReadKey\ReadKey.dll -mdll -L"C:\Per +l\lib\CORE " ReadKey.o -Wl,--image-base,0x19000000 C:\Perl\lib\CORE\perl58.lib - +lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -l +oleaut32 - lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 +-lmsvcrt d ll.exp C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 755 blib\arc +h\auto\Ter m\ReadKey\ReadKey.dll C:\Perl\bin\perl.exe -MExtUtils::Command -e cp ReadKey.bs blib +\arch\auto \Term\ReadKey\ReadKey.bs C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 blib\arc +h\auto\Ter m\ReadKey\ReadKey.bs
Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. C:\Perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" -w test.pl 1 .. 8 Can't load 'blib\arch/auto/Term/ReadKey/ReadKey.dll' for module Term:: +ReadKey: l oad_file:Invalid access to memory location at C:/Perl/lib/DynaLoader.p +m line 229 . at test.pl line 21 Compilation failed in require at test.pl line 21. BEGIN failed--compilation aborted at test.pl line 21. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x2' Stop.
So Load up test.pl in Komodo and get the same error. The line in question is just:
use Term::ReadKey;Your wisdom would be appreciated
Regards
PS I see Term-ReadKey is a module on PPM, so I pressed the validate button and it says "fine", or words to that effect.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Which Version of Prolog
by james2vegas (Chaplain) on Aug 26, 2009 at 02:04 UTC | |
by Steve_BZ (Chaplain) on Aug 26, 2009 at 11:06 UTC | |
by james2vegas (Chaplain) on Aug 26, 2009 at 11:41 UTC | |
by Steve_BZ (Chaplain) on Aug 26, 2009 at 13:10 UTC | |
by salva (Canon) on Aug 26, 2009 at 15:03 UTC | |
| |
by tmaly (Monk) on Aug 26, 2009 at 13:26 UTC | |
by Steve_BZ (Chaplain) on Aug 26, 2009 at 10:30 UTC |