This is the mail archive of the
mailing list for the Cygwin project.
Re: Failing 'make check' for non-Cygwin GMP-ECM package -- workaround
- From: Mark Geisert <mark at maxrnd dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 10 Feb 2016 11:32:53 -0800
- Subject: Re: Failing 'make check' for non-Cygwin GMP-ECM package -- workaround
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot BSF dot 4 dot 63 dot 1602060102510 dot 92842 at m0 dot truegem dot net> <87d1saqhlj dot fsf at Rainer dot invalid> <56B7D8FA dot 1040501 at maxrnd dot com> <56B84AEC dot 4020405 at maxrnd dot com>
Mark Geisert wrote:
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
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've worked around the first "bug" by rebasing the Cygwin gmp DLLs. It seems
those R_X86_64_PC32 relocation markers I had thought problematic are ubiquitous
and work without issue the vast majority of the time. They are used to relocate
addresses up to 2GB above or below the site of the relocation. It's not working
here but I can't see what's so special about this case. The relocation sites
are in a static library FWIW. But in any case, on my system the original DLLs
were located here:
/usr/bin/cyggmpxx-4.dll base 0x0003fcee0000 size 0x0000e000
/usr/bin/cyggmp-10.dll base 0x0003fcef0000 size 0x0008c000
and I rebased them to here:
/usr/bin/cyggmpxx-4.dll base 0x0000fcee0000 size 0x0000e000
/usr/bin/cyggmp-10.dll base 0x0000fcef0000 size 0x0008c000
and that did the trick. I'll take the second bug to the developers list.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple