discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Building under Cygwin


From: Ivan Vučica
Subject: Re: Building under Cygwin
Date: Sat, 10 Aug 2013 23:55:19 +0200

Hi all,

I have committed some changes to objc-load.m and to NSPathUtilities.m that are needed to run Calculator without errors and warnings, respectively.

On Sat, Aug 10, 2013 at 4:09 PM, David Chisnall <David.Chisnall@cl.cam.ac.uk> wrote:
On 10 Aug 2013, at 14:59, Fred Kiefer <fredkiefer@gmx.de> wrote:

> The call to /bin/rebaseall belongs somewhere into the target.make file
> of GNUstep make. Anybody with more insight should place it there.

On Win16 and Win32 (but not Win64), DLLs are not position-independent code and are expected to be located in the same part of the address space in every program that they are linked into.  The DLLs have all of their relocations applied the first time they are loaded and sometimes this generates conflicts the second time it's loaded.  This quickly becomes a mess.  As I recall, the fork() implementation in Cygwin often has problems on the exec if it needs to relocate a DLL.  The solution to this is the rebaseall utility, which searches all applications, finds the DLLs that they use, and reapplies the relocations to make them work.

The correct time to run this command is just after you've installed a new program, or a new version of an existing DLL.

Ideally, it would be added someplace that's executed with 'make install'.

Sadly, one CANNOT run this as long as even a single cygwin process is run -- except for /bin/ash.exe or /bin/dash.exe. This is according to Cygwin's own documentation.  So, one has to shut down the terminal, any X clients and X servers one may be running, and then:

  /bin/find /WHATEVER_YOUR_GNUSTEP_PREFIX_IS '(' -name '*.dll' -or -name '*.exe' ')' -print > /tmp/gs-rebase-list.txt
  /bin/rebaseall -T /tmp/gs-rebase-list.txt
  /bin/rm /tmp/gs-rebase-list.txt

Since on my last build I used the 'mac' layout with prefix '/', this would be counterproductive, so considering I installed everything into the LOCAL domain:

  /bin/find /Library '(' -name '*.dll' -or -name '*.exe' ')' -print > /tmp/gs-rebase-list.txt
  /bin/rebaseall -T /tmp/gs-rebase-list.txt
  /bin/rm /tmp/gs-rebase-list.txt

Note, it doesn't seem this works for GNUstep .exes listed in gs-rebase-list.txt. Maybe the command doesn't work on .exes at all. It doesn't hurt either, so I left that in /bin/find.

I have another script ready for installing under Cygwin. Unfortunately, it's actually not a script, but a .txt file listing commands and describing what to run at what point. The actual script would have to be a .bat, and I really am not masochistic enough to write .bat scripts.

So what I'll do is get a blogpost up, containing instructions for any other individual who wants to sail the uncharted territories of Cygwin+GNUstep. As soon as I clean the 'script' up. The process is not that terrible, but it need some extensive commentary before being usable.

--
Ivan Vučica
ivan@vucica.net

reply via email to

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