relic-toolkit/relic

error: unknown type name ‘dig_t’; did you mean ‘div_t’?

mialuyao opened this issue · 4 comments

How to fix it?

libscapi/lib/OTExtensionEncrypto/extern/ENCRYPTO_utils/extern/relic/include/relic_epx.h:902:48: error: unknown type name ‘dig_t’
  902 | void ep2_mul_dig(ep2_t r, const ep2_t p, const dig_t k);
      |                                                ^~~~~
libscapi/lib/OTExtensionEncrypto/extern/ENCRYPTO_utils/extern/relic/include/relic_epx.h:1108:54: error: unknown type name ‘dig_t’
 1108 | void ep2_mul_sim_dig(ep2_t r, const ep2_t p[], const dig_t k[], int len);
      |                                                      ^~~~~
libscapi/lib/OTExtensionEncrypto/extern/ENCRYPTO_utils/extern/relic/include/relic_epx.h:1542:48: error: unknown type name ‘dig_t’
 1542 | void ep4_mul_dig(ep4_t r, const ep4_t p, const dig_t k);
      |                                                ^~~~~
libscapi/lib/OTExtensionEncrypto/extern/ENCRYPTO_utils/extern/relic/include/relic_epx.h:1748:54: error: unknown type name ‘dig_t’
 1748 | void ep4_mul_sim_dig(ep4_t r, const ep4_t p[], const dig_t k[], int len);

The type is actually defined in relic_types.h. Do you have a valid configuration?

The type is actually defined in relic_types.h. Do you have a valid configuration?

Thank you! I have got it.

The type is actually defined in relic_types.h. Do you have a valid configuration?

I have checked that .h files have been installed, but still could not be configured successfully.
Besides, I got many warnings.

/relic/include/relic_core.h:257:15: warning: type defaults to ‘int’ in declaration of ‘ep_a’ [-Wimplicit-int]
  257 |         fp_st ep_a;
      |               ^~~~
/relic/include/relic_core.h:259:15: warning: type defaults to ‘int’ in declaration of ‘ep_b’ [-Wimplicit-int]
  259 |         fp_st ep_b;
      |               ^~~~
/relic/include/relic_core.h:261:15: warning: type defaults to ‘int’ in declaration of ‘ep_b3’ [-Wimplicit-int]
  261 |         fp_st ep_b3;
      |               ^~~~~
/relic/include/relic_core.h:269:15: warning: type defaults to ‘int’ in declaration of ‘ep_map_u’ [-Wimplicit-int]
  269 |         fp_st ep_map_u;
      |               ^~~~~~~~
relic/include/relic_core.h:271:15: warning: type defaults to ‘int’ in declaration of ‘ep_map_c’ [-Wimplicit-int]
  271 |         fp_st ep_map_c[4];
      |               ^~~~~~~~
/relic/include/relic_core.h:275:15: warning: type defaults to ‘int’ in declaration of ‘beta’ [-Wimplicit-int]
  275 |         fp_st beta;
      |               ^~~~
relic/include/relic_core.h:370:15: warning: type defaults to ‘int’ in declaration of ‘ed_a’ [-Wimplicit-int]
  370 |         fp_st ed_a;
      |               ^~~~
/relic/include/relic_core.h:372:15: warning: type defaults to ‘int’ in declaration of ‘ed_d’ [-Wimplicit-int]
  372 |         fp_st ed_d;
      |               ^~~~
/relic/include/relic_core.h:374:15: warning: type defaults to ‘int’ in declaration of ‘ed_map_c’ [-Wimplicit-int]
  374 |         fp_st ed_map_c[4];

I use ubuntu with aarch64 on mac m1 parallel desktop. When I change the configuration to cmake -DARCH=A64, I would got the error:
error: unrecognized command-line option ‘-m64’

I want to know what the reason for these probably.

Thank you most sincerely.

I never tried RELIC on ARM Macs running Linux. Unfortunately I do not have access to such an environment, nor I can find something similar on AWS. However, I know that RELIC works in ARM Macs running MacOS, so we can't be too far.

Can you give me the sequence of commands you are using to build the library?