X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; q=dns; s=default; b=m9zsPPwty4pgtOG08T86UYHqG7h0j AZCfLOrnScNfFCLCWeGi5qqiyXr1uNlhqSwe7/iQNLRvF/TU2ZKQ2eK15zNPhYDc /85iFMXCz7k9sP4xXIVE8LwNjoECGn6KaoolQCXX1HgNKKpGG+ahMWtrMvekSWWA zoJGFgwyJrqb3w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; s=default; bh=7QjJrnMl0deTBEsTekiN5Gq24Ao=; b=DD0 zEm7uNjzuq/uXlKf6qtXLnwGbozXhXp7mY/vnZ2Y+K28m24NLbWRYLgljEZLR9zh r2rgCNGi/TXvuS5fxNuOYK7qfBpUZQ/6WxHCZDu554B5h3uQsdb6F0f+jf36hBZ/ r8vjggumbnZMyDRFffG3eXFSGHM8aJ2MCywKAfsc= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=H*M:local, relocating, Hx-spam-relays-external:sk:mail.au, H*RU:sk:mail.au X-HELO: outmail148093.authsmtp.net From: David Allsopp To: "cygwin AT cygwin DOT com" Subject: RE: Regression for OCaml introduced by rebase 4.4.4 Date: Fri, 9 Feb 2018 11:30:01 +0000 Message-ID: References: <000001d3a0d2$9f604860$de20d920$@cl.cam.ac.uk> <20180208150438 DOT GB21649 AT calimero DOT vinschen DOT de> In-Reply-To: <20180208150438.GB21649@calimero.vinschen.de> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Server-Quench: 91ae10fc-0d8c-11e8-9f3b-9cb654bb2504 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZ5RRob BmUtCCtbTh09DhZI RxQKKE1TKxwUVhJa I0lFL1x7O0wTWlBf HTVUBhpUWUIHDDFq aQpQZRVcY0BNXw9q UgZLQ1FMFQVtHx4A BAAfUx1tdQBZeTA3 ZE8QO3AoXUR5c0Z8 RgBQHWwAK25hOTUe UBYLagMAeFBXfx4Q Yk12AnBffGxUNHxl QwU5ZW1pYSNlBXYd eAwCN18JWkcMGHYy QApKOh4mGElNRiMv NRsqN1UREA4bIw0o PFEoQl9Qb1lOTFE2 X-Authentic-SMTP: 61633634383431.1039:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 213.105.212.114/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id w19BUggg007803 Corinna Vinschen wrote: > On Feb 8 11:47, David Allsopp wrote: > > TL;DR flexlink-compiled DLLs (i.e. ocaml libraries) are broken by the > > 0x200000000 base address requirement added in rebase 4.4.4. Possible > > fixes for this at the bottom. > > > > Commit bfd383 in the rebase sources introduces a new minimum base > > address requirement of 0x200000000 for Cygwin64. This is a problem for > > the correct operation of the flexdll package and affects ocaml. On a > > fresh up-to-date > > Cygwin64 installation, install the ocaml package: > > > > $ rebase -i /usr/lib/ocaml/stublibs/* > > /usr/lib/ocaml/stublibs/dllbigarray.so base 0x000000010000 size > > 0x00015000 * > > /usr/lib/ocaml/stublibs/dllcamlstr.so base 0x000000010000 size > > 0x00014000 * > > /usr/lib/ocaml/stublibs/dllgraphics.so base 0x000000010000 size > > 0x00038000 * > > [...] > > Here you can see a problem we already know about with flexlink - all > > libraries have a base address of 0x10000 > > (https://github.com/alainfrisch/flexdll/issues/50). > > > > However, this allows you to load libraries dynamically: > > > > $ ocaml > > OCaml version 4.04.2 > > > > # #load "unix.cma";; > > # #directory "+threads";; > > # #load "threads.cma";; > > > > but not fork (we know about this problem): > > > > # Unix.fork ();; > > 0 [main] ocamlrun 5688 child_info_fork::abort: address space > > needed by 'dllunix.so' (0x400000) is already occupied > > Exception: Unix.Unix_error (Unix.EAGAIN, "fork", ""). > > > > Now do a rebaseall. > > > > $ rebase -i /usr/lib/ocaml/stublibs/* > > /usr/lib/ocaml/stublibs/dllvmthreads.so base 0x0003fec20000 size > > 0x0001f000 > > /usr/lib/ocaml/stublibs/dllunix.so base 0x0003fec40000 size > > 0x0004c000 > > [...] > > > > So forking should now be fine. However: > > > > $ ocaml > > OCaml version 4.04.2 > > > > # #load "unix.cma";; > > Cannot load required shared library dllunix. > > Reason: /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot > > relocate RELOC_REL32, target is too far: 0xfffffffc013d8b5f > 0x13d8b5f. > > The problem is this: Given that the lib is in a safe space anyway, why > do you still try to relocate it? That's exactly what you don't have to > do anymore and you shouldn't do this. The DLL is loaded where it > belongs, end of story. What should another relocation gain? So, just > wwitch it off for 64 bit Cygwin, no? See other message, but we're not relocating the DLL, we're performing COFF relocations on specific symbols which were deferred from link time. David -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple