Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I note you use libcurl installed from MSYS2 other than win64 version, that's why you can build successfully I think

Yes, that probably makes it a bit simpler - certainly a lot simpler than the builds I did a couple of years ago against static libraries that I had built from source.

I finally solved the problem regarding the "loadable library and perl binaries" mismatch - and in so doing, I discovered that I had faced (and solved) the exact same problem when I built Net-Curl-0.37.
There's a line in the Makefile.PL:
CCFLAGS => $devel_cflags . ' ' . $curl{cflags} . $bits, that needs to be modified to: CCFLAGS => $Config::Config{ccflags} . ' ' . $devel_cflags . ' ' . $ +curl{cflags} . $bits,
That change then also brings about the need to patch Curl.xs:
--- Curl.xs_orig 2019-11-20 11:44:50 +1100 +++ Curl.xs 2019-11-20 22:55:23 +1100 @@ -17,6 +17,11 @@ #include "perl.h" #include "XSUB.h" +#ifdef __MINGW32__ +#undef fread +#undef fwrite +#endif + #include <curl/curl.h> #include <curl/easy.h> #include <curl/multi.h>
I got rid of the overflow in conversion from 'long long unsigned int' to 'int' warning by patching Curl_multi.xsh:
--- Curl_multi.xsh_orig 2019-11-20 11:54:58 +1100 +++ Curl_multi.xsh 2019-11-20 11:55:35 +1100 @@ -564,8 +564,8 @@ int socket_action( multi, sockfd=CURL_SOCKET_BAD, ev_bitmask=0 ) Net::Curl::Multi multi - int sockfd - int ev_bitmask + IV sockfd + IV ev_bitmask PREINIT: int remaining; CURLMcode ret;
though it doesn't seem to make any difference to the way that the test suite behaves .... and the test suite doesn't behave very well.
A lot of the tests fail or hang. And the examples scripts hang or crash - except for examples/04-share-threads.pl (which runs fine).

The Net-Curl-0.41 test suite covers much more than the Net-Curl-0.37 suite did. 0.37 passed all of its tests, and 0.41 still passes the same tests.
The problems are with the other tests in 0.41 (ie the ones that weren't in 0.37).
I've no idea how useful Net-Curl is on Windows - I think it's a good idea to stick with Inline::C if you can get it to do what you need.

I also built Net-Curl-0.41 with Strawberry Perl 5.30.0.1 - again, building against the MSYS2 libraries.
I get identical results with Strawberry Perl - which is to be expected.
Strawberry Perl's perl/bin/pkg-config.bat doesn't automatically find the Curl library, so I renamed it to pkg-config.bat_hide. With that done, the MSYS2 mingw64/pkg-config.exe gets used instead, and the Curl library is found.

Cheers,
Rob

In reply to Re^8: Can't call libcurl with Inline::C on Windows by syphilis
in thread Can't call libcurl with Inline::C on Windows by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-23 15:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found