Ubuntu上安装NTL库

1. Downloading and building GF2X

download gf2x-master.tar.gz: https://gitlab.inria.fr/gf2x/gf2x#the-gf2x-software-library

installation instruction:https://libntl.org/doc/tour-gf2x.html

   % gunzip gf2x-master.tar.gz
   % tar xf gf2x-master.tar
   % cd gf2x-master
   % ./configure --prefix=$HOME/sw
   % make
   % make check
   % make install

Problem 1:

bash: ./configure: No such file or directory

Solution: 

https://www.cnblogs.com/yjbjingcha/p/6817659.html

% sudo apt install autoconf
% sudo apt install make
% sudo apt install make-guile

% autoreconf --install
 

Problem 2:

% ./configure
config.status: error: cannot find input file: `Makefile.in'

Solution: 

https://blog.csdn.net/LEE_FIGHTING_JINGYU/article/details/105754580

% aclocal
% libtoolize --force
% automake --add-missing
% autoconf

2. Downloading and building GMP

download gmp-6.2.0.tar.lz:https://gmplib.org/list-archives/gmp-announce/2020-January/000048.html

installation instruction:https://libntl.org/doc/tour-gmp.html

   % lzip -d gmp-6.2.0.tar.lz

   % sudo apt-get install lzip

   % lzip -d gmp-6.2.0.tar.lz
   % tar xf gmp-6.2.0.tar
   % cd gmp-6.2.0
   % ./configure --prefix=$HOME/sw
   % make
   % make check
   % make install

3. Downloading and building NTL

download ntl-11.4.3.tar.gz: https://libntl.org/download.html

installation instruction: https://libntl.org/doc/tour-unix.html

   % gunzip ntl-11.4.3.tar.gz
   % tar xf ntl-11.4.3.tar
   % cd ntl-11.4.3/src

   % ./configure DEF_PREFIX=$HOME/sw 

   % make
   % make check
   % sudo make install 

Problem 1:

*** CompilerOutput.log ****** building GenConfigInfosh: 1: make: not found

Solution:

https://askubuntu.com/questions/1158572/compilation-failure-in-installing-ntl-library

sudo apt-get install build-essential 

Problem 2:

make[1]: Entering directory '/home/lijingyu/Downloads/wbaes-attack/ntl-11.3.2/src'
g++ -I../include -I.  -g -O2 -pthread -march=native  -I/home/lijingyu/sw/include  -o gen_gmp_aux gen_gmp_aux.cpp -L/home/lijingyu/sw/lib  -lgmp  -lm
./gen_gmp_aux > ../include/NTL/gmp_aux.h 
NTL_GMP_LIP flag set
GMP version check (6.1.0/6.2.0)
*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)
make[1]: *** [makefile:354: setup3] Error 134
make[1]: Leaving directory '/home/lijingyu/Downloads/wbaes-attack/ntl-11.3.2/src'
make: *** [makefile:320: setup-phase] Error 2


make[1]: Leaving directory '/home/lijingyu/Downloads/wbaes-attack/ntl-11.4.3/src'
make setup3
make[1]: Entering directory '/home/lijingyu/Downloads/wbaes-attack/ntl-11.4.3/src'
g++ -I../include -I.  -g -O2 -pthread -march=native  -I/home/lijingyu/sw/include  -o gen_gmp_aux gen_gmp_aux.cpp -L/home/lijingyu/sw/lib  -lgmp  -lm
./gen_gmp_aux > ../include/NTL/gmp_aux.h 
NTL_GMP_LIP flag set
GMP version check (6.1.0/6.2.0)
*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)
make[1]: *** [makefile:360: setup3] Error 134
make[1]: Leaving directory '/home/lijingyu/Downloads/wbaes-attack/ntl-11.4.3/src'
make: *** [makefile:326: setup-phase] Error 2

The Key:

GMP version check (6.1.0/6.2.0)
*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)
make[1]: *** [makefile:354: setup3] Error 134

Solution: 

https://stackoverflow.com/questions/50046463/version-number-mismatch-inconsistency-between-gmp-h-and-libgmp

Select the GMP latter version (6.2.0) to install

entered gmp-6.2.1 directory, using command:

sudo make uninstall

then downloaded gmp-6.2.0 and the problem was solved

So  gmp-6.2.0 match ntl-11.4.3

 

 

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值