[Ecls-list] MSVC build errors for latest CVS
Dean O'Connor
dean.oconnor at ite.com.au
Tue Feb 28 20:24:01 UTC 2006
I just did a CVS update, nmake clean and tried to rebuild on windows
(MSVC 6) with thread support enabled.
It seems like there are quite a few breakages, unless CVS is playing up.
CVS server often seems flaky and times out or doesn't respond - during
Australian working hours. Eventually it pulled down all updates.
Anyway, I created some patches to enable me to build, almost !! (SEE
BELOW).
There is still a final linker error that prevents a complete build. I
could not find the exact cause. Those 2 functions seem to exist in some
c files.
In tcp.d, I *think* ecl.h includes windows.h which already pulls in
winsock2.h. Cause tcp.d was including winsock2 twice.
======= start: FINAL LINK ERROR ======
cl /Feecl_min.exe cinit.obj c\all_symbols.obj eclmin.lib -MD -Zi /link
/nodefaultlib:libcmt /nodefaultlib:libcmtd /nodefaultlib
:libc /nodefaultlib:libd eclgc.lib eclgmp.lib user32.lib ws2_32.lib
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:ecl_min.exe
/debug
/nodefaultlib:libcmt
/nodefaultlib:libcmtd
/nodefaultlib:libc
/nodefaultlib:libd
eclgc.lib
eclgmp.lib
user32.lib
ws2_32.lib
cinit.obj
c\all_symbols.obj
eclmin.lib
Creating library ecl_min.lib and object ecl_min.exp
eclmin.lib(threads_win32.obj) : error LNK2001: unresolved external
symbol _GC_CreateThread
eclmin.lib(threads_win32.obj) : error LNK2001: unresolved external
symbol _GC_INIT
ecl_min.exe : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
======= end: FINAL LINK ERROR ======
PATCHES:
Index: msvc/Makefile
===================================================================
RCS file: /cvsroot/ecls/ecls/msvc/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- msvc/Makefile 28 Feb 2006 14:21:26 -0000 1.21
+++ msvc/Makefile 1 Mar 2006 03:41:36 -0000
@@ -282,7 +282,7 @@
for %h in (gc.h gc_local_alloc.h gc_pthread_redirects.h \
gc_config_macros.h leak_detector.h gc_typed.h \
private\gc_priv.h private\gcconfig.h gc_mark.h) \
- do $(CP) $(srcdir)\gc\include\%h ecl\gc\%h
+ do $(CP) $(srcdir)\gc\include\%h gc\%h
eclgmp.lib:
cd gmp
$(MAKE) "MPN_TYPE = $(GMP_TYPE)" "MFLAGS = $(MFLAGS)"
Index: msvc/c/Makefile
===================================================================
RCS file: /cvsroot/ecls/ecls/msvc/c/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- msvc/c/Makefile 28 Feb 2006 14:21:26 -0000 1.9
+++ msvc/c/Makefile 1 Mar 2006 04:14:53 -0000
@@ -62,7 +62,7 @@
structure.obj load.obj unixfsys.obj unixsys.obj \
ffi.obj alloc_2.obj tcp.obj $(THREADS_OBJ) ffi_x86.obj
-all: $(DPP) ecl\external.h ..\eclmin.lib ..\cinit.obj
+all: $(DPP) ..\ecl\external.h ..\eclmin.lib ..\cinit.obj
.SUFFIXES: .obj .c .d
@@ -84,7 +84,7 @@
# declarations, because the variables that they mark are in the
# in the library and can be referenced without indirection.
#
-ecl\external.h: $(top_srcdir)/h/external.h Makefile
+..\ecl\external.h: $(top_srcdir)/h/external.h Makefile
cut.exe removedecl < $(top_srcdir)/h/external.h > $@
cut.exe: $(top_srcdir)/util/cut.c
@@ -108,7 +108,7 @@
$(LINK) -lib -out:$@ $(OBJS)
clean:
- -for %f in (..\ecl\config.h dpp dpp.obj $(DPP) ecl\external.h \
+ -for %f in (..\ecl\config.h dpp dpp.obj $(DPP) ..\ecl\external.h \
..\eclmin.lib ..\cinit.obj cinit.c \
symbols_list2.h) \
do $(RM) %f
@@ -118,7 +118,7 @@
# Build rules
-$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list2.h ../ecl/config.h
ecl\external.h
+$(DPP): $(srcdir)/dpp.c $(srcdir)/symbols_list2.h ../ecl/config.h
..\ecl\external.h
$(TRUE_CC) -I.. -I./ $(DEFS) $(srcdir)/dpp.c -o $@
../ecl/config.h: ../ecl/config.h.msvc6 Makefile
for %i in ($(HFILES)) do $(CP) %i ..\ecl
Index: src/c/tcp.d
===================================================================
RCS file: /cvsroot/ecls/ecls/src/c/tcp.d,v
retrieving revision 1.23
diff -u -r1.23 tcp.d
--- src/c/tcp.d 28 Feb 2006 14:05:48 -0000 1.23
+++ src/c/tcp.d 1 Mar 2006 03:42:23 -0000
@@ -19,7 +19,7 @@
#include <errno.h>
#if defined(_MSC_VER) || defined(mingw32)
-#include <winsock2.h>
+//#include <winsock2.h>
#else
#include <netinet/in.h>
#include <netdb.h>
Index: src/h/ecl.h
===================================================================
RCS file: /cvsroot/ecls/ecls/src/h/ecl.h,v
retrieving revision 1.23
diff -u -r1.23 ecl.h
--- src/h/ecl.h 28 Feb 2006 14:05:48 -0000 1.23
+++ src/h/ecl.h 1 Mar 2006 03:42:54 -0000
@@ -56,6 +56,7 @@
# define end_critical_section()
#endif
+#include <ecl/gmp.h>
#include <ecl/object.h>
#include <ecl/stacks.h>
#ifndef _ARGS
Index: src/c/threads_win32.d
===================================================================
RCS file: /cvsroot/ecls/ecls/src/c/threads_win32.d,v
retrieving revision 1.8
diff -u -r1.8 threads_win32.d
--- src/c/threads_win32.d 27 Oct 2005 14:32:53 -0000 1.8
+++ src/c/threads_win32.d 1 Mar 2006 03:44:11 -0000
@@ -16,8 +16,8 @@
*/
#include <signal.h>
-#include "ecl.h"
-#include "internal.h"
+#include "ecl/ecl.h"
+#include "ecl/internal.h"
#ifndef WITH___THREAD
DWORD cl_env_key;
======================
Cheers
Dean
More information about the ecl-devel
mailing list