From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4306 invoked by alias); 8 Feb 2016 07:59:47 -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 4290 invoked by uid 89); 8 Feb 2016 07:59:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*r:Sun, DLL, cyggmp-10.dll, UD:cyggmp-10.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; Mon, 08 Feb 2016 07:59:45 +0000 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id u187xaOd076547 for ; Sun, 7 Feb 2016 23:59:36 -0800 (PST) (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 smtpd97pket; Sun Feb 7 23:59:33 2016 Subject: Re: Failing 'make check' for non-Cygwin GMP-ECM package To: cygwin@cygwin.com References: <87d1saqhlj.fsf@Rainer.invalid> <56B7D8FA.1040501@maxrnd.com> From: Mark Geisert Message-ID: <56B84AEC.4020405@maxrnd.com> Date: Mon, 08 Feb 2016 07:59: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: <56B7D8FA.1040501@maxrnd.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-02/txt/msg00064.txt.bz2 Mark Geisert wrote: > Achim Gratz wrote: >> Mark Geisert writes: >>> I'm seeing an odd issue after building the GMP-ECM 6.4.4 package from >>> Inria. I downloaded the .tar.gz file and unpacked, ran configure, >>> then make and 'make check'. I get a SIGSEGV from a test using ecm.exe >>> as part of 'make check'. >> >> It seems that this release is three years old. Did you try autoreconf >> or just configure? If the latter, it may simply not recognize the >> current Cygwin correctly in its configury. > > Thanks for the idea but trying it didn't change the symptoms. With more > debugging this seems to me like some kind of dynamic relocation issue so I'm > looking further in that direction within the Cygwin DLL. Replying to myself... Yes, there appear to be two separate bugs colluding to break things the way I'm seeing. First, the application's object file has R_X86_64_PC32 relocation markers for functions it wants to pull in from cyggmp-10.dll. These relocation entries apparently allow for only 4 bytes of address. Second, the relocation that actually needs doing in this testcase results in addresses above 4GB, so they need more than 4 bytes to be stored. There is code in Cygwin's pseudo-reloc.cc to check for this situation but it is being skipped because __OPTIMIZE__ has been #define'd somewhere by the procedure that builds Cygwin. Instead, the relocated address gets truncated before being written back to memory, rather than provoking the error report "Invalid relocation. [...] doesn't fit into 32 bits". I don't know if the first bug could be caused by improper compiler options or whatnot. Here's the gcc invocation for that one object file: /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./x86_64 -pipe -g -O2 -march=haswell -MT libecm_la-mpmod.lo -MD -MP -MF deps/libecm_la-mpmod.Tpo -c -o libecm_la-mpmod.lo `test -f 'mpmod.c' || echo './'`mpmod.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./x86_64 -pipe -g -O2 -march=haswell -MT libecm_la-mpmod.lo -MD -MP -MF .deps/libecm_la-mpmod.Tpo -c mpmod.c -o libecm_la-mpmod.o Configure does know it's building for x86_64. I am up to date on binutils and this is on Cygwin 2.4.1, Win7 64-bit. ..mark -- 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