public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* DLLs built corrupted with mingw32 hunt
@ 1999-02-19 11:21 Paul Sokolovsky
       [not found] ` < 18888.990219@is.lg.ua >
  1999-02-28 23:02 ` DLLs built corrupted with mingw32 hunt Paul Sokolovsky
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Sokolovsky @ 1999-02-19 11:21 UTC (permalink / raw)
  To: Mumit Khan, DJ Delorie, cygwin

Hello Mumit,


      This describes problem concerning building DLLs with mingw32 on
win95, with solution, some kind of.

      Fact: dlls, linked with native mingw32 ld on win95 in most cases
are not relocatable. The problem is in behavior of underlying lseek()
(SetFilePointer() ultimately). It sure not there when cross-compiling,
and I don't believe that NT has it - how could they get C2 for 3.51
with it in?

      External symptom is that referred dlls has garbage at the
sections paddings. I send 2 samples to Mumit if he'd like to take a
look at them. Here's a utility to check relocatabilty by practise:

----
#include <windows.h>

char tempname[100];

void main(int argc,char *argv[])
{
  HANDLE h=0,h2=0;
  if (argc!=2) {printf("Usage: check-dll-reloc <dll>\n"); exit(0);}
  h=LoadLibrary(argv[1]);
  if (!h) {printf("Couldn't load image '%s' at all\n",argv[1]); exit(0);}
  strcpy(tempname,"dllXXXXXX");
  mktemp(tempname);
  strcat(tempname,".dll");
  printf("Copying to temp '%s'\n",tempname);
  CopyFile(argv[1],tempname,TRUE);
  h2=LoadLibrary(tempname);
  printf("Handles (load addrs) are: %x %x\n",h,h2);
  printf("Image is %srelocatable\n",h2?"":"NOT ");
  FreeLibrary(h);
  FreeLibrary(h2);
  DeleteFile(tempname);
}
----

    The problem itself is due win95 SetFilePointer(), when seeking
past end of file, leaving previous medium contents in areas not
explicitly written, despite POSIX saying they should be zeroed. BFD
likes such seeks, so it goes. In cygwin b20 dll was introduced workaround
for this, so its ld produces correct dll's. It's, however, would be
nice to have mingw32 self-sufficient, so I tried to fix it. I cast
aside making wrapper around lseek by analogy with cygwin because I
neither like that solution nor have idea how to implement it
correctly. Instead I found "bad" places in BFD and did workarounds there.

    Attached is patch as of bfd from cygwin b20. It's somewhat adhoc,
so changes wrapped in #ifdefs.

    With this patch dll's are ok. (If someone has this problems and
wants immediate solution, there's precompiled binary at
http://ftp.is.lg.ua/pub/gnuwin32/alpha/ld-mingw32-replacement.zip .
It's however an alpha effort featuring bfd as dll (required) at
http://ftp.is.lg.ua/pub/gnuwin32/alpha/bfd-dll.zip and another
underlying library). But strip built with patched bfd still wrecks dll
off relocatability, just as cygwin b20 strip does.


Best regards,
 Paul                          mailto:paul-ml@is.lg.ua
coffcode.h.dif
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* upgrade problems (FAQ's?), updatedb, man, man pages...
       [not found] ` < 18888.990219@is.lg.ua >
@ 1999-02-19 14:44   ` Gregory Guthrie
  1999-02-28 23:02     ` Gregory Guthrie
  1999-03-03 13:24     ` Michael Hirmke
  0 siblings, 2 replies; 6+ messages in thread
From: Gregory Guthrie @ 1999-02-19 14:44 UTC (permalink / raw)
  To: cygwin

A few problems with an upgrade to 2.02,

1)  When I run updatedb, I get an error that it doesn't like the file
"pagefile.sys" (who would!),
and after a long while,  "empty database not created"

2) "nice updatedb" says 
  "nice: updatedb: No such file or directory"

3) I installed all the man pages, but no "man" command?

4) I am surprised that the man.1 pages are all in nroff; 
   but no nroff is a part of the standard distribution. How about .hlp or
.html  or .rtf as a more portable and modern format?

Thanks,

Gregory Guthrie
--------------------------------------------------------
Dr. Gregory Guthrie
guthrie@mum.edu         (515)472-1125    Fax: -1103
       Computer Science Department
       College of Science and Technology
       Maharishi University of Management
      (Maharishi International University 1971-1995)
        http://www.mum.edu/csdept
--------------------------------------------------------

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* DLLs built corrupted with mingw32 hunt
  1999-02-19 11:21 DLLs built corrupted with mingw32 hunt Paul Sokolovsky
       [not found] ` < 18888.990219@is.lg.ua >
@ 1999-02-28 23:02 ` Paul Sokolovsky
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Sokolovsky @ 1999-02-28 23:02 UTC (permalink / raw)
  To: Mumit Khan, DJ Delorie, cygwin

Hello Mumit,


      This describes problem concerning building DLLs with mingw32 on
win95, with solution, some kind of.

      Fact: dlls, linked with native mingw32 ld on win95 in most cases
are not relocatable. The problem is in behavior of underlying lseek()
(SetFilePointer() ultimately). It sure not there when cross-compiling,
and I don't believe that NT has it - how could they get C2 for 3.51
with it in?

      External symptom is that referred dlls has garbage at the
sections paddings. I send 2 samples to Mumit if he'd like to take a
look at them. Here's a utility to check relocatabilty by practise:

----
#include <windows.h>

char tempname[100];

void main(int argc,char *argv[])
{
  HANDLE h=0,h2=0;
  if (argc!=2) {printf("Usage: check-dll-reloc <dll>\n"); exit(0);}
  h=LoadLibrary(argv[1]);
  if (!h) {printf("Couldn't load image '%s' at all\n",argv[1]); exit(0);}
  strcpy(tempname,"dllXXXXXX");
  mktemp(tempname);
  strcat(tempname,".dll");
  printf("Copying to temp '%s'\n",tempname);
  CopyFile(argv[1],tempname,TRUE);
  h2=LoadLibrary(tempname);
  printf("Handles (load addrs) are: %x %x\n",h,h2);
  printf("Image is %srelocatable\n",h2?"":"NOT ");
  FreeLibrary(h);
  FreeLibrary(h2);
  DeleteFile(tempname);
}
----

    The problem itself is due win95 SetFilePointer(), when seeking
past end of file, leaving previous medium contents in areas not
explicitly written, despite POSIX saying they should be zeroed. BFD
likes such seeks, so it goes. In cygwin b20 dll was introduced workaround
for this, so its ld produces correct dll's. It's, however, would be
nice to have mingw32 self-sufficient, so I tried to fix it. I cast
aside making wrapper around lseek by analogy with cygwin because I
neither like that solution nor have idea how to implement it
correctly. Instead I found "bad" places in BFD and did workarounds there.

    Attached is patch as of bfd from cygwin b20. It's somewhat adhoc,
so changes wrapped in #ifdefs.

    With this patch dll's are ok. (If someone has this problems and
wants immediate solution, there's precompiled binary at
http://ftp.is.lg.ua/pub/gnuwin32/alpha/ld-mingw32-replacement.zip .
It's however an alpha effort featuring bfd as dll (required) at
http://ftp.is.lg.ua/pub/gnuwin32/alpha/bfd-dll.zip and another
underlying library). But strip built with patched bfd still wrecks dll
off relocatability, just as cygwin b20 strip does.


Best regards,
 Paul                          mailto:paul-ml@is.lg.ua
coffcode.h.dif
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* upgrade problems (FAQ's?), updatedb, man, man pages...
  1999-02-19 14:44   ` upgrade problems (FAQ's?), updatedb, man, man pages Gregory Guthrie
@ 1999-02-28 23:02     ` Gregory Guthrie
  1999-03-03 13:24     ` Michael Hirmke
  1 sibling, 0 replies; 6+ messages in thread
From: Gregory Guthrie @ 1999-02-28 23:02 UTC (permalink / raw)
  To: cygwin

A few problems with an upgrade to 2.02,

1)  When I run updatedb, I get an error that it doesn't like the file
"pagefile.sys" (who would!),
and after a long while,  "empty database not created"

2) "nice updatedb" says 
  "nice: updatedb: No such file or directory"

3) I installed all the man pages, but no "man" command?

4) I am surprised that the man.1 pages are all in nroff; 
   but no nroff is a part of the standard distribution. How about .hlp or
.html  or .rtf as a more portable and modern format?

Thanks,

Gregory Guthrie
--------------------------------------------------------
Dr. Gregory Guthrie
guthrie@mum.edu         (515)472-1125    Fax: -1103
       Computer Science Department
       College of Science and Technology
       Maharishi University of Management
      (Maharishi International University 1971-1995)
        http://www.mum.edu/csdept
--------------------------------------------------------

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: upgrade problems (FAQ's?), updatedb, man, man pages...
  1999-02-19 14:44   ` upgrade problems (FAQ's?), updatedb, man, man pages Gregory Guthrie
  1999-02-28 23:02     ` Gregory Guthrie
@ 1999-03-03 13:24     ` Michael Hirmke
  1999-03-31 19:45       ` Michael Hirmke
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Hirmke @ 1999-03-03 13:24 UTC (permalink / raw)
  To: cygwin

Hi Gregory,

>A few problems with an upgrade to 2.02,

You didn't tell us anything about your system, neither, what Windows you
are using nor the output from cygcheck, so it is a bit difficult to help
you.

>
>1)  When I run updatedb, I get an error that it doesn't like the file
>"pagefile.sys" (who would!),
>and after a long while,  "empty database not created"

Works at least here on my Windows NT4 SP4 German Server.

>
>2) "nice updatedb" says
>  "nice: updatedb: No such file or directory"

Perhaps some problem with your environment?

>
>3) I installed all the man pages, but no "man" command?

You can get man from
  - on ftp.franken.de
  - in /pub/win32/develop/gnuwin32/cygwin32/porters/Humblet_Pierre_A/B20
  - as man-1.5f-cygwin-b20-bin.tar.gz

But be sure to read the readme in the same directory first!

>
>4) I am surprised that the man.1 pages are all in nroff;
>   but no nroff is a part of the standard distribution. How about .hlp or
>.html  or .rtf as a more portable and modern format?

You can convert them yourself with man2html, which is part of the above
mentioned package.

>
>Thanks,
>
>Gregory Guthrie

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: upgrade problems (FAQ's?), updatedb, man, man pages...
  1999-03-03 13:24     ` Michael Hirmke
@ 1999-03-31 19:45       ` Michael Hirmke
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Hirmke @ 1999-03-31 19:45 UTC (permalink / raw)
  To: cygwin

Hi Gregory,

>A few problems with an upgrade to 2.02,

You didn't tell us anything about your system, neither, what Windows you
are using nor the output from cygcheck, so it is a bit difficult to help
you.

>
>1)  When I run updatedb, I get an error that it doesn't like the file
>"pagefile.sys" (who would!),
>and after a long while,  "empty database not created"

Works at least here on my Windows NT4 SP4 German Server.

>
>2) "nice updatedb" says
>  "nice: updatedb: No such file or directory"

Perhaps some problem with your environment?

>
>3) I installed all the man pages, but no "man" command?

You can get man from
  - on ftp.franken.de
  - in /pub/win32/develop/gnuwin32/cygwin32/porters/Humblet_Pierre_A/B20
  - as man-1.5f-cygwin-b20-bin.tar.gz

But be sure to read the readme in the same directory first!

>
>4) I am surprised that the man.1 pages are all in nroff;
>   but no nroff is a part of the standard distribution. How about .hlp or
>.html  or .rtf as a more portable and modern format?

You can convert them yourself with man2html, which is part of the above
mentioned package.

>
>Thanks,
>
>Gregory Guthrie

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://aquarius.franken.de/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-03-31 19:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-19 11:21 DLLs built corrupted with mingw32 hunt Paul Sokolovsky
     [not found] ` < 18888.990219@is.lg.ua >
1999-02-19 14:44   ` upgrade problems (FAQ's?), updatedb, man, man pages Gregory Guthrie
1999-02-28 23:02     ` Gregory Guthrie
1999-03-03 13:24     ` Michael Hirmke
1999-03-31 19:45       ` Michael Hirmke
1999-02-28 23:02 ` DLLs built corrupted with mingw32 hunt Paul Sokolovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).