ld crashes with segmentation fault when linking with libmpir.a To reproduce: wget http://mpir.org/mpir-2.6.0.tar.bz2 tar xjf mpir-2.6.0.tar.bz2 cd mpir-2.6.0 ./configure --build=x86_64-pc-cygwin make ld -u __gmpn_gcdext .libs/libmpir.a Since gdb doesn't show me any useful information (the stack is destroyed), it's hard to tell whether this is a cygwin problem or an ld problem, as it doesn't happen under Mac OS X or under several flavors of linux. I reported it to the cygwin mailing list, but no one seems interested in it. The output from cygcheck -s -v -r is too large to attach here. The consequence of the bug for us is that Macaulay2 (see http://macaulay2.com/) will not compile under cygwin. I think I can make it work by using GMP instead of MPIR, but I'd prefer "ld" to work.
PS: I tried it with at least three other versions of binutils, too, with no luck.
Can you build libmpir.a on Cygwin, transfer that to a Linux box, then attempt the link there using a linux->cygwin cross binutils?
I forgot to thank you for your suggestion long ago. Meanwhile I've managed to make further progress on our cygwin build by building the sharable library for mpir and linking against it. Thank you! On Sat, Sep 27, 2014 at 5:03 AM, mikpelinux at gmail dot com <sourceware-bugzilla@sourceware.org> wrote: > https://sourceware.org/bugzilla/show_bug.cgi?id=17433 > > --- Comment #2 from Mikael Pettersson <mikpelinux at gmail dot com> --- > Can you build libmpir.a on Cygwin, transfer that to a Linux box, then attempt > the link there using a linux->cygwin cross binutils? > > -- > You are receiving this mail because: > You reported the bug.