Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Windows PDL complie issue

by hokie (Monk)
on Aug 17, 2005 at 19:28 UTC ( #484549=perlquestion: print w/ replies, xml ) Need Help??
hokie has asked for the wisdom of the Perl Monks concerning the following question:

Monks,

As part of a project at work I need to utilize PDL::Opt::Simplex to do a little optimization. Being on a windows box, not all the modules I would desire are available via PPM. PDL-2.4.2 appears to be that way. So in order to get the functionality I need I went about learning how to install/compile modules that include c++. I read all the relevant tutorials and SoPW via super search. I was able to make progress so that there was less complaining by Makefile.pm and nmake. Nmake still dies and throws the error below:

C:\PDL-2.4.2>nmake

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_ST
RICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SY
S -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"2.4.2\"
-DXS_VERSION=\"2.4.2\" -IC:\Perl\lib\CORE pdlcore.c
pdlcore.c
c1 : warning C4349: /Gf is deprecated and will not be supported in future versio ns of Visual C++; remove /Gf or use /GF instead
pdlcore.c(22) : warning C4101: 'ref' : unreferenced local variable
pdlcore.c(71) : warning C4244: 'initializing' : conversion from 'double' to 'PDL _Byte', possible loss of data
pdlcore.c(72) : warning C4244: 'initializing' : conversion from 'double' to 'PDL _Short', possible loss of data
pdlcore.c(73) : warning C4244: 'initializing' : conversion from 'double' to 'PDL _Ushort', possible loss of data
pdlcore.c(74) : warning C4244: 'initializing' : conversion from 'double' to 'PDL _Long', possible loss of data
pdlcore.c(75) : warning C4244: 'initializing' : conversion from 'double' to 'PDL _LongLong', possible loss of data
pdlcore.c(76) : warning C4244: 'initializing' : conversion from 'double' to 'PDL _Float', possible loss of data
pdlcore.c(88) : warning C4244: 'initializing' : conversion from 'double' to 'PDL _Float', possible loss of data
pdlcore.c(100) : warning C4101: 'hash' : unreferenced local variable
pdlcore.c(140) : warning C4101: 'fake' : unreferenced local variable
pdlcore.c(144) : warning C4101: 'dat' : unreferenced local variable
pdlcore.c(402) : warning C4018: '<' : signed/unsigned mismatch
pdlcore.c(455) : warning C4101: 'msg' : unreferenced local variable
pdlcore.c(709) : error C2036: 'void *' : unknown size
pdlcore.c(927) : error C2036: 'void *' : unknown size
pdlcore.c(1145) : error C2036: 'void *' : unknown size
pdlcore.c(1363) : error C2036: 'void *' : unknown size
pdlcore.c(1581) : error C2036: 'void *' : unknown size
pdlcore.c(1799) : error C2036: 'void *' : unknown size
pdlcore.c(2017) : error C2036: 'void *' : unknown size
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x2' Stop.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x2' Stop.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x2' Stop.

I was wondering if this error was still a complier setup problem or a problem that runs deeper with the PDL setup. Obviously I could be doing something wrong that is very apparent, but I donít see it. I would like to learn how to compile modules on windows but Iím really looking for a solution that will get Opt::Simplex working. Thank you all in advance for your wise answers.

-hokie

Comment on Windows PDL complie issue
Re: Windows PDL complie issue
by Xaositect (Friar) on Aug 17, 2005 at 23:42 UTC

    Not all C compilers are created equal, and the linux Gnu compiler has some differences with the Microsoft compiler. Nmake also has differences from the linux make, all of which means it's up to the module to have code and a build process that works in either place.

    As you've found out, your module involves some C code which the Microsoft tools don't seem to like, so unless you're fluent enough in C to resolve those differences, you may be out of luck. If you've gotten far enough to get messages like this one, you're probably Doing The Right Thing.

    I realize this probably isn't what you wanted to hear, but you may have more luck building for Cygwin than with the microsoft compiler. Good luck.


    Xaositect - Whitepages.com
Re: Windows PDL complie issue
by PodMaster (Abbot) on Aug 18, 2005 at 08:27 UTC
    You need to 'nmake realclean' and then show everything from 'perl Makefile.PL' and 'nmake'.

    You'll also want to get a newer version of nmake (6.00.9782.0), as you'll run into some trouble with that old version eventually.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      I did as you suggested, minus getting a new version of nmake (couldn't find it for free) and the output of perl Makefile.PL is here. And the nmake output is here. These files were piped from the command prompt, so the parts at the end are what were not inserted into the prompt. It looks like the error is the same as before. Not sure where to go next...
      Thanks for your help

      -hokie

        There is plenty of space to fit those files in your post (update). Now, nothing looks out of the ordinary before the error, so finally I can get to it. The problem is the line
        pptr+pdl->dimincs[pdl->ndims-1-plevel]* i * pdl_howbig(pdl->datatype)
        And pptr is of type void*, a nonstandard feature that gcc allows, but apparently equivalent to
        ((char*)pptr)+pdl->dimincs[pdl->ndims-1-plevel]* i * pdl_howbig(pdl->d +atatype)
        . Make sure to edit pdlcore.c.PL (it might not be a bad idea to alert the PDL folks).

        While you're at it, you might need to add `echo exit 0 >pdl` unless -e 'pdl'; before exit in pdl.pl (man what a mess).

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://484549]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2014-08-21 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (136 votes), past polls