Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Compiling xs and c for Lingua::Stem::Snowball.

by KillahFlippah (Initiate)
on Nov 16, 2010 at 21:52 UTC ( #871847=perlquestion: print w/ replies, xml ) Need Help??
KillahFlippah has asked for the wisdom of the Perl Monks concerning the following question:

I have been charged with downloading this module (found here: http://search.cpan.org/~creamyg/Lingua-Stem-Snowball-0.952/lib/Lingua/Stem/Snowball.pm) but I cannot install it to my Windows 32-bit machine.

It might have something to do with my computer not being able to compile the c files that this module uses, or the xs ones. I really don't know what I'm talking about here, I'm sorry. I was wondering if there's a compiled version of this snowball interface somewhere, or if there's a compiler I can download, or another way to make this work.

Here's what my command line tells me:

C:\Documents and Settings\fdiazara\Desktop\Lingua-Stem-Snowball-0.952> + perl -w BUild.PL Checking whether your kit is complete... Looks good Math::BigInt: couldn't load specified math lib(s), fallback to Math::B +igInt::FastCalc at C:/Perl/lib/Win32API/File.pm line 20 Checking prerequisites... Looks good Deleting Build Removed previous script 'Build' ***This part comes up because I had +already tried installing before -Felipe Creating new 'Build' script for 'Lingua-Stem-Snowball' version '0.952' ...[Command line]> perl Build Math::BigInt: couldn't load specified math lib(s), fallback to Math::B +igInt:FastCalc at C:/Perl/lib/Win32API/File.pm line 20 Generating script 'libstemmer_c\libstemmer\libstemmer.ccs' cl -nologo -c @"libstemmer_c\libstemmer\libstemmer.ccs" -Fo"libstemmer +_c\libstemmer\libstemmer.obj" "libstemmer_c\libstemmer\libstemmer.c" 'cl' is not recognized as an internal or external command, operable pr +ogram or batch file. error building dll file from 'libstemmer_c/libstemmer/libstemmer.c' at C:/Perl/lib/ExtUtils/CBuilder/Platform/Windows.pm line 143. ...[command line]> perl Build test Math::BigInt: couldn't load specified math lib(s), fallback to Math::B +igInt:FastCalc at C:/Perl/lib/Win32API/File.pm line 20 Generating script 'libstemmer_c\libstemmer\libstemmer.ccs' cl -nologo -c @"libstemmer_c\libstemmer\libstemmer.ccs" -Fo"libstemmer +_c\libstemmer\libstemmer.obj" "libstemmer_c\libstemmer\libstemmer.c" 'cl' is not recognized as an internal or external command, operable pr +ogram or batch file. error building dll file from 'libstemmer_c/libstemmer/libstemmer.c' at C:/Perl/lib/ExtUtils/CBuilder/Platform/Windows.pm line 143. ...[command line]> perl Build install Math::BigInt: couldn't load specified math lib(s), fallback to Math::B +igInt:FastCalc at C:/Perl/lib/Win32API/File.pm line 20 Generating script 'libstemmer_c\libstemmer\libstemmer.ccs' cl -nologo -c @"libstemmer_c\libstemmer\libstemmer.ccs" -Fo"libstemmer +_c\libstemmer\libstemmer.obj" "libstemmer_c\libstemmer\libstemmer.c" 'cl' is not recognized as an internal or external command, operable pr +ogram or batch file. error building dll file from 'libstemmer_c/libstemmer/libstemmer.c' at C:/Perl/lib/ExtUtils/CBuilder/Platform/Windows.pm line 143.

Thank you so much for any help you can give!

20101117 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

Comment on Compiling xs and c for Lingua::Stem::Snowball.
Download Code
Re: Compiling xs and c for Lingua::Stem::Snowball.
by syphilis (Canon) on Nov 16, 2010 at 23:33 UTC
    Assuming you have a recent build of ActivePerl, the simplest way for you to get a compiler is to:
    ppm install MinGW
    That will give you the gcc compiler, and the dmake make utility.
    No configuration needed - just 'ppm install' it and you're set to go.

    Cheers,
    Rob
      ...and "cl" command referenced in the output, is the linker, which comes with mingw gcc from memory. sorry I haven't kept pace with current win32 repositories.
      the hardest line to type correctly is: stty erase ^H

        Actually, 'cl' is the MS C(++) compiler supplied with Microsoft Visual Studio. By default, if ActiveState Perl on Windows can't find a compiler in your path, this is what it assumes for 'perl -V:cc'. It seems to search your path in order for either 'cl' or 'gcc'. I have both MSVC++ and MinGW installed on Windows XP with ActiveState 5.10.1 (note: the 'which' command below is a Windows batch file found at Re: One Bizarre Perl Problem)

        C:\> REM cl and gcc not in my path C:\> which cl 'cl' not found. C:\> which gcc 'gcc' not found. C:\> perl -V:cc cc='cl'; C:\> REM append gcc directory to path C:\> path %PATH%;c:\Dev-Cpp\bin C:\> which gcc c:\Dev-Cpp\bin\gcc.exe C:\> perl -V:cc Set up gcc environment - 3.4.2 (mingw-special) cc='c:/Dev-Cpp/bin/gcc.exe'; C:\> REM prepend cl directory to path C:\> path C:\Program Files\Microsoft Visual Studio 8\VC\bin;%PATH% C:\> which cl C:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe C:\> perl -V:cc cc='cl';

        For ActiveState, the best (easiest, cheapest) way to go is:

        ppm install MinGW ppm install dmake
Re: Compiling xs and c for Lingua::Stem::Snowball.
by pobocks (Chaplain) on Nov 17, 2010 at 05:52 UTC

    Also, a helpful tip - put command-line output in <code></code> tags; it'll make it a LOT more readable.

    Actually, just read Writeup Formatting Tips - there's a lot of good stuff in there, and following these makes it more likely people will respond well to your post.

    for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";
Re: Compiling xs and c for Lingua::Stem::Snowball.
by jandrew (Hermit) on Nov 17, 2010 at 22:33 UTC

    What flavor of Perl are you running on your window's machine? If you are running ActiveState perl then type in ppm in a command prompt and use the ppm utility that comes up. A quick search shows supported windows ppm packages from perl 5.6 through perl 5.12 for this module.

    See also the windows module tutorial A guide to installing modules for Win32 written by holli++

    Update:windows has it's brand of fun for those not using ppm and trying to compile a module that isn't pure perl but the first hurdle is to make sure you are using the correct flavor of make. To find this out type

    perl  -V:make

    at a cmd prompt.

Re: Compiling xs and c for Lingua::Stem::Snowball.
by thargas (Deacon) on Nov 18, 2010 at 13:08 UTC
    You could also look at Strawberry perl, if you're not fixed on your current perl. One of the reasons for it is to avoid such problems by including a complete build environment with compiler et al.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://871847]
Approved by aquarium
Front-paged by aquarium
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-02 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (31 votes), past polls