Porting GMP v4.1.4 to QNX4

mts.spb.suxx@mail.ru mts.spb.suxx at mail.ru
Sat Sep 24 15:12:18 CEST 2005


Hello List,

 After I've put the following (thanks to KBOB) in "gmp-h.in":
  || define (_STDIO_H_INCLUDED) /* QNX4 */

 so it looks like this:

#if defined (FILE)
        || defined (H_STDIO)                           \
        || defined (_H_STDIO)    /* AIX */             \
        || defined (_STDIO_H)    /* glibc, Sun, SCO */ \
        || defined (_STDIO_H_)  /* BSD, OSF */         \
        || defined (__STDIO_H__) /* IRIX */            \
        || defined (_STDIO_INCLUDED) /* HPUX */        \
        || defined (__dj_include_stdio_h_) /*HPUX */   \
        || defined (_FILE_DEFINED) /* Microsift */     \
        || defined (__STDIO__) /* Apple MPW MrC */     \
        || defined (_STDIO_H_INCLUDED) /* QNX4 */
#define _GMP_H_HAVE_FILE 1
#endif

the package does "./configure --host=none" itself correctly.

However, I get the same three failed tests as before:

Making check in tests
make[3]: Entering directory `//2/works/gmp-4.1.4/tests'
PASS: t-bswap
PASS: t-constants
PASS: t-count_zeros
PASS: t-gmpmax
PASS: t-modlinv
==================
All 5 tests passed
==================
make[3]: Entering directory `//2/works/gmp-4.1.4/tests/mpn'
PASS: t-asmtype
PASS: t-aors_1
PASS: t-iord_u
PASS: t-mp_bases
PASS: t-scan
==================
All 5 tests passed
==================
make[3]: Entering directory `//2/works/gmp-4.1.4/tests/mpz'
PASS: t-addsub
PASS: t-cmp
PASS: t-mul
PASS: t-mul_i
PASS: t-tdiv
PASS: t-tdiv_ui
PASS: t-fdiv
PASS: t-fdiv_ui
PASS: t-cdiv_ui
PASS: t-gcd
PASS: t-gcd_ui
PASS: t-lcm
PASS: dive
PASS: dive_ui
PASS: t-sqrtrem
PASS: convert
PASS: io
PASS: t-inp_str
PASS: logic
PASS: bit
PASS: t-powm
PASS: t-powm_ui
PASS: t-pow
PASS: t-div_2exp
PASS: reuse
PASS: t-root
PASS: t-perfsqr
PASS: t-jac
PASS: t-bin
PASS: t-get_d
PASS: t-get_si
PASS: t-set_si
PASS: t-fac_ui
PASS: t-fib_ui
PASS: t-lucnum_ui
PASS: t-scan
PASS: t-fits
PASS: t-divis
PASS: t-divis_2exp
PASS: t-cong
PASS: t-cong_2exp
PASS: t-sizeinbase
PASS: t-set_str
PASS: t-aorsmul
PASS: t-cmp_d
PASS: t-cmp_si
PASS: t-hamdist
PASS: t-oddeven
PASS: t-popcount
PASS: t-set_f
PASS: t-io_raw
PASS: t-import
PASS: t-export
===================
All 53 tests passed
===================
make[3]: Entering directory `//2/works/gmp-4.1.4/tests/mpq'
PASS: t-aors
PASS: t-cmp
PASS: t-cmp_ui
PASS: t-cmp_si
PASS: t-equal
PASS: t-get_d
PASS: t-get_str
PASS: t-inp_str
PASS: t-md_2exp
PASS: t-set_f
PASS: t-set_str
===================
All 11 tests passed
===================
make[3]: Entering directory `//2/works/gmp-4.1.4/tests/mpf'
PASS: t-add
PASS: t-sub
PASS: t-conv
PASS: t-sqrt
PASS: t-muldiv
PASS: t-dm2exp
PASS: reuse
PASS: t-get_d
PASS: t-cmp_si
PASS: t-fits
PASS: t-get_si
PASS: t-gsprec
PASS: t-int_p
PASS: t-set_si
PASS: t-trunc
===================
All 15 tests passed
===================
make[3]: Entering directory `//2/works/gmp-4.1.4/tests/rand'
PASS: t-lc2exp
PASS: t-rand
==================
All 2 tests passed
==================
make[3]: Entering directory `//2/works/gmp-4.1.4/tests/misc'

//2/works/gmp-4.1.4/tests/misc/t-printf terminated (SIGSEGV) at 0007:0100EEE2.
Segmentation fault
FAIL: t-printf
gmp_sscanf wrong result
gmp_sscanf wrong upto
  fmt   "%Zd"
  input "0"
  ignore 0
  ret   want=1
        got =1
  value want=0
        got =-999
  upto  want =1
        got  =-555
ABORT instruction
FAIL: t-scanf
GNU MP: Cannot allocate memory (size=134278328)
ABORT instruction
FAIL: t-locale
===================
3 of 3 tests failed
===================

KBOB feels that they fail because of va_copy() is somehow crippled on
QNX4. But I think this is because of no int64 support available in
Watcom C v10.6B
I suspect that things like "%Zd" and other such printf() extentions
are not handled on QNX4.

Please comment.

Any way, the GMP v4.1.4 seems to work on QNX4 well (as far as I could
test it by linking with it).
If I try to "./configure" letting it to guess the host type -
configuration fails - I think Watcom's ASM is somehow incompatible
with the sources of the GMP package. So, I can't tune the port for the
performance...

-- 
Best regards,
 Tony



More information about the gmp-discuss mailing list