discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ANN: New Windows Installer now with GUI!


From: Alex Perez
Subject: Re: ANN: New Windows Installer now with GUI!
Date: Thu, 24 Feb 2005 18:51:16 -0800
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Adam Fedor wrote:

On Feb 24, 2005, at 1:49 PM, Alex Perez wrote:

This is probably a problem exacerbated by the recent windows patch - multiple .def files are generated in subproject directories and concatenated (library.make:225). I had a hack to fix this, but it doesn't work very well, perhaps library.make needs to be changed to sort and remove duplicates when it does this (I'm not sure how)...


Which patch caused the duplication of .def files? file and version number? I'd like to take a look


Well, I probably explained it wrong. Here's how gnustep-make works currently (going back several years, so I don't really know which patch did it):

If you have a library project with multiple subprojects, make creates a .def file for each subproject and then concatenates all of them with the .def file for the main (library) project. The problem is that .def generation is pretty stupid and includes all the EXPORT definitions in the header files, so that if two subprojects include the same header file, the .def files will contain identical definitions. So when you concatenate the .def files, you get duplicate symbols.

AFAICT, the patch to -make that's currently awaiting copyright assignment fixes this. It does away with dlltool and uses nm/gcc directly (which is a better way of doing it, and the "right" way, if you will)

This problem just showed up in base, because we added another subdirectory (win32) with the Window's runloop patch: 2005-02-23 14:00 Richard Frith-Macdonald <rfm@gnu.org>. It's very odd that sometimes the problem doesn't occur, though.

Ideally, to fix this, one might do this:

diff -u -r1.28 library.make
--- Instance/library.make       31 Aug 2004 14:26:36 -0000      1.28
+++ Instance/library.make       24 Feb 2005 21:38:06 -0000
@@ -223,7 +223,7 @@
 DLL_DEF_INP = $(DERIVED_SOURCES_DIR)/$(LIBRARY_NAME_WITH_LIB).inp

 $(DLL_DEF_INP): $(DLL_DEF_FILES)
-       cat $(DLL_DEF_FILES) > $@
+       cat $(DLL_DEF_FILES) | sort -u - > $@

 DLL_DEF_FLAG = --input-def $(DLL_DEF_INP)
 endif

e
but I don't know if mingw/cygwin have sort, or if it implements the -u flag.
Both cygwin and mingw use the standard GNU toolchain. My mingw development environment comes with GNU sort (textutils) 2.0, which implements -u. I'd be willing to bet good money the same is also the case for cygwin.

Cheers,
Alex Perez





reply via email to

[Prev in Thread] Current Thread [Next in Thread]