Re: [libtom] Problem compiling libtomcrypt with libtommath on a mac

41 views
Skip to first unread message

Steffen Jaeckel

unread,
Jun 8, 2017, 10:41:13 AM6/8/17
to lib...@googlegroups.com, ricar...@gmail.com
Hi,

I don't know if you solved it already but your 3. step should be like that:

sudo CFLAGS="-DUSE_LTM -DLTM_DESC -DLTC_EASY
-I/usr/local/Cellar/libtommath/1.0/include" make install
EXTRALIBS="/usr/local/Cellar/libtommath/1.0/lib/libtommath.a"

Cheers,
Steffen

On 05/26/2017 07:17 AM, ricar...@gmail.com wrote:
> Hi, I'm having trouble compiling libtomcrypt with libtommath for mac, I
> did the following:
>
>
> 1. brew install libtommath (which installed libtommath 1.0)
> 2. git clone libtomcrypt
> 3. sudo make install CFLAGS="-DUSE_LTM -DLTM_DESC -DLTC_EASY
> -I/usr/local/Cellar/libtommath/1.0/include"
> EXTRALIBS="/usr/local/Cellar/libtommath/1.0/lib/libtommath.a"
>
> And I get the following errors:
>
>
> * gcc src/pk/ecc/ltc_ecc_mulmod_timing.o
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:51:15: warning: implicit declaration
> of function 'mp_montgomery_setup' is invalid in C99
> [-Wimplicit-function-declaration]
>
> if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) {
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:54:15: warning: implicit declaration
> of function 'mp_init' is invalid in C99 [-Wimplicit-function-declaration]
>
> if ((err = mp_init(&mu)) != CRYPT_OK) {
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:55:7: warning: implicit declaration
> of function 'mp_montgomery_free' is invalid in C99
> [-Wimplicit-function-declaration]
>
> mp_montgomery_free(mp);
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:58:15: warning: implicit declaration
> of function 'mp_montgomery_normalization' is invalid in C99
> [-Wimplicit-function-declaration]
>
> if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) {
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:59:7: warning: implicit declaration
> of function 'mp_clear' is invalid in C99 [-Wimplicit-function-declaration]
>
> mp_clear(mu);
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:82:15: warning: implicit declaration
> of function 'mp_mulmod' is invalid in C99 [-Wimplicit-function-declaration]
>
> if ((err = mp_mulmod(G->x, mu, modulus, tG->x)) != CRYPT_OK) { goto done; }
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:90:15: warning: implicit declaration
> of function 'mp_copy' is invalid in C99 [-Wimplicit-function-declaration]
>
> if ((err = mp_copy(tG->x, M[0]->x)) != CRYPT_OK) { goto done; }
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:100:13: warning: implicit declaration
> of function 'mp_get_digit_count' is invalid in C99
> [-Wimplicit-function-declaration]
>
> digidx = mp_get_digit_count(k) - 1;
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:109:19: warning: implicit declaration
> of function 'mp_get_digit' is invalid in C99
> [-Wimplicit-function-declaration]
>
> buf = mp_get_digit(k, digidx);
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:110:25: error: use of undeclared
> identifier 'MP_DIGIT_BIT'
>
> bitcnt = (int) MP_DIGIT_BIT;
>
> ^
>
> src/pk/ecc/ltc_ecc_mulmod_timing.c:115:20: error: use of undeclared
> identifier 'MP_DIGIT_BIT'
>
> i = (buf >> (MP_DIGIT_BIT - 1)) & 1;
>
>
> Any help solving this problem is greatly appreciated, thank you.
>
> --
> *** Please reply-to-all at all times ***
> *** (do not pretend to know who is subscribed and who is not) ***
> *** Please avoid top-posting. ***
> ---
> You received this message because you are subscribed to the Google
> Groups "LibTom Projects" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to libtom+un...@googlegroups.com
> <mailto:libtom+un...@googlegroups.com>.
> To post to this group, send email to lib...@googlegroups.com
> <mailto:lib...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/libtom.
> For more options, visit https://groups.google.com/d/optout.

--
Steffen Jaeckel - s_ja...@gmx.de
GnuPG fingerprint: C438 6A23 7ED4 3A47 5541 B942 7B2C D0DD 4BCF F59B
My OTR key has changed on 30. Sept. 2015!
jabber: jae...@jabber.ccc.de F052DE29 4FA9A02D 44A794E5 AE5AC0FB C5865C64
Reply all
Reply to author
Forward
0 new messages