Re: Question about building modules on W2K

From: Sisyphus (kalinaubears_at_iinet.net.au)
Date: 09/25/04


Date: Sat, 25 Sep 2004 18:36:19 +1000
To: "corn29@ no_spam excite.com" <corn29@excite.com>

corn29@ no_spam excite.com wrote:
> Hello,
>
> I have two environments here -- development and production. The
> software architecture of the boxes are strictly controlled by the
> security administrators. The Perl I have is 5.8 but it's pretty
> stripped down (no additional modules, ppm, etc.). We have the need
> for and I have the go-ahead to load Win32. I got Win32 built but it
> didn't go exactly according to CPAN's HOWTO.
>
> While on the development suite, I did 'perl Makefile.PL' and the
> package looked good but when I ran 'nmake' next, it failed with, "'cl'
> is not recognized as a internal or external command yada yada yada".
> So I went to a box which has MS Visual C++ on it and 'nmake' worked
> great (none of this is in CPAN's HOWTO). I did 'nmake install' and
> was able to run some test scripts which used Win32.
>
> So now that this is working on dev, I took the compiled files (and
> nmake 1.5, which is supposed to be stand alone) over to the production
> suite. 'nmake install' failed there. I decided just to copy the
> files over to \...\site\lib and when I ran the test scripts I got a
> system error bitchin that mscvr71.dll couldn't be found. MSVC++ put
> its dirty little hands all over my perl module and without loading the
> IDE on the boxes, I cannot use the Win32 module. And obviously I'm
> not going to put an IDE on a production suite.
>

I can't find mscvr71.dll (or msvcr71.dll) anywhere within my Visual
Studio 6 or Visual Studio 7 (.NET) installations. Where is that dll
located on the box that has it ? (Also please verify that the name is
correct.) In general, afaik, the compilers themselves contain very few
dll's.

> So, is there a way to build Win32 so that it can be deployed on a box
> that doesn't have cl or any of the MSVC++ *.dlls?
>

In my experience this is never a problem. I have binaries built with
MSVC++ 6 working quite happily on a perl built using the gcc compiler -
and vice versa.

And the binaries that ActiveState provide generally end up on machines
that don't have any compiler at all.

I would expect those very same binaries to work with a perl that was
built with Visual Studio 7. (I've verified that the AS binaries work
with gcc-built perl, but *not* that they work with VS7-built perl.
Perhaps there are issues I'm unaware of.)

The key to building binaries is to use the same compiler that was used
to build perl. If your perl was built with VS 6, then use VS 6 to build
the binaries. Do that and I would expect those binaries to work with a
perl built with VS 7, or a perl built with gcc, or a perl built with
Borland.

If your perl was built with VS 7, then use VS 7 to build the binaries.
Do that and I would expect those binaries to work with a perl built with
VS 6, or a perl built with gcc, or a perl built with Borland.

Where you will get into trouble (and I suspect this is where you have
come undone) is if, for example, you build your Win32 module binaries
using a perl that was built with VS 6, but you use the VS 7 compiler.

Hope there's something there that helps.

I could actually send you binaries of Win32 built using Visual Studio 6,
Visual Studio 7, or gcc (if that helps). I would expect each of those
binaries to work eaqually well on your perl (irrespective of what was
used to build your perl). And if my expectation was incorrect in any
way, then we'd both learn something :-)

Cheers,
Rob

-- 
To reply by email u have to take out the u in kalinaubears.


Relevant Pages

  • Re: gcc compiled perl runtime module
    ... Prereq is that if you need to compile a perl module with a c- ... compiler this compiler needs to be the same as ... the compiler which was used for compiling the perl binaries itself. ... VAC binaries. ...
    (comp.unix.aix)
  • setuid perl scripts ?
    ... It is my distinct impression that setuid perl scripts are supposed to ... copy of perl built in the obvious way in the ports tree. ...
    (freebsd-questions)
  • Re: Fwd: DBD::Informix A configuration failure
    ... Perl doesn't think your compiler handles prototypes. ... Testing whether your Informix test environment will work... ... >> problems with the test program, you will need to revisit this ...
    (perl.dbi.users)
  • Re: ANNOUNCE: DBD:Oracle 1.18
    ... Well a warning in one compiler is better than and error in an other so I ... This might be a problem more with the older oracle OCI in your client. ... perl -Mblib t/26exe_array.t ...
    (perl.dbi.users)
  • Re: Fwd: DBD::Informix A configuration failure
    ... Your previous subject line was 'problem install DBD Informix'. ... > perl Makefile.PL ... > Configuring IBM Informix Database Driver for Perl Version 2003.04 ... Perl doesn't think your compiler handles prototypes. ...
    (perl.dbi.users)