Possible issue on windows build (mingw)

Vlad Gabriel clampi at yahoo.com
Tue Apr 3 14:55:13 CEST 2012


Hello Torbjörn,

I confirm that the assert issue (toom_eval_pm2exp.c:112) was solved by patch 2.

The issue with t-gcd and t-get_d is reproducible. I have to have present either of
mpn/x86_64/coreinhm/gcd_1.asm

mpn/x86_64/core2/gcd_1.asm
mpn/x86_64/gcd_1.asm
For reference, 'mpn/x86_64/coreinhm/gcd_1.asm' and 'mpn/x86_64/core2/gcd_1.asm' are the same file. Even if that would have not caused error on my end, I think is not supposed to have the same file for 2 processors, but have configure do the link.


There is something I have not mentioned in any of my previous mails, something that was brought up a while ago to your attention but did not get any resolution. Test cxx/t-locale is irrelevant for windoze targets (PE-COFF). This is due to the test being dependent of the weak symbols concept. That is not supported by PE-COFF targets (mingw32/64 and cygwin as far as I know). In my opinion it should be skipped from makefile for those targets, as simply ignoring the test from int main(){std::cout<<"Not supported on Windoze"<<endl;} would still cause a duplicate symbol at link time in clocale.o.


Please advise how can I help further.

Best Regards,
Gabriel


________________________________
 From: Torbjorn Granlund <tg at gmplib.org>
To: Vlad Gabriel <clampi at yahoo.com> 
Cc: gmp-bugs at gmplib.org 
Sent: Tuesday, April 3, 2012 1:25 PM
Subject: Re: Possible issue on windows build (mingw)
 
Thanks for helping with this debugging!

I was able to reproduce some of the failures you observed by using
static linking on our emulated windos machine.  (It remains to be
understood why a dynamic link was incorrectly "successful".)

Please apply the following patches:

1. http://gmplib.org:8000/gmp/raw-rev/1262d026cdb5
   This patch my Marco is also fixed in last night's snapshot.

2. http://gmplib.org:8000/gmp/raw-rev/5b41f5fdb823
   This patch should fix the massive failures related to the toom functions.

That gmp-mparam.h changes behaviour is to be expected.  It does not
(except theoretically) indicate invalid combinations of parameters.

  "mpn/x86_64/coreisbr/aorrlsh_n.asm" causes the following assert in many tests:
  toom_eval_pm2exp.c:112: GNU MP assertion failed: (k+1)*shift >= 64 || xp2[n] <
  ((((mp_limb_t) 1LL)<<((k+1)*shift))-1)/((((mp_limb_t) 1LL)<<shift)-1)
  
This is fixed by patch 2 above.  Please confirm.

  "mpn/x86_64/core2/gcd_1.asm" causes the following test failure:
  ERROR in test 38
  mpz_gcd returned incorrect result
  op1=18F61
  op2=7FFFFFFFFFFFFFFF...0000000000000000
  expected result:
  1
  mpz_gcd returns:
  E00000000
  FAIL: t-gcd.exe
  
Alas, I cannot reproduce this with any of my attempted builds.
I'll do some code inspection next.

  
  ERROR (test 0/6): bad mpq_get_d results
  last: 9.812762848509795e+055
   new: 1.977541358830227e+048
  1836271237341295859612898827076534101128907148541526348485562245876958304759219721269767425728676382937455401999767574284401997674306336874703759271976542771636393707130456758076162310043257458673547956492326871907229280035156650172987953389843577824495835653543183448490834064125919766846006633844362221724150772955677596467869045155756125232309954176052095888664529937906616139772001432572550085221821277350150591207364582851160959389372421780101760557192433829555143849879024884210092675890225797997320610782770304211565150023567714714424272329226110006673104984413756995350308797109509651909603362743467621999199
  /
  92856274744488974759256854913044264188778140879261886568031390253856895073438403365285464835469195303328427607734724015166019459987691867528205062944635996249580977032960568774808293864481729137607152625909510661947371257705487097773846697002488527114787103481621788401813638983122630838048005039406591222203177076134078907
  4979519555132438186177543825149534555984741631154253376452933500406069451804592836816158898355970937021755301022986670236951505605022548173483834231464935072132989143885004748169043588667107512105640309715047743018741798159064368578541192740864
  FAIL: t-get_d.exe
  
I haven't seen this (but I didn't try to reproduce this before applying
the two patches above).  Does this still happon for you?

(If you replace gmp-mparam.h, you need to recompile everything, since
else there might be inconsistencies.)

-- 
Torbjörn


More information about the gmp-bugs mailing list