At 10:17 PM -0600 8/21/07, Mark Berryman wrote:
>I recently added the modules Image::Magick and PDF::API2 to my system.  Aside 
>from finding and building all of the prerequisites, the only major obstacle I 
>encountered was the need to build the supporting code using 
>/NAMES=(AS_IS,SHORTENED) and the fact that Perl is not built that way.
>
>Are there any plans on the horizon to:
>
>Make /NAME=AS_IS the default for building Perl on VMS?

I wonder whether that would break more things than it would fix.
We've had the following configuration option for a long time:

$ @configure -"Dusecasesensitive" -"des"

and it wouldn't be that hard to make it the default.  I just worry
about how many other libraries assume all upper case symbol names.
Since we generate our own linker options files, we could perhaps
create aliases to the upper case names but also provide the
mixed-case ones.  That would take some digging/debugging to get
working.

>Use the C compiler to shorten names rather than the code Perl uses currently?

The suggestion has come up before, and it's a good one.  The problem
as I understand it is that we have to know what the symbol name is
going to be at the time we translate XS into C.  So we'd have to
replicate the name mangling the C compiler does.  It's some kind of
polynomial that is not documented formally but can be scrounged from
newsgroup posts probably.  It needs to be implemented in pure Perl
because of how early in the build process it's needed and because it
needs to work in miniperl where dynamic extensions can't be loaded.

>
>The 2nd most common obstacle I encountered was the number of times that the 
>"perl makefile.pl" command generated an MMS file that contained Unix syntax 
>(e.g. -W switches in the CC command line).  Unfortunately, my knowledge of the 
>internals of the Perl extension build process is essentially non-existant so I 
>do not know where to fix this other than editing the MMS file after it is 
>created.  What would be the best way to get this addressed?

Well, the easiest way in any given case is to fix the broken
Makefile.PL that assumes everyone is using gcc on UNIX.  So, for
example, when Image::Magick's Makefile.PL does the following:

  # C compiler flags (e.g. -O -g)
   'CCFLAGS'     => "$Config{'ccflags'} -g -O2 -Wall -W -pthread",


we'd have to translate the gcc options into something, so -O2 would
become /OPTIMIZE=whatever, etc.  And of course that would need to be
conditionalized for VMS.  A better solution in this case would be to
just remove the non-standard options -- they can always be added from
the command line if you want them, and I don't think they'll do you
any good if Perl itself doesn't already have them (for example,
building an extension with threads means nothing if the main image
isn't built with threads).

A more general solution would try to parse all the options, translate
the ones we can, and ignore the ones we can't.   This would be more
or less the GNV approach.  We currently handle -I for the compiler
and -L for the linker, so there is precedent.
-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to