From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42955 invoked by alias); 29 Apr 2016 19:32:07 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 42940 invoked by uid 89); 29 Apr 2016 19:32:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=cyggmp-10.dll, UD:cyggmp-10.dll, cyggmp10dll, DLL X-HELO: m0.truegem.net Received: from m0.truegem.net (HELO m0.truegem.net) (69.55.228.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 29 Apr 2016 19:31:56 +0000 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id u3TJVsed045304 for ; Fri, 29 Apr 2016 12:31:54 -0700 (PDT) (envelope-from mark@maxrnd.com) Received: from 76-217-5-154.lightspeed.irvnca.sbcglobal.net(76.217.5.154), claiming to be "[192.168.1.100]" via SMTP by m0.truegem.net, id smtpdoDPq8c; Fri Apr 29 12:31:53 2016 Subject: Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien) To: cygwin-apps@cygwin.com References: <18002c59-1b77-5912-f5fa-c3e39540b8d8@gmail.com> <41t6ibtbcojbmar8blrc80fk8tmplbbuj3@4ax.com> From: Mark Geisert Message-ID: <5723B6C7.8090100@maxrnd.com> Date: Fri, 29 Apr 2016 19:32:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <41t6ibtbcojbmar8blrc80fk8tmplbbuj3@4ax.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00047.txt.bz2 Andrew Schulman wrote: >> On 26/04/2016 21:47, Andrew Schulman wrote: >>>> I'm trying to build unison 2.48.3, which worked fine the last time I tried >>>> it, in June 2015. Today the build fails, with "flexdll error: cannot >>>> relocate": >>>> >>>>>>> Compiling unison2.48-2.48.3-2.x86_64 >>>> ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml >>>> File "mkProjectInfo.ml", line 1: >>>> Error: Error on dynamically loaded library: >>>> /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate >>>> RELOC_REL32, target is too far: 0xfffffffc0f997112 0xf997112 >>>> >>>> I ran /bin/rebaseall and tried again, with the same result. >> >> There was an issue rebasing that file some time ago. >> >> https://cygwin.com/ml/cygwin/2016-02/msg00410.html >> >> I suggest at least to try a full rebase with >> /usr/bin/rebase-trigger full >> and re-running setup. > > Thanks for the pointer. I tried that, but unfortunately it didn't help. The > error is the same as before. > > rebaseall apparently did run: > > $ ll /var/cache/rebase > total 375K > -rw-r--r-- 1 ASchulma Domain Users 115 Apr 29 10:27 fullrebase.done > -rw-r--r-- 1 ASchulma Domain Users 35K Apr 29 10:29 rebase_all > -r--r--r-- 1 ASchulma Domain Users 2.3K Apr 29 10:29 rebase_dyn > -rw-r--r-- 1 ASchulma Domain Users 2.3K Apr 29 10:29 rebase_dyn.old > -r--r--r-- 1 ASchulma Domain Users 30K Apr 29 10:29 rebase_exe > -rw-r--r-- 1 ASchulma Domain Users 30K Apr 29 10:29 rebase_exe.old > -r--r--r-- 1 ASchulma Domain Users 35K Apr 29 10:29 rebase_lst > -rw-r--r-- 1 ASchulma Domain Users 35K Apr 29 10:29 rebase_lst.old > -r--r--r-- 1 ASchulma Domain Users 96K Apr 29 10:29 rebase_pkg > -rw-r--r-- 1 ASchulma Domain Users 96K Apr 29 10:29 rebase_pkg.old > -r--r--r-- 1 ASchulma Domain Users 31 Apr 29 10:29 rebase_user > -rw-r--r-- 1 ASchulma Domain Users 0 Jan 1 1970 rebase_user.old > -r--r--r-- 1 ASchulma Domain Users 31 Apr 29 10:29 rebase_user_exe > -rw-r--r-- 1 ASchulma Domain Users 0 Jan 1 1970 rebase_user_exe.old > > And dllunix.so does seem to have been rebased: > > $ grep dllunix /var/cache/rebase/rebase_all > /usr/lib/ocaml/stublibs/dllunix.so > > $ rebase -i /usr/lib/ocaml/stublibs/dllunix.so > /usr/lib/ocaml/stublibs/dllunix.so base 0x0003eff30000 size > 0x0004b000 > > But still every ocaml run fails with > > Error: Error on dynamically loaded library: > /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate > RELOC_REL32, target is too far: 0xfffffffc0f997112 0xf997112 > > Any other ideas for how I can get ocaml to work? This looks kind of reminiscent of issues I've run into and reported on the main list, issues with xpdf and GMP-ECM. I can't promise these incantations below will work, but maybe you'll be lucky. I suspect there's something more widespread going on with relocations on 64-bit Cygwin but I can't pin it down. A bald xpdf run failed with... Cygwin runtime failure: /usr/bin/xpdf.exe: Invalid relocation. Offset 0x2fb02bad9 at address 0x100494523 doesn't fit into 32 bits I rebased /usr/bin/cygXt-6.dll from 0x0003fb480000 down to 0x0000fb480000, i.e. just turn the first 3 in the address to 0, and that allowed xpdf to run. Interestingly, rebuilding xpdf with gcc 5.3.0 made an executable that runs even with cygXt-6.dll at its original address. The machine instruction that provoked the relocation error is different in a 5.3.0 object than a 4.9.2 object such as the distributed xpdf.exe. Might be a major clue here. The GMP-ECM issue was another Cygwin runtime failure just like xpdf's but involving /usr/bin/cyggmp-10.dll and I worked around that by rebasing that DLL in similar fashion. So for your case I'd first try rebasing flexdll.so down to 0x0000eff30000 (you may collide with something else so pay attention to rebase complaints and try a different address if necessary). If that doesn't help then try rebuilding flexdll.so with gcc 5.3.0 if it is currently being built with an older gcc. ..mark