Search code examples
perlwindows-7libcurlnmakeactiveperl

Compiling WWW::Curl on ActivePerl


I'm trying (desperately) to build / install the newest version of WWW::Curl onto my activeperl box (I'll explain in a moment why I don't use the PPM)

I had to make some modifications as per the instructions found here: http://cpansearch.perl.org/src/SZBALINT/WWW-Curl-4.15/README.Win32

I also had to change the following line:

From:

open(H_IN, "-|" "gcc", "$curl_h") and $has_cpp++;

To:

open(H_IN, "gcc $curl_h") and $has_cpp++;

I finally got perl Makefile.PL to work but now, when I run nmake, I get the following:

Missing right curly or square bracket at -e line 1, at end of line
Execution of -e aborted due to compilation errors.
NMAKE:  fatal error U1077:  'C;|windows\system32\cmd.exe' : return code '0xff'
Stop.

Now, the reason I'm trying to compile this rather than using the PPM supplied by u.winnipeg is because the that PPM doesn't seem to support SSL transaction (I get "libcurl: ssl disabled") Now, if anyone can show me how to get ssl to run on this PPM, I'm more than happy to use it.

Thank you very much in advance


Solution

  • Well, I finally figured it out, thanks to everyone who responded. There were a bunch of things I had to change.

    Using http://cpansearch.perl.org/src/SZBALINT/WWW-Curl-4.15/README.Win32 as a guide:

    The open cmd as I did above worked fine. However, I did use the advice returned by ikegami, reinierpost, and mob.

    Using nmake /n (as advised by socket puppet), it printed out all of the perl statements which were being executed. I took this output and placed it into a .bat file and corrected the perl syntax.

    I changed all instances of

    pm_to_blib({{@ARGV}
    

    to

    pm_to_blib({@ARGV}
    

    (it is disturbing these were returned)

    Then, I had to link the libcurl libraries to each line instantiating g++, which were not linked correctly. After I added these references, everything else went smoothly.

    These were added:

    C:\lc\curl\lib\libcurl.a C:\lc\curl\lib\libcurldll.a
    

    Now, WWW::Curl is happily running on my system.

    As for using the PPM version, it is exactly because of SSL I had to upgrade. The newest version of WWW::Curl is 4.15 the ppm version is (I believe) 3.02.