Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Can't locate loadable object for module in @INC

by Steve_BZ (Chaplain)
on Nov 10, 2009 at 19:31 UTC ( [id://806326]=perlquestion: print w/replies, xml ) Need Help??

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

Hi People,

I'm sorry if this is a Perl 101 question. I have Language::Prolog::Yaswi CPAN installation working fine on Linux, but the install fails on Windows. So I decide to try to install by hand. The two dependencies Language::Prolog::Types and Language::Prolog::Sugar, both install fine with CPAN, and I copy Yaswi.pm into the C:\Perl\site\lib\Language\Prolog directory. It fails because it can't find Low.pm. I copy Low.pm into C:\Perl\site\lib\Language\Prolog\Yaswi. I see that there is a pl.pl in the Linux version so I copy this too into the Prolog directory and run. Then I get this error:

Can't locate loadable object for module Language::Prolog::Yaswi::Low i +n @INC (@INC contains: C:\Program Files\ActiveState Komodo IDE 5\lib\ +support\dbgp\perllib C:/Perl/site/lib C:/Perl/lib .) at C:/Perl/site/ +lib/Language/Prolog/Yaswi.pm line 54 Compilation failed in require at C:/Perl/site/lib/Language/Prolog/Yasw +i.pm line 54. BEGIN failed--compilation aborted at C:/Perl/site/lib/Language/Prolog/ +Yaswi.pm line 54.

So I inspect the Linux version and I realise that the Linux installation is running on two parallel paths,

usr/local/lib/perl/5.10/Language/Prolog

and

usr/local/share/perl/5.10.0/Language/Prolog

This doesn't seem right, but it's still working. Should I try to replicate this on Windows?

I feel that this is something obvious, but I'm not clear what is going wrong here.

By the way, line 54 in the Yaswi.pm is just

use Language::Prolog::Yaswi::Low.pm

Regards

Steve

Replies are listed 'Best First'.
Re: Can't locate loadable object for module in @INC
by keszler (Priest) on Nov 10, 2009 at 19:43 UTC
    Language::Prolog::Yaswi::Low is not purely Perl code. If you have a full compiler setup on Windows you can try the standard install process:
    > perl Makefile.PL > make > make test > make install
    Otherwise, you'll have to find a packaged version for Windows. If you're using Activestate Perl, first try:
    > ppm install Language::Prolog::Yaswi
    If Language::Prolog::Yaswi::Low is not in Activestate's repository, try the UWinnipeg, bribes.org, or trouchelle repositories.
Re: Can't locate loadable object for module in @INC
by moritz (Cardinal) on Nov 10, 2009 at 19:53 UTC
    use Language::Prolog::Yaswi::Low.pm

    That's wrong in two ways. First the .pm shouldn't be there. Secondly the documentation explicitly says

    # don't use Language::Prolog::Yaswi::Low; use Language::Prolog::Yaswi; # instead ;-)
    Perl 6 - links to (nearly) everything that is Perl 6.

      My bad, it doesn't say.pm!

      But Yaswi calls Yaswi::Low.

      Thanks and regards

      Steve

Re: Can't locate loadable object for module in @INC
by ikegami (Patriarch) on Nov 10, 2009 at 20:02 UTC

    By the way, line 54 in the Yaswi.pm is just use Language::Prolog::Yaswi::Low.pm

    Really?

    $ perl -e'use Language::Prolog::Yaswi::Low.pm' syntax error at -e line 1, near "use Language::Prolog::Yaswi::Low." Execution of -e aborted due to compilation errors.

    It fails because it can't find Low.pm

    Not according to the error your posted. It can't find the DLL associated with the module.

    I copy Yaswi.pm into the C:\Perl\site\lib\Language\Prolog directory

    That's not how you install a module!! Start by installing the module.

      Ah you're right, I didn't read the message properly. It's an error *in* Low.pm, not Low.pm itself. Thanks for that.

      It's true that I'm not very experienced at installing from CPAN. I use ppm when I can, but this isn't on it. I did try

      Makefile.PL nmake nmake test nmake install
      but it failed several times. I emailed the auther about it's failure to install, he was very helpful but mainly a Linux guy and could only say that he know a lot of windows installers had had problems. So I thought a cut and paste job might work. Clearly not. Maybe I'll go back to the install and paste the issues here and then everyone can benefit from it.

      Thanks and regards

      Steve

        You might want to try posting the first errors in the build, here.
Re: Can't locate loadable object for module in @INC
by Steve_BZ (Chaplain) on Nov 11, 2009 at 14:24 UTC

    Hi Guys

    I've now done a full module install for Yaswi. Here are the results

    Firstly Makefile.PL

    C:\Perl\cpan\sources\Language-Prolog-Yaswi-0.18>Makefile.PL Set up gcc environment - 3.4.5 (mingw special) retrieving SWI-Prolog configuration: running 'plcon.exe -dump-runtime-variables' PLBASE: c:/program files/prolog PLARCH: i386-win32 PLLIBS: PLLIB: libpl.lib PLCFLAGS: /MD /GX PLLDFLAGS: PLSOEXT: dll PLVERSION: 50664 PLSHARED: yes PLTHREADS: yes checking thread support in Perl and SWI-Prolog: thread support enabled creating plconfig.c Writing Makefile for Language::Prolog::Yaswi::Low Writing Makefile for Language::Prolog::Yaswi

    It seems to have worked fine. Now here is the nmake:

    <readmore>C:\Perl\cpan\sources\Language-Prolog-Yaswi-0.18>nmake Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. nmake -f Makefile all -nologo gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" Low.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" callback.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" callperl.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" hook.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" perl2swi.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" swi2perl.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" plconfig.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" argv.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" query.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" vars.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" context.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" engines.c gcc -c -I. -I"c:/program files/prolog/include" -DNDEBUG -DWI +N32 -D_CON SOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE +-DPRIVLIB_ LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO - +DPERL_MSVC RT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -O2 -DVERSION=\"0.18 +\" -DXS_V ERSION=\"0.18\" "-IC:\Perl\lib\CORE" opaque.c Running Mkbootstrap for Language::Prolog::Yaswi::Low () C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 Low.bs dlltool --def Low.def --output-exp dll.exp g++ -o ..\blib\arch\auto\Language\Prolog\Yaswi\Low\Low.dll -Wl +,--base-fi le -Wl,dll.base -mdll -L"C:\Perl\lib\CORE" Low.o callback.o callperl.o + hook.o pe rl2swi.o swi2perl.o plconfig.o argv.o query.o vars.o context.o engines +.o opaque. o -Wl,--image-base,0x28030000 C:\Perl\lib\CORE\perl58.lib "c:\program + files\pro log\lib\libpl.a" C:\msys\mingw\lib\libkernel32.a C:\msys\mingw\lib\lib +user32.a C :\msys\mingw\lib\libgdi32.a C:\msys\mingw\lib\libwinspool.a C:\msys\mi +ngw\lib\li bcomdlg32.a C:\msys\mingw\lib\libadvapi32.a C:\msys\mingw\lib\libshell +32.a C:\ms ys\mingw\lib\libole32.a C:\msys\mingw\lib\liboleaut32.a C:\msys\mingw\ +lib\libnet api32.a C:\msys\mingw\lib\libuuid.a C:\msys\mingw\lib\libws2_32.a C:\m +sys\mingw\ lib\libmpr.a C:\msys\mingw\lib\libwinmm.a C:\msys\mingw\lib\libversion +.a C:\msys \mingw\lib\libodbc32.a C:\msys\mingw\lib\libodbccp32.a C:\msys\mingw\l +ib\libmsvc rt.a dll.exp </readmore> C:\msys\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld. +exe: C:\ms ys\mingw\lib\libmsvcrt.a(dsjhs00137.o): bad reloc address 0x154 in sec +tion `.tex t' collect2: ld returned 1 exit status NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x1' Stop. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x2' Stop. C:\Perl\cpan\sources\Language-Prolog-Yaswi-0.18>

    Sadly at this point I had no idea what a bad reloc address 0x154 in section '.text' was

    Any help gratefully received.

    Regards

    Steve

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://806326]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-25 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found