Mail Archives: cygwin-developers/1999/09/20/04:26:05
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 -