public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jean-Pierre Flori <jpflori@gmail.com>
To: cygwin@cygwin.com
Subject: Broken MPIR 2.6.0 on Cygwin64
Date: Thu, 20 Jun 2013 22:56:00 -0000	[thread overview]
Message-ID: <CAHhGz88vEgzz1i4sUjE0ugNzaf+j++r1_qT=Y6abMaB4_F=PCg@mail.gmail.com> (raw)

Dear all,

First thanks a lot for your hard work on the Cygwin project and the
Cygwin64 project.


I've begun to try to build Sage (http://www.sagemath.org) on Cygwin64
to provide some Windows support without the need of a virtual machine
running Linux and now have some trouble compiling a working MPIR 2.6.0
(http://www.mpir.org) library.

Note that I have no problems building a proper static or shared
version of GMP 5.1.2 with the GCC 4.8.1 toolchain currently provided
with Cygwin64, and it passes its complete testsuite.
At some point we should be able to switch to GMP, but we still have
some dependencies relying on MPIR's internals, so we have (and want,
even in the future by default) to stick with MPIR.

Also note we have no problem using MPIR on 32 bit Cygwin.


So my problem with MPIR are as follow:

* the ./configfsf.[guess|sub] and yasm/config/config.[guess|sub] file
within the upstream tarball are too old and failed to recognize
Cygwin64, replacing them with up-to-date version easily solves that,

* I have no problem building a static lib, but running make check
fails when linking any test executable, e.g. the first one
"t-bswap.exe":
{{{
/bin/sh ../libtool --tag=CC    --mode=link gcc -std=gnu99  -m64 -O2
-march=corei7-avx -mtune=corei7-avx    -o t-bswap.exe t-bswap.o
libtests.la ../libmpir.la
libtool: link: gcc -std=gnu99 -m64 -O2 -march=corei7-avx
-mtune=corei7-avx -o t-bswap.exe t-bswap.o  ./.libs/libtests.a
/home/jp/mpir-2.6.0/.libs/libmpir.a ../.libs/libmpir.a
collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped
Makefile:503: recipe for target `t-bswap.exe' failed
}}}
A 0 byte t-bswap.exe is created and the content of the stackdump is
{{{
$ cat tests/ld.exe.stackdump
Exception: STATUS_ACCESS_VIOLATION at rip=0000000003E
rax=00000001004C3FA0 rbx=000000060018DCB0 rcx=000000060018DCB0
rdx=000000060018ECA8 rsi=0000000000C2A580 rdi=0000000000000025
r8 =0000000000C2A590 r9 =00000000FFFFBFFF r10=0000000000C30000
r11=00000001004B111E r12=0000000000000001 r13=000000060018ECA9
r14=0000000100534780 r15=000000060018ECA8
rbp=0000000000C2A590 rsp=0000000000C2A528
program=C:\cygwin64\usr\x86_64-pc-cygwin\bin\ld.exe, pid 6744, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame        Function    Args
00000C2A590  0000000003E (00000000000, 01300000001, 00100512180, 00000000000)
00000C2A590  00100493B54 (00000000000, 006000F4B30, 00000000023, 00000000000)
00000C2A650  00100433783 (00100534780, 00600057550, 001800C0C2C, 00000000000)
00000000000  0010040E82C (00600022D10, 00600023CF8, 00100436389, 00000000000)
00000000001  0010040F2E0 (001802DE300, 00600019870, 001800C0C2C, 00600017A30)
001004DDD08  001004113FB (00100520580, 00000000000, 001802E3E9D, 001802DF658)
001004DDD08  001004BF4C0 (00000C2A9B0, 00000C2AA46, 001801691B1, 00000000000)
00000C2AB80  0018004836E (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  0018004618B (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  0018004634F (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  001004BDD31 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  00100401010 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  00076B7652D (00000000000, 00000000000, 00000000000, 00076BF9300)
00000000000  0007726C521 (00000000000, 00000000000, 00000000000, 00076BF9300)
End of stack trace
}}}

* I have no problem building a shared lib, nor the test programs in
that case, but many (but not all) of them segfaults when they are run.

In the two above cases, I was not able to retrieve useful information
when attaching gdb to the segfaulting process.
I just saw that three threads were launched and the backtrace only
involved Cygwin/Windows dlls.


Did anyone among the Cygwin folk tried to build MPIR on Cygwin64 and
got more success than I had?
Or has any advice to solve these issues?


Thanks in advance for your help,
Best,

-- 
Jean-Pierre Flori

--
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

             reply	other threads:[~2013-06-20 22:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 22:56 Jean-Pierre Flori [this message]
2013-06-21  8:33 ` Corinna Vinschen
2013-06-21  9:30   ` Corinna Vinschen
2013-06-21  9:43   ` Jean-Pierre Flori
2013-06-21 10:57     ` Corinna Vinschen
2013-06-21 11:35       ` libtool weirdness (was Re: Broken MPIR 2.6.0 on Cygwin64) Corinna Vinschen
2013-06-21 17:00         ` Jean-Pierre Flori
2013-06-21 17:27           ` Jean-Pierre Flori
2013-06-21 17:35             ` Jean-Pierre Flori
2013-06-21 18:10               ` Jean-Pierre Flori
2013-06-21 22:44                 ` Jean-Pierre Flori
2013-06-21 22:48                   ` Jean-Pierre Flori
2013-06-24  9:20                     ` Corinna Vinschen
2013-06-24  9:19           ` Corinna Vinschen
2013-06-21 18:05         ` Yaakov (Cygwin/X)
2013-06-24  9:22           ` Corinna Vinschen
2013-06-24 11:55             ` Corinna Vinschen
2013-06-24 16:21               ` Yaakov (Cygwin/X)
2013-06-21 13:39       ` Broken MPIR 2.6.0 on Cygwin64 Jean-Pierre Flori
2013-06-24 11:03         ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHhGz88vEgzz1i4sUjE0ugNzaf+j++r1_qT=Y6abMaB4_F=PCg@mail.gmail.com' \
    --to=jpflori@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).