Craig A. Berry wrote:
At 11:37 PM -0400 4/11/04, John E. Malmberg wrote:

I have since found that the GNV BASH does not apparently modify the DECC feature logicals, so any issues with them and Perl are externally introduced.
Meaning these were already there in your environment? Or that the GTK+ build requires them independently?

Not my environment. I am recreating someone else's work. The hard way by trying to update all the components to the bleeding edge as I go. :-)


I am trying to understand each step as I take it.

I have not actually tried to build GTK+ yet.


Craig points out that if Perl becomes unconditionally case preserving, it breaks the build of it self. So this should be noted as a build condition.
Specifically, MakeMaker's comparison of manifests with names retrieved from the filesystem needs to be case blind when case may be preserved, as logged in the following ticket:

http://rt.cpan.org/NoAuth/Bug.html?id=2746

I would expect that building Perl on an NTFS filesystem would be affected. NTFS is case blind by default on lookups, but returns the exact case for things like readdir().


OpenVMS can be set to be non-case blind on lookups for recent versions. I am not sure when that feature was added, or if it requires action to enable.

Of course the issue is that you need to have the Perl sources put on the ODS-5 volume in the exact case.

A simple fix may be to modify the .MMS file to set the DECC$ feature logical before running miniperl.

Such as $define/user DECC$EFS_CASE_PRESERVE FALSE FALSE

Then the build of Perl will not be victimized, and users can decide if they want that feature active.

I set a global variable in my patch. The DECC CRTL is only supposed to honor feature settings made before the DECC$RTL_INIT() is called. That is why the LIB$INITIALIZE psect is needed.

That makes it difficult to switch behaviors on the fly.

* All input filespecs need to be interpreted as UNIX format
This implies that "." needs to be interpreted as the current
directory.

So far I have not found anything to suggest that any UNIX file
names that could be mistaken for VMS filenames will be present.

The patch seems to be two things. First to tread "." as a UNIX
filespecificaiton, and using the DECC$FEATURE to Perl disable
the CRTL from from interpreting the feature setting that says to
interpret all filenames as UNIX.  The second is probably something
that Perl needs anyway to prevent it from being externally victimized.
What if it could honor the feature setting instead of needing to disable it? In fact it seems that is what you are doing when you allow "." to mean the current directory.

Essentially that was the intent of the patch, but I did not know how many things would break if the feature logical was set. With the DECC$FILENAME_UNIX_ONLY or DECC$FILENAME_UNIX_REPORT, the effective settings can be controlled by a script that converts from VMS to UNIX or back if needed.


* Output file specifications need to be displayed in UNIX format.
This is something that I do not have a conditional patch for.
The Perl module CWD.PM needs to return the current path in UNIX
format.
It's just returning the value of the DEFAULT logical name. It should be easy enough to make it run the result through VMS::Filespec::unixify if DECC$FILENAME_UNIX_REPORT is in effect.

I would expect so. It should also do it if DECC$FILENAME_UNIX_ONLY is in effect.


I am not sure how to do it, as I have no knowledge of Perl. Maybe that will change over time. :-)

* Apparently Perl must lie to the script so that the script thinks
that it is running under UNIX.  This is done in spec.pm
I do not have a conditional patch for this one either.
Hmm. What does the lie look like?

The instructions that I have are: "in [lib.file]spec.pm. In the modules table at the start, map VMS to Unix by commenting out (use #) the VMS line (line number 11)."


* The patch wants to use the CRTL unlink() function instead of
kill_all.  I do not know why.  It also wants the "unlink_all_versions"
defined.

I have modified locally the configure.com procedure to allow
specifying unlink_all_versions on a special build to do this.

I would think it is better to have this as a run-time option so
separate binaries were not needed.

With the attached patches, the test phase of the perl build fails
the following tests.

lib/ExtUtils/t/basic.................FAILED at test 28
lib/ExtUtils/t/zz_cleanup_dummy......FAILED at test 1
lib/File/Temp/t/tempfile.............FAILED at test 14
Failed 3 test scripts out of 775, 99.61% okay.

Is there some easy way to just run these failed tests in a way to get some idea of what exactly is failing?



The Perl idiom to delete all versions of a file is to say


1 while unlink 'file.dat';

But as far as making it always delete all versions, I think you are right a run-time option is better.

In doing this, I have discovered two things.

1. Gdiff on VMS can not handle it if it does not have write access to the files it is doing a diff on. It exists with an improperly signaled condition.

Hmm. I can't reproduce that with either the GNU diff from Freeware 5.0 nor the one in GNV.

My copy is not from GNV, and I do not remember where I got it from. I will switch to the GNV version then.


I think it's doable but it will take some time to get all this digested and make sure it doesn't break any currently expected behavior.

Agreed.



Note that your patch is reversed. The normal procedure is to do


$ diff oldfile newfile

My error. I was not paying attention to the order.


I will change my build procedure that automatically produces the gdiff file.


-#ifdef __DECC
-#pragma message disable pragma
-#pragma member_alignment save
-#pragma nomember_alignment longword
-#pragma message save
-#pragma message disable misalgndmem
-#endif
struct itmlst_3 {
unsigned short int buflen;
unsigned short int itmcode;
void *bufadr;
unsigned short int *retlen;
};
-#ifdef __DECC
-#pragma message restore
-#pragma member_alignment restore
-#endif

Are these alignment shenanigans necessary? If so, it's hard to see how any of what's currently there works.

Some of it allows the compiler to generate more efficient code, others prevent the code from being victimized by compiler settings.


As I understand it, DECC on ALPHA default is to not pack structures, and DECC on VAX default is to pack the structures.

The messages are suppressed so that you can set the C compiler to notify you of potential coding errors with out getting expected.

I generally prefer to compile with:

CC/WARN=ENABLE=(LEVEL4,QUESTCODE) This will flag many issues, some of them noise, but others may be real bugs.

-#pragma nostandard
-#pragma extern_model save
-#pragma extern_model strict_refdef "LIB$INITIALIZ" nowrt
-#endif

Shouldn't there be an "E" at the end of LIB$INITIALIZE?

No, it is a data psect referenced in addition to the LIB$INITIALIZE psect. The LIB$INITIALIZE stuff is only sparsely documented, so I just followed the names in the examples that I had. I changed them only to remove the VAXC specific keywords.


To make this compile right on GCC would probably require some more work.

I do not know what the state of GCC on VMS support is. With the HP/DEC/COMPAQ C compilers available for hobbyists, there is not much incentive for anyone to maintain them.

Thanks for all the hard work, John. I look forward to bringing Perl's CRTL compatibility into the 21st century.

Thanks, You also have to give credit to Colin Blake for doing the initial investigations. I am just trying to make an incremental improvement.


-John
[EMAIL PROTECTED]
Personal Opinion Only



Reply via email to