make check fails on GNU/Linux due to probable bug in bash script

51 views
Skip to first unread message

Nicholas Kinar

unread,
Dec 12, 2012, 3:16:42 PM12/12/12
to mpir-...@googlegroups.com
Hello,

I recently built MPIR 2.6.0 from source on Ubuntu Linux 12.04.1 (64-bit).  After running "make check" one of the tests fails.  Here is a snippet from the output:

PASS: t-fat
PASS: t-gcdext
/bin/bash: line 1: 26916 Illegal instruction     (core dumped) "$tst" > t-get_d.log-t 2>&1
FAIL: t-get_d
PASS: t-hgcd
PASS: t-instrument
PASS: t-inv_div_q
PASS: t-inv_div_qr
PASS: t-inv_div_qr_n
PASS: t-inv_divappr_q
PASS: t-inv_divappr_q_n
PASS: t-invert
PASS: t-iord_u
PASS: t-lorrshift1
PASS: t-matrix22
PASS: t-mp_bases
PASS: t-mullow_basecase
PASS: t-mullowhigh
PASS: t-mulmid
PASS: t-mulmod_2expm1
PASS: t-mulmod_2expp1
PASS: t-neg
PASS: t-perfsqr
PASS: t-redc_1
PASS: t-sb_bdiv_q
PASS: t-sb_bdiv_qr
PASS: t-sb_div_q
PASS: t-sb_div_qr
PASS: t-sb_divappr_q
PASS: t-scan
PASS: t-subadd_n
PASS: t-tdiv_q
PASS: t-tdiv_qr
PASS: st_fat
PASS: st_instrument
=============================================================
1 of 50 tests failed
See tests/mpn/test-suite.log
Please report to http://groups.google.co.uk/group/mpir-devel/
=============================================================

I believe that the same issue is also present in the SVN version.  It is possible that this occurs due to a bug in the bash script.

Nicholas

Bill Hart

unread,
Dec 12, 2012, 3:28:45 PM12/12/12
to mpir-...@googlegroups.com
Hi,

are you using a virtual machine? If so, that would be the problem.

If not, can you tell us the output of cat /proc/cpuinfo and the result
of running ./config.guess and perhaps send us the file config.log.

Bill.
> --
> You received this message because you are subscribed to the Google Groups
> "mpir-devel" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/mpir-devel/-/JoMG465RvcQJ.
> To post to this group, send email to mpir-...@googlegroups.com.
> To unsubscribe from this group, send email to
> mpir-devel+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mpir-devel?hl=en.

Nicholas Kinar

unread,
Dec 12, 2012, 3:47:15 PM12/12/12
to mpir-...@googlegroups.com, goodwi...@googlemail.com


On Wednesday, 12 December 2012 14:28:45 UTC-6, Bill Hart wrote:
Hi,

are you using a virtual machine? If so, that would be the problem.

If not, can you tell us the output of cat /proc/cpuinfo and the result
of running ./config.guess and perhaps send us the file config.log.

Bill.




Thanks for your response, Bill.  This is very much appreciated.  Yes - I am running a Virtual Machine (Virtual Box 12.04.1 on Windows 7 host).  Perhaps a warning could be inserted directly into the script: "If t-get_d fails, and you are using a VM, then the MPIR library is probably okay."  Could something be done on the development side to mitigate this error?  Is it harmless?

BTW, I am getting a whole slew of similar errors when building MPFR on top of MPIR (with GMP compatibility switched on).

Nicholas
 

Nicholas Kinar

unread,
Dec 12, 2012, 3:48:42 PM12/12/12
to mpir-...@googlegroups.com, goodwi...@googlemail.com
My mistake: Virtual Box 4.2.4.

Nicholas Kinar

unread,
Dec 12, 2012, 4:25:01 PM12/12/12
to mpir-...@googlegroups.com, goodwi...@googlemail.com
For completeness:

1. Here is the config.log file:

https://docs.google.com/open?id=0B-xY4xORAoEDbUtmdnV3RE1oMFU

2. The result of ./config.guess is:

sandybridge-unknown-linux-gnu

3. Here is the result of running cpuinfo: 


If this is a known issue, then perhaps the documentation or even the script could be updated?  Perhaps this could be included as a "known issue" in the INSTALL file?

To test some more, I will try another virtual machine (perhaps Vmware player).

Nicholas




Bill Hart

unread,
Dec 12, 2012, 4:51:24 PM12/12/12
to Nicholas Kinar, mpir-...@googlegroups.com
The problem is that virtual machines incompletely implement some of
the instructions available on the native processors MPIR is optimised
for.

We can't really do much about it. The workaround is to use a different
VM, specify a --build= flag to MPIR's configure, or set up the VM to
emulate a different processor.

I don't think that updating the script is a good idea. It just
introduces the potential for further bugs in real machines.

Bill.

Nicholas Kinar

unread,
Dec 12, 2012, 5:18:46 PM12/12/12
to mpir-...@googlegroups.com, Nicholas Kinar, goodwi...@googlemail.com


On Wednesday, 12 December 2012 15:51:24 UTC-6, Bill Hart wrote:
The problem is that virtual machines incompletely implement some of
the instructions available on the native processors MPIR is optimised
for.

We can't really do much about it. The workaround is to use a different
VM, specify a --build= flag to MPIR's configure, or set up the VM to
emulate a different processor.

I don't think that updating the script is a good idea. It just
introduces the potential for further bugs in real machines.

Bill.

Thanks, Bill; this is very much appreciated, and it makes a lot of sense. 

Nicholas


 

 
Reply all
Reply to author
Forward
0 new messages