delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/09/20/04:26:05

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <00F8D6E8AB0DD3118F1A006008186C960351A3@server1.axonet.com.au>
From: Andrew Dalgleish <andrewd AT axonet DOT com DOT au>
To: "'cygwin-developers AT sourceware DOT cygnus DOT com'"
<cygwin-developers AT sourceware DOT cygnus DOT com>
Subject: bootstrapping winsup-src-19990917
Date: Mon, 20 Sep 1999 18:27:18 +1000
X-Priority: 3
X-Mailer: Internet Mail Service (5.0.1458.49)

Periodically I build a complete system starting from scratch.

(BTW, does anyone know how to delete a registry key from a batch file?
Currently I have to manually zap the mount table.)



Attempt 1.
Building cygwin-src-19990913.tar.gz and winsup-src-19990917.tar.gz using

cygwin b20.1
"Jan 15" cygwin1.dll

I get the following error:
/build/src/cygwin/winsup/utils/cygcheck.cc: In function `void
dump_sysinfo()':
/build/src/cygwin/winsup/utils/cygcheck.cc:707: parse error before `)'
/build/src/cygwin/winsup/utils/cygcheck.cc:707: parse error before `,'

Is this a gcc 2.91 compiler error?

You can work around this by removing the typecast on the return from
GetProcAddress like this:
--- winsup/utils/cygcheck.cc.orig    Fri Sep 17 13:56:49 1999
+++ winsup/utils/cygcheck.cc Mon Sep 20 14:38:32 1999
@@ -704,7 +704,6 @@

   HINSTANCE k32 = LoadLibrary ("kernel32.dll");
   BOOL (WINAPI *gdfse) (LPCSTR, long long *, long long *, long long *)
=
-    (BOOL (WINAPI *) (LPCSTR, long long *, long long *, long long *))
       GetProcAddress (k32, "GetDiskFreeSpaceExA");

   for (i = 0; i < 26; i++)


Attempt 2.
Building cygwin-src-19990913.tar.gz and winsup-src-19990917.tar.gz using

cygwin b20.1
"Jan 15" cygwin1.dll
gcc-2.95-cygb20.tar.gz
gcc-2.95-dev-ss.tar.gz

(note that cygcheck.cc compiles ok with gcc 2.95)
This gives the strace.exe _impure_ptr link error Corrinna reported in
http://sourceware.cygnus.com/ml/cygwin-developers/1999-08/msg00012.html.
As Mumit then suggested, this can be fixed by using libgcc.a from his
gcc-2.95-mingw-extra.tar.gz
I extracted this into /usr/local/mingw (as per Mumit's
mno-cygwin-howto.txt), then applied the following patch:
--- winsup/utils/Makefile.in.orig	Thu Jul 29 20:07:38 1999
+++ winsup/utils/Makefile.in	Mon Sep 20 16:19:35 1999
@@ -30,7 +30,7 @@
 CFLAGS = @CFLAGS@
 CXXFLAGS = @CXXFLAGS@
 
-MINGW_INCLUDES = -I$(srcdir)/../mingw/include -I$(srcdir)/../include
+MINGW_INCLUDES = -I/usr/local/mingw/include
-I$(srcdir)/../mingw/include -I$(srcdir)/../include
 
 INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../include \
 	   -I$(srcdir)/../../newlib/libc/sys/cygwin \
@@ -45,7 +45,7 @@
 # EXE_LDFLAGS is passed in from ../Makefile. 
 EXE_LDFLAGS = -B../../newlib/ -B../
 ALL_LDFLAGS = $(EXE_LDFLAGS) $(LDFLAGS) ../libcygwin.a -lnetapi32
-ladvapi32
-MINGW_LDFLAGS = -B../mingw/ $(LDFLAGS) -lnetapi32 -ladvapi32
+MINGW_LDFLAGS = -L/usr/local/mingw/lib -B../mingw/ $(LDFLAGS)
-lnetapi32 -ladvapi32
 
 PROGS = mount$(EXEEXT) umount$(EXEEXT) ps$(EXEEXT) kill$(EXEEXT) \
 	mkpasswd$(EXEEXT) mkgroup$(EXEEXT) cygpath$(EXEEXT)
cygcheck$(EXEEXT) \

Everything then builds ok.

Has this issue been fully resolved?
I couldn't find any follow-ups other than the work-around suggested by
Mumit.
The problem with this patch is that it depends on where you put the
mingw stuff.
(I don't normally use mingw so I may have missed something obvious.)


Attempt 3.
Building cygwin-src-19990913.tar.gz and winsup-src-19990917.tar.gz using

cygwin b20.1
gcc-2.95-cygb20.tar.gz
gcc-2.95-dev-ss.tar.gz
gcc-2.95-mingw-extra.tar.gz in /usr/local/mingw
cygwin1.dll, libraries, etc built in Attempt 2 above.
This gives the same link error as Attempt 2 - the same patch fixes it.


Hopefully this post might save someone else some time.
Regards,
Andrew Dalgleish

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019