[Ecls-list] CVS build failure

Nils Bruin nbruin at cecm.sfu.ca
Mon Aug 31 17:18:45 UTC 2009


For the last couple of days, when I try to build ecls from CVS I get the 
following errors in the link for eclmin:

libeclmin.a(file.o): In function `ecl_make_string_output_stream':
/scratch/nbruin/sage-newecl/spkg/build/ecl-9.8.4/src/src/c/file.d:1468: 
undefined reference to `cl_alloc_adjustable_base_string'
libeclmin.a(read.o): In function `si_put_buffer_string':
/scratch/nbruin/sage-newecl/spkg/build/ecl-9.8.4/src/src/c/read.d:90: undefined 
reference to `cl_alloc_adjustable_base_string'
libeclmin.a(read.o): In function `si_get_buffer_string':
/scratch/nbruin/sage-newecl/spkg/build/ecl-9.8.4/src/src/c/read.d:63: undefined 
reference to `cl_alloc_adjustable_base_string'
libeclmin.a(format.o): In function `cl_format':
/scratch/nbruin/sage-newecl/spkg/build/ecl-9.8.4/src/src/c/format.d:2111: 
undefined reference to `cl_alloc_adjustable_base_string'

I assume these are deprecated functions that haven't been changed over yet, 
since unsetting NO_LEGACY does the trick. Is there an elegant way of enabling 
LEGACY (i.e., more elegant than "#undef ECL_NO_LEGACY" in external.h)?

Are there guidelines on when to expect CVS to build?

Other small points:

  * ECL currently assumes that GMP stores GMP_LIMB_BITS significant bits per 
limb. GMP stores GMP_NUMB_BITS in each limb. Most of the times, this is the 
same, but if GMP has "nails" configured (bits that can be used to handle 
carries more efficiently on some architectures), then GMP_NUMB_BITS can be 
smaller. See gmp.h and the code of init2 in gmp.

         if (x->big.big_dim > 3 * ECL_BIG_REGISTER_SIZE) {
                 mpz_realloc2(x->big.big_num, ECL_BIG_REGISTER_SIZE * 
GMP_LIMB_BITS);

The current effect will be that ECL allocates its registers a little larger 
than expected. Due to the tolerance above, reclaim code won't really be 
affected, unless more than 2/3 of a limb is used as nail.

If the problem is that ECL wants to stay compatible with earlier GMPs which 
might not have had nails, I suggest a

##ifdef GMP_NUMB_BITS
#define ECL_BITS_PER_GMP_LIMB      GMP_NUMB_BITS
#else
#define ECL_BITS_PER_GMP_LIMB      GMP_LIMB_BITS
#endif

and use that quantity instead.

  * In h/number.h, there are the lines:

#else  /* WITH_GMP */
[...]
#define _ecl_big_clear(x)		mpz_clear((x)->big.big_num)

which suggests that without GMP, there is still a macro that refers to a GMP 
routine. (it may well be that it never gets used. I didn't check)




More information about the ecl-devel mailing list