[GRASS-dev] Compile errors - dllmain and fmode - releasebranch_6_4 and develbranch_6

Glynn Clements glynn at gclements.plus.com
Fri Mar 6 05:52:17 EST 2009


Colin Nielsen wrote:

> Still not working, sorry. I'm still a bit new at this so I'll give you
> my steps to make sure I didn't miss anything
> 1) svn up
> 2) make clean
> 3) config.status --recheck
> 4) make
> Result:
> 
> $ make > /dev/null
> gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
> make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_datetime.6.5.svn.dll]
> Error 1
> make[3]: *** No rule to make target
> `../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.

AFAICT, this is because the rule in lib/gis/Makefile uses a path based
upon MODULE_TOPDIR, but the compilation rules require a path relative
to the current directory. The first attached patch should fix this part.

The second patch should fix the issue with lib/datetime being built
before lib/gis. If it doesn't, just try running "make" a second time
without an intervening "make clean".

> Stop.
> gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
> make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_gmath.6.5.svn.dll]
> Error 1
> gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
> make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_linkm.6.5.svn.dll]
> Error 1
> gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
> make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_driver.6.5.svn.dll]
> Error 1
> gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
> make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_pngdriver.6.5.svn.dll]
> Error 1
> gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
> 
> There were many more errors in lib, db, display, vector, raster, etc.
> 
> I'll keep being the mingw/msys test bed if you propose other possible
> solutions.

-- 
Glynn Clements <glynn at gclements.plus.com>

-------------- next part --------------
Index: lib/gis/Makefile
===================================================================
--- lib/gis/Makefile	(revision 36206)
+++ lib/gis/Makefile	(working copy)
@@ -10,6 +10,9 @@
 
 LIB_OBJS := $(subst .c,.o,$(wildcard *.c))
 LIB_OBJS := $(filter-out fmode.o dllmain.o,$(LIB_OBJS))
+ifneq ($(MINGW),)
+LIB_OBJS += dllmain.o
+endif
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 include $(MODULE_TOPDIR)/include/Make/Doxygen.make
@@ -40,7 +43,7 @@
 
 endif
 
-default: $(DLLMAIN_OBJ) lib $(FMODE_OBJ) $(DATAFILES) $(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list
+default: lib $(FMODE_OBJ) $(DATAFILES) $(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list
 
 $(ETC)/colors:
 	$(MKDIR) $@
-------------- next part --------------
Index: include/Make/Shlib.make
===================================================================
--- include/Make/Shlib.make	(revision 36206)
+++ include/Make/Shlib.make	(working copy)
@@ -4,8 +4,10 @@
 
 # Object that calls _setfmode(_O_BINARY) which must be linked to each DLL on Windows
 ifdef MINGW
+ifneq ($(SHLIB_NAME),$(DATETIME_LIBNAME))
   DLLMAIN_OBJ = $(MODULE_TOPDIR)/lib/gis/$(OBJDIR)/dllmain.o
 endif
+endif
 
 CFLAGS += $(SHLIB_CFLAGS) $(NLS_CFLAGS)
 LDFLAGS += $(SHLIB_LDFLAGS)


More information about the grass-dev mailing list