in reply to Re^2: Install WWW::Curl
in thread Install WWW::Curl

Unable to build distribution on this platform.

Seems like you need to heed my advice about using the prebuilt PPM binary or you need to invest more time into properly building and installing libcurl. Maybe you have better luck by downloading and installing a prebuilt libcurl, together with curl-config for your operating system. There is nothing we can do to help you there. If you have problems with building and installing libcurl, ask your system administrator or the libcurl developers.

Replies are listed 'Best First'.
Re^4: Install WWW::Curl
by syphilis (Archbishop) on Jun 24, 2008 at 10:36 UTC
    Locating required external dependency bin:curl-config... missing.

    In the Makefile.PL I see:
    # This is a hack. If you have libcurl installed, just specify curl.h b +elow # and comment out this line. requires_external_bin 'curl-config';
    That would presumably be the source of the error - so try installing libcurl and then comment out that line of code, as suggested, and "specify curl.h below".

    This module use Module::Install ... and it seems that the Makefile.PL tries to find libcurl for you ... and it looks like the Makefile.PL wants to generate the XS file - so expect all sorts of difficulties in trying to get the thing to build.

    You'll need a compiler. Which one are you using ? (Visual Studio or MinGW ?)
    It will probably be much easier if you install the module using ppm - assuming you can find a ppm for your version of perl. Which version are you using ?

    Update: Read the WWW::Curl Readme file if you want to persevere with building it yourself.

    Cheers,
    Rob
        I downloaded http://www.gknw.net/mirror/curl/win32/curl-7.18.2-devel-mingw32.zip. (It's the "libcurl" link for Win32 at http://curl.haxx.se/download.html.)
        Then I unzipped to C:\curl and added C:\curl\curl-7.18.2-devel-mingw32\bin to my path.

        Next, downloaded the WWW::Curl-4.04 source from CPAN and extracted it to my usual build directory.
        First up, in the Makefile.PL, I commented out the line requires_external_bin    'curl-config'; and added C:/curl/curl-7.18.2-devel-mingw32/include to @includes (as you had also done). Then it was a matter of running:
        perl Makefile.PL INC="-IC:/curl/curl-7.18.2-devel-mingw32/include" LIB +S="-LC:/curl/curl-7.18.2-devel-mingw32/lib -lcurldll"
        followed by dmake test and dmake install A couple of the tests failed - but hopefully that's good enough for your purposes. The full build output can be viewed below my sig.

        Update: The build I've done is a dynamic build. The libcurl binaries that I downloaded also included a static libcurl lib (libcurl.a), and it should be possible to build against that static lib instead of the dynamic lib. That should be achievable by replacing -lcurldll with -lcurl at the end of the above "Perl Makefile...." command. But I couldn't get that to work - I got about 30 errors relating to linking to libcurl of the type:
        Curl.o:Curl.c:(.text+0x30ce): undefined reference to `_imp__curl_easy_ +init'
        I think that's telling me that it's insisting on building against the dynamic lib. (I don't know why that is so - and I haven't gone looking for the answer.)

        Cheers,
        Rob