This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Makefile error in winsup/mingw?


Hi,

when building the winsup tree from scratch, I'm getting a link error
in winsup/mingw when trying to build mingwthrd_dummy.exe:

/usr/lib/gcc-lib/i686-pc-mingw32/3.2/../../../../i686-pc-mingw32/bin/ld: cannot find -lmingwex

As it turns out, the Makefile builds mingwthrd_dummy.exe *before* building
in the subdirs, including mingwex.  Even when changing that, it still doesn't
build since there's no -L directive which adds the mingwex subdir to the
linker paths.

As a (clumsy) patch I used this to heal the problem locally:

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/winsup/mingw/Makefile.in,v
retrieving revision 1.33
diff -u -p -r1.33 Makefile.in
--- Makefile.in	8 Feb 2003 14:58:31 -0000	1.33
+++ Makefile.in	13 Feb 2003 18:16:43 -0000
@@ -208,12 +208,13 @@ xx_$(THREAD_DLL_NAME) xx_mingwthrd.def: 
 DLL_OFILES        = mthr.o mthr_init.o
 DLL_CC_STUFF      = -B./ -mdll $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
 		    -Wl,--entry,_DllMainCRTStartup@12 \
-                    $(DLL_OFILES)
+                    $(DLL_OFILES) \
+		    -Lmingwex
 DLL_DLLTOOL_STUFF = --as=$(AS) --dllname $(THREAD_DLL_NAME) \
                     --def mingwthrd.def \
                     --base-file mingwthrd.base --output-exp mingwthrd.exp
 
-$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile
+$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile $(SUBDIRS)
 	$(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
 	$(CC) -Wl,--base-file=mingwthrd.base $(DLL_CC_STUFF) \
 		-o mingwthrd_dummy.exe


Perhaps one of the Mingw guys takes a look?  Or should I just check that
patch in?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]