Skip Menu |

This queue is for tickets about the true CPAN distribution.

Report information
The Basics
Id: 65586
Status: open
Priority: 0/
Queue: true

People
Owner: CHOCOLATE [...] cpan.org
Requestors: MITHALDU [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: true does not compile on ActivePerl 5.10.1 Build 1007
That distribution of Perl comes with its own installation of MinGW, which on my system does not seem to be able to copy with true.pm. The build output does not tell me much, but i hope it'll help you: https://gist.github.com/818295 If you need any further info at all, i'll be more than happy to help and provide. :)
I did some more digging into this problem today. Here's what i found: (Please forgive me for being very wordy and stating obvious things, i'm not experienced with C.) undefined reference to `hook_op_check' undefined reference to `op_annotation_group_free' These two indicate that the linker didn't load needed libraries. Grepping through site/lib indicated that it needed: c:\Perl\site\lib\auto\B\Hooks\OP\Annotation\Annotation.dll and c:\Perl\site\lib\auto\B\Hooks\OP\Check\Check.lib Why it doesn't find these is somewhat obvious: The makefile never tries to load them: C:\MinGW\bin\g++.exe -o blib\arch\auto\true\true.dll -Wl,--base-file - Wl,dll.base -mdll -L"C:\Perl\lib\CORE" true.o C:\Perl\lib\CORE \perl510.lib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 - ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -lmsvcrt dll.exp After some digging into ExtUtils::MakeMaker it turns out that this is because ExtUtils::Liblist::_win32_ext only tries to find libraries ending on ".a", thanks to $Config{lib_ext}. I'm not really sure why this is. I also couldn't find a way to get around this. So what i did is generate the makefile and change the LDLOADLIBS parameter in it to look like this: -L"c:\Perl\site\lib\auto\B\Hooks\OP\Check" -L"c:\Perl\site\lib\auto\B \Hooks\OP\Annotation" -lCheck -lAnnotation -lkernel32 -luser32 -lgdi32 - lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 - lmsvcrt I added the two directories of BHO Check and Annotation, as well as their library names. This made dmake succeed and compile: https:// gist.github.com/842189 Doing dmake test afterwards first resulted in an error: true.dll could not find dll.exp.dll. Inspecting true.dll it turned out that it expected 'op_annotate' and friends from dll.exp.dll. Since these are actually in Annotate.dll, which is usually found here: c:\Perl\site\lib\auto\B\Hooks\OP\Annotation\Annotation.dll I copied and renamed it over to blib\arch\auto\true\dll.exp.dll and ran the tests again. This time they passed. As such, this is not an issue of the module not being able to work on Windows, but rather ExtUtils::* being odd. Again, if i can do anything to help, just ask and i'll try my best. :)
Thanks for your detailed analysis. Unfortunately, as you say, there's not a lot I can do about this in true. Could you try raising it upstream, either as an ExtUtils::Depends or ExtUtils::MakeMaker issue? Possibly related: https://rt.cpan.org/Ticket/Display.html?id=45432 https://rt.cpan.org/Ticket/Display.html?id=21430
Well, i was hoping that someone who knows ExtUtils::MakeMaker better would know how to configure it in Makefile.PL in such a manner to make it work without upstream changes. (After all, there's a plethora of perl modules that compile fine under ActiveState and true seems to compile fine on Strawberry. (Which reminds me that i should probably check to see what happens differently there.)) This hope is mainly because hoping for EUMM to get a full release on CPAN with any fixes anytime soon seems very futile. :( I will have to raise a Depends issue anyhow though, since it only finds OP::Check, not OP::Annotate. I'll see if i can get something lucid written up for both of them in the evening.
From: kjw [...] pathillogical.com
On Thu Feb 24 09:43:57 2011, MITHALDU wrote: Show quoted text
> (After all, there's a plethora of perl > modules that compile fine under ActiveState and true seems to compile > fine on Strawberry. (Which reminds me that i should probably check to
see Show quoted text
> what happens differently there.))
If you're using ActivePerl you should try "ppm install true" from the command line (with the ActivePerl bin directory in your path, of course). The true module is available pre-compiled for most platforms: http://code.activestate.com/ppm/true/ Hope this helps.
Thanks for the note, i'll ask Jan how he did that. The end goal however is to get everything installing from CPAN itself.
Did some more digging, had input from Jan and slept over the matter. Thus, new findings and thoughts: ExtUtils::Depends was and is working perfectly fine. My local system was missing Annotation.(a|lib). I have no idea why and cannot reproduce the matter. It's also not very important at the moment, for the following reason: I was able to modify the Makefile.PL of true.pm in such a way that it can compile and test fine without any changes needed to EUMM. The logic is pretty simple: MinGW does not care whether the linker library is a .a or .lib, EU::Depends doesn't care either, it'll pick up on either one existing and send EUMM working parameters. Only EUMM is being a stick in the mud by insisting on .a. So, the solution is for Makefile.PL to check for the dependencies found by EU::Depends whether a .a file or a .lib file exists, and then to copy any .libs to .a if it's running under ActivePerl. I've created a pull request to that effect: https://github.com/ chocolateboy/true/pull/3 I'll still check the current state of EUMM on github and patch Liblist::Kid if necessary, but at least with this change we can get rolling immediately for true.pm and perl5i.
I just commited a fix to EUMM in a separate branch so the other toolchain people can review it, with the discussion (hopefully) happening here: https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/3 Pending further input on that as well, followed by a merge and clearing up of other currently blocking issues a new version of EUMM should work fine with an unchanged true.pm.
Great! Thanks for all your work on this. If there's a delay in landing the EUMM fix, for any reason, please ping me and I'll apply and release your workaround.
I've just released 0.17 with the workaround (thanks), but I'll keep this open till it's fixed in EUMM.
RT-Send-CC: mschwern [...] cpan.org
Thanks a lot. Sadly i am an idiot and forgot to test a certain situation, so it's still failing. I'll be opening another pull request on github soonish.