Compiling WWW::Curl on ActivePerl

狂风中的少年 提交于 2019-12-25 15:23:09

问题


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


回答1:


I presume the original was

open(H_IN, "-|", "gcc", "$curl_h")

The reason you have to change that in because noone got around to implementing feature in Windows. Change it to

open(H_IN, qq{gcc "$curl_h" |})

Use the right name and syntax for your compiler.




回答2:


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.




回答3:


First, many people don't know that you can use ppm to install MinGW to use cpan to install modules.

Second, if the libcurl provided by your module doesn't do SSL, you can try and replace it with a suitable SSL version from the download page. This might well fail, but you might also be lucky.



来源:https://stackoverflow.com/questions/5399399/compiling-wwwcurl-on-activeperl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!