delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/02/08/10:05:06

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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=Qn8NdSN7NsQhJjkos1BS627Bbz4qXVm0t7SdvqwUCuHk9r/2xYQ/y
He7DMoCpfVEWpzb+OG0t4/uInui1jyZR18btJMLePfJZPzhdU4wRs/Uo14IEe0lA
jj4LqJZtvw+7N3q4Gwrsf6SxzsyDwwFxIQt/2Lqes3miZWTzVzaGGo=
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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=9YVlusZyCG4OEknmoXcWJa63JAc=; b=Z91y7Q2R0QOAPAG1EXNwZtNpvimr
xXVZlSsejPAX2iV+pSgU/Oz5XobtsFJOEX38PVP/6Pe+kslBLLQhEmuYGJAYxj0M
fl/tBWuxPHzqnUSiTK80R9v1CGfI/mDABNfq9lyzw/GgbPD3zWF1r33X2wESZ/RL
92KifLiM2J8FicA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-101.4 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=alainfrisch
X-HELO: drew.franken.de
Date: Thu, 8 Feb 2018 16:04:38 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Regression for OCaml introduced by rebase 4.4.4
Message-ID: <20180208150438.GB21649@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <000001d3a0d2$9f604860$de20d920$@cl.cam.ac.uk>
MIME-Version: 1.0
In-Reply-To: <000001d3a0d2$9f604860$de20d920$@cl.cam.ac.uk>
User-Agent: Mutt/1.9.2 (2017-12-15)

--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> 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:
>=20
>   $ 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).
>=20
> However, this allows you to load libraries dynamically:
>=20
>   $ ocaml
>           OCaml version 4.04.2
>=20
>   # #load "unix.cma";;
>   # #directory "+threads";;
>   # #load "threads.cma";;
>=20
> but not fork (we know about this problem):
>=20
>   # Unix.fork ();;
>         0 [main] ocamlrun 5688 child_info_fork::abort: address space need=
ed
> by 'dllunix.so' (0x400000) is already occupied
>   Exception: Unix.Unix_error (Unix.EAGAIN, "fork", "").
>=20
> Now do a rebaseall.
>=20
>   $ 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
> [...]
>=20
> So forking should now be fine. However:
>=20
>   $ ocaml
>           OCaml version 4.04.2
>=20
>   # #load "unix.cma";;
>   Cannot load required shared library dllunix.
>   Reason: /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot reloc=
ate
> RELOC_REL32, target is too far: 0xfffffffc013d8b5f  0x13d8b5f.=20

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?


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--8t9RHnE3ZwKMSgU+
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlp8ZvsACgkQ9TYGna5E
T6CeFg/9H3hCb0P+RWry8hGSgrtIeVzVYBm8DRsLCG23OkQelOg+/lRzO7TCwfOS
usDsGeFgCInGWsvW8QXEE8bb6OQ0LrT3pYSUjhOIhbPLYIWvx1xcdoX4GXmWz/ER
tIxpwvpGF/zrli6XG/NZ7bn7ypDqdxVBvZi0VXr83/3bU4dSPL55xAP4uIOUgdBQ
mGj0UaDDKFQU0OP1QPc2DgUZDPgUE5ajzhfmNqENlUiGNstaHZngh1Uw5cYynQWs
YgAlN4HzTXW8aJSvV6JsdGGb+dhpA5R0pbcaQGH2RtDoyA0pKnExcwXlM7GsUSmE
8UQ2/PdPhTc4L+c7QO7UCLihXwBW7T6kqWmXMZrbMWRVH76THk2u+NiIaNegiWyc
s67iGw3cvjKVTC+gwWxvZEvrlVlIEfHdIz1ZMFz+LGhWWXnRxAFX/QruW9TYAbcA
7U91ABMFZTuZwv/xYWKrtp1yClvEvlkjY0qhzI9tu7n4K+27l3IB49huqDEwyNQR
PTVp7yAx5e1Q3oDB28vcN+Zoq1ak6pcecgRX+xnx26D1hYvcVYx413ui/kGvjfK4
BLn1KHWcX/6DfyW47egslw2yzFdPBxI05akBbQSQ/3UJzYf93wPAYR27nQ8XYvNM
8a/UENKvXviNwf2/inPjUMkUbu9Sqzke/zHcbmNeB+q1QRNUEQg=
=l7Fp
-----END PGP SIGNATURE-----

--8t9RHnE3ZwKMSgU+--

- Raw text -


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