From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65376 invoked by alias); 2 Mar 2020 16:45:45 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 65157 invoked by uid 89); 2 Mar 2020 16:45:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=nonstandard, non-standard X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Mar 2020 16:45:26 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id 8nxOje4VBkqGX8nxPj46PG; Mon, 02 Mar 2020 09:30:16 -0700 Reply-To: cygwin@cygwin.com Subject: Re: flexdll error: cannot relocate RELOC_REL32 To: cygwin@cygwin.com References: Cc: Cao Qinxiang From: Brian Inglis Message-ID: <6f465767-08af-cb75-8d32-6ba3e6254e72@SystematicSw.ab.ca> Date: Mon, 02 Mar 2020 16:45:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-03/txt/msg00015.txt On 2020-03-02 05:57, Cao Qinxiang wrote: > On Mon, Mar 2, 2020 at 3:58 PM Brian Inglis wrote: >> On 2020-03-01 11:35, Cao Qinxiang wrote: >>> I use Cygwin-64 on windows and get a fork problem when I try to manually >>> install menhir package.>> 0 [main] ocamlrun 1615 child_info_fork::abort: >>> address space needed by 'dllunix.so' (0x400000) is already occupied >>> /usr/bin/ocamldep.opt -modules menhir.ml > menhir.ml.depends >>> 0 [main] ocamlrun 1616 child_info_fork::abort: address space needed by >>> 'dllunix.so' (0x400000) is already occupied >>> /cygdrive/g/Cygwin/menhir-20190924/src/_stage1/myocamlbuild: "fork" >>> failed: Resource temporarily unavailable >>> I follow online suggestion to run "/usr/bin/rebaseall -v" using ash.exe. >>> However, I get another program after that: >>> Fatal error: cannot load shared library dllunix >>> Reason: flexdll error: cannot relocate RELOC_REL32, target is too far: >>> 0xfffffffc02088b5f 0x2088b5f >>> I searched solutions for this new problem. Most solutions are to manually >>> rebase dllunix to a lower number like 0x06440000. However, I cannot do >>> that. Here is what I get in Cygwin: >>> $ rebase -b 0x06440000 /usr/lib/ocaml/stublibs/dllunix.so >>> rebase: Invalid Baseaddress 0x06440000, must be > 0x200000000 >>> So, what should I do to this problem? >>> Also, if I did not use "/usr/bin/rebaseall -v" using ash.exe, but follow >>> FAQ's suggestion (run "rebase-trigger fullrebase" in Cygwin), then I >>> cannot solve the fork problem and still get >>> 0 [main] ocamlrun 1615 child_info_fork::abort: address space needed by >>> 'dllunix.so' (0x400000) is already occupied >>> /usr/bin/ocamldep.opt -modules menhir.ml > menhir.ml.depends >>> 0 [main] ocamlrun 1616 child_info_fork::abort: address space needed by >>> 'dllunix.so' (0x400000) is already occupied >>> /cygdrive/g/Cygwin/menhir-20190924/src/_stage1/myocamlbuild: "fork" >>> failed: Resource temporarily unavailable >> Run rebase-trigger full then shut down *ALL* Cygwin processes: check Task >> Manager Details tab Image path name column for process paths under Cygwin >> root and kill. >> If rebase-trigger full fails, create /var/cache/rebase/fullrebase. >> Then download and run Cygwin setup and let all the postinstall scripts >> complete. > Thank you for you reply. > But it does not solve my problem. When I run "rebase-trigger full", I get the > following message: > Note: _autorebase will do a full rebase the next time setup is run. > If I check /var/cache/rebase/fullrebase at this time, it contains the follow > information: > # _autorebase will do a rebuild of the rebase database if this file > # exists and then rename it to fullrebase.done > Then I closed Cygwin and checked Task Manager Details (found no exe in > cygwin folder). Then I run Cygwin setup. But after I rerun Cygwin again, I > get the same error message about dllunix.so. BTW, in > /var/cache/rebase/rebase_all, I found nothing related to dllunix.so. Is a the > reason? I attached my /var/cache/rebase/ folder to this email and hope it can > help detect the problem. Try what's documented in /usr/share/doc/Cygwin/_autorebase.README for DLLs under non-standard system paths: create a file /var/lib/rebase/dynpath.d/ocaml containing your .so directory path /usr/lib/ocaml/stublibs/: $ echo /usr/lib/ocaml/stublibs/ > /var/lib/rebase/dynpath.d/ocaml then rebase-trigger full, shutdown all Cygwin processes, rerun setup, and your Cygwin setup should be properly rebased including your added DLLs/SOs. If you were testing as a user, you should add your build paths to /var/lib/rebase/user.d/$USER e.g. $ echo $HOME/src/build/lib/ocam/stublibs/ > /var/lib/rebase/user.d/$USER and do the above to pick up the added paths and include them in the Cygwin rebase database. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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