delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/02/13/13:28:39

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Thu, 13 Feb 2003 19:17:40 +0100
From: Corinna Vinschen <vinschen AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Makefile error in winsup/mingw?
Message-ID: <20030213181740.GX5822@cygbert.vinschen.de>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.4i

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 AT 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 AT cygwin DOT com
Red Hat, Inc.

- Raw text -


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