Hi Russel,
We've seen something similar to this in the past when GMP had trouble
building (it can whizz by since we don't prevent Chapel from building
when it fails). If in the output you see:
|checking forsuitable m4...configure:error:Nousable m4 in$PATH
or/usr/5bin(see config.log forreasons).|
Then the solution has been to
|sudo apt-get install m4|
and attempt to rebuild GMP.
However, since GMP=system was also giving you trouble, there may be
something more going on. I would encourage you to open an issue on our
repository if this suggestion doesn't match your problem - that will
make it easier to track what has and has not be tried, without
generating so much mail for other subscribers. It might also be good to
link to https://github.com/chapel-lang/chapel/issues/7697, which tracks
the m4 requirement.
Thanks for reporting, and sorry you ran into this!
Lydia
On 1/5/18 11:04 AM, Russel Winder wrote:
I thought I would update some old code that used GMP and BigInt, to use
BigInteger and bigint. Yes it is various implementations of factorial
:-) (Yes I know about the bigint.fac function!)
I tried building Chapel master/HEAD 2018-01-05T19:03+00:00 with
CHPL_GMP=system and then rebuilt with CHPL_GMP=gmp, but got the same
result on compiling my code:
|> chpl -o factorial_test factorial.chpl factorial_test.chpl
In file included from /tmp/chpl-russel-29963.deleteme/_main.c:2:0:
/tmp/chpl-russel-29963.deleteme/chpl__header.h:266:9: error: unknown type name
‘__mpz_struct’
typedef __mpz_struct _tuple_1_star___mpz_struct[1];
^~~~~~~~~~~~
In file included from /tmp/chpl-russel-29963.deleteme/_main.c:47:0:
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function ‘init_chpl’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:23:1: error: unknown type name
‘__mpz_struct’; did you mean ‘__ptr_t’?
__mpz_struct type_tmp_chpl;
^~~~~~~~~~~~
__ptr_t
/tmp/chpl-russel-29963.deleteme/BigInteger.c:29:1: warning: implicit
declaration of function ‘mpz_init’; did you mean ‘mbsinit’?
[-Wimplicit-function-declaration]
mpz_init(*(call_tmp_chpl));
^~~~~~~~
mbsinit
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function ‘init_chpl2’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:39:1: error: unknown type name
‘__mpz_struct’; did you mean ‘__ptr_t’?
__mpz_struct type_tmp_chpl;
^~~~~~~~~~~~
__ptr_t
/tmp/chpl-russel-29963.deleteme/BigInteger.c:47:1: warning: implicit
declaration of function ‘mpz_init_set’; did you mean ‘chpl__init_Sys’?
[-Wimplicit-function-declaration]
mpz_init_set(*(call_tmp_chpl), *(call_tmp_chpl2));
^~~~~~~~~~~~
chpl__init_Sys
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function ‘init_chpl3’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:57:1: error: unknown type name
‘__mpz_struct’; did you mean ‘__ptr_t’?
__mpz_struct type_tmp_chpl;
^~~~~~~~~~~~
__ptr_t
/tmp/chpl-russel-29963.deleteme/BigInteger.c:63:1: warning: implicit
declaration of function ‘mpz_init_set_si’ [-Wimplicit-function-declaration]
mpz_init_set_si(*(call_tmp_chpl), num_chpl);
^~~~~~~~~~~~~~~
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function ‘init_chpl4’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:78:1: error: unknown type name
‘__mpz_struct’; did you mean ‘__ptr_t’?
__mpz_struct type_tmp_chpl;
^~~~~~~~~~~~
__ptr_t
/tmp/chpl-russel-29963.deleteme/BigInteger.c:119:18: warning: implicit
declaration of function ‘mpz_init_set_str’; did you mean ‘deque_it_set_cur’?
[-Wimplicit-function-declaration]
call_tmp_chpl8 = mpz_init_set_str(*(call_tmp_chpl7), call_tmp_chpl4,
((int32_t)(base_chpl)));
^~~~~~~~~~~~~~~~
deque_it_set_cur
/tmp/chpl-russel-29963.deleteme/BigInteger.c:123:1: warning: implicit
declaration of function ‘mpz_clear’ [-Wimplicit-function-declaration]
mpz_clear(*(call_tmp_chpl10));
^~~~~~~~~
In file included from /tmp/chpl-russel-29963.deleteme/_main.c:47:0:
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function ‘get_str_chpl’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:194:18: warning: implicit
declaration of function ‘chpl_gmp_mpz_get_str’; did you mean
‘chpl_gen_comm_get_strd’? [-Wimplicit-function-declaration]
call_tmp_chpl6 = chpl_gmp_mpz_get_str(call_tmp_chpl3, *(call_tmp_chpl5));
^~~~~~~~~~~~~~~~~~~~
chpl_gen_comm_get_strd
/tmp/chpl-russel-29963.deleteme/BigInteger.c:194:16: warning: assignment makes
pointer from integer without a cast [-Wint-conversion]
call_tmp_chpl6 = chpl_gmp_mpz_get_str(call_tmp_chpl3, *(call_tmp_chpl5));
^
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function ‘chpl___ASSIGN_3’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:265:1: warning: implicit
declaration of function ‘mpz_set’; did you mean ‘tzset’?
[-Wimplicit-function-declaration]
mpz_set(*(call_tmp_chpl), *(call_tmp_chpl2));
^~~~~~~
tzset
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function ‘chpl___ASSIGN_4’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:275:1: warning: implicit
declaration of function ‘mpz_set_si’ [-Wimplicit-function-declaration]
mpz_set_si(*(call_tmp_chpl), rhs_chpl);
^~~~~~~~~~
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function ‘chpl___ASTERISK_’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:295:1: warning: implicit
declaration of function ‘mpz_mul’ [-Wimplicit-function-declaration]
mpz_mul(*(call_tmp_chpl), *(call_tmp_chpl2), *(call_tmp_chpl3));
^~~~~~~
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function
‘chpl___EXCLAMATION__ASSIGN_’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:311:18: warning: implicit
declaration of function ‘mpz_cmp’; did you mean ‘memcmp’?
[-Wimplicit-function-declaration]
call_tmp_chpl3 = mpz_cmp(*(call_tmp_chpl), *(call_tmp_chpl2));
^~~~~~~
memcmp
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function
‘chpl___GREATER__ASSIGN_’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:339:18: warning: implicit
declaration of function ‘chpl_mpz_cmp_si’; did you mean ‘chpl_fs_umask’?
[-Wimplicit-function-declaration]
call_tmp_chpl2 = chpl_mpz_cmp_si(*(call_tmp_chpl), b_chpl);
^~~~~~~~~~~~~~~
chpl_fs_umask
/tmp/chpl-russel-29963.deleteme/BigInteger.c: In function
‘chpl___ASTERISK__ASSIGN_2’:
/tmp/chpl-russel-29963.deleteme/BigInteger.c:366:1: warning: implicit
declaration of function ‘mpz_mul_si’ [-Wimplicit-function-declaration]
mpz_mul_si(*(call_tmp_chpl), *(call_tmp_chpl2), b_chpl);
^~~~~~~~~~
In file included from /tmp/chpl-russel-29963.deleteme/_main.c:48:0:
/tmp/chpl-russel-29963.deleteme/GMP.c: In function ‘chpl__init_GMP’:
/tmp/chpl-russel-29963.deleteme/GMP.c:16:1: warning: implicit declaration of
function ‘chpl_gmp_init’; did you mean ‘chpl_rt_init’?
[-Wimplicit-function-declaration]
chpl_gmp_init();
^~~~~~~~~~~~~
chpl_rt_init
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users