This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: DynaLoader in Perl 5.005_01 on cygwin32

> >After a bit of tweaking, I successfully built Perl 5.005_01
> in the cygwin
> >environment. However, I have a problem that the DynaLoader
> doesn't seem to
> Could you document the changes, and make them available, and also
> send them back to the perl folks, for inclusion?
> thanks
> D

Actually, I was going to wait until I figured out this DynaLoader problem
first, before letting everyone know. Since the DynaLoader is statically
linked into the perl executable (which takes an extremely long time to
build), I figured I'd like to wait and solve that problem first. If people
still want to know how to make a partially disabled version without the
DynaLoader, I can post instructions...

I also have some more information on the DynaLoader error. The error that
perl is returning is error 998 from the dl_load_file sub. Error 998,
according to the Microsoft SDK, is ERROR_NOACCESS, or "Invalid access to
memory location". Now, my question is, what is wrong with the dl_load_file
sub that comes with the distribution? Here is the code for it (from the
distribution file ext/DynaLoader/dl_cygwin32.xs):

---- START CODE ---

void *
    char *		filename
    int			flags
    DLDEBUG(1,fprintf(stderr,"dl_load_file(%s):\n", filename));

    RETVAL = (void*) LoadLibraryExA(filename, NULL,

    DLDEBUG(2,fprintf(stderr," libref=%x\n", RETVAL));
    ST(0) = sv_newmortal() ;
    if (RETVAL == NULL){
	SaveError("%d",GetLastError()) ;
	// setup the dll's impure_ptr:
	impure_setupptr = GetProcAddress(RETVAL, "impure_setup");
	if( impure_setupptr == NULL){
    "Cygwin32 dynaloader error: could not load impure_setup symbol\n");
		// setup the DLLs impure_ptr:
		sv_setiv( ST(0), (IV)RETVAL);

--- END CODE ---

This file (dl_cygwin32.xs) is dated 3/26/97, presumably before the B19 stuff
happened. My question is, did something change within the cygwin code that
would invalidate this procedure? If anyone needs any other code, let me
know. As I said, I would rather wait until the whole issue is resolved
before posting a patch or something, but if people really want it, I can
post instructions now. I think to solve this problem with the DynaLoader
requires someone with more knowledge of the cygwin internals than I have...
Thanks in advance...

Peter Mularski

For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]