简体   繁体   English

g ++:“没有这样的文件或目录”

[英]g++: “No such file or directory”

I am trying to install a library for lattice cryptography, which is called as NFLlib: https://github.com/quarkslab/NFLlib 我正在尝试安装用于晶格密码学的库,称为NFLlib: https : //github.com/quarkslab/NFLlib

I downloaded and opened it in desktop and then follow the commands which are given in README - Install Steps: 我下载并在桌面中打开了它,然后按照自述文件-安装步骤中给出的命令进行操作:

$> mkdir _build
$> cd _build
$> cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/nfllib
$> make
$> make test
$> make install

After running make test , I encountered with this error: 运行make test ,遇到此错误:

The following tests FAILED:
                  5 - build_nfl_add8_60_uint32_t (Failed)
                  6 - run_nfl_add8_60_uint32_t (Not Run)
                  7 - build_nfl_sub8_60_uint32_t (Failed)
                  8 - run_nfl_sub8_60_uint32_t (Not Run)
                  9 - build_nfl_mul8_60_uint32_t (Failed)
                 10 - run_nfl_mul8_60_uint32_t (Not Run)
                 11 - build_nfl_eq8_60_uint32_t (Failed)
                 12 - run_nfl_eq8_60_uint32_t (Not Run)
                 13 - build_nfl_neq8_60_uint32_t (Failed)
                 14 - run_nfl_neq8_60_uint32_t (Not Run)
                 15 - build_nfl_stream8_60_uint32_t (Failed)
                 16 - run_nfl_stream8_60_uint32_t (Not Run)
                 17 - build_poly_p8_60_uint32_t (Failed)
                 18 - run_poly_p8_60_uint32_t (Not Run)
                 19 - build_poly_set8_60_uint32_t (Failed)
                 20 - run_poly_set8_60_uint32_t (Not Run)
                 21 - build_poly_mpz8_60_uint32_t (Failed)
                 22 - run_poly_mpz8_60_uint32_t (Not Run)
                 23 - build_poly_serialize_manually8_60_uint32_t (Failed)
                 24 - run_poly_serialize_manually8_60_uint32_t (Not Run)
                 29 - build_nfl_add128_14_uint16_t (Failed)
                 30 - run_nfl_add128_14_uint16_t (Not Run)
                 31 - build_nfl_sub128_14_uint16_t (Failed)
                 32 - run_nfl_sub128_14_uint16_t (Not Run)
                 33 - build_nfl_mul128_14_uint16_t (Failed)
                 34 - run_nfl_mul128_14_uint16_t (Not Run)
                 35 - build_nfl_eq128_14_uint16_t (Failed)
                 36 - run_nfl_eq128_14_uint16_t (Not Run)
                 37 - build_nfl_neq128_14_uint16_t (Failed)
                 38 - run_nfl_neq128_14_uint16_t (Not Run)
                 39 - build_nfl_stream128_14_uint16_t (Failed)
                 40 - run_nfl_stream128_14_uint16_t (Not Run)
                 41 - build_poly_p128_14_uint16_t (Failed)
                 42 - run_poly_p128_14_uint16_t (Not Run)
                 43 - build_poly_set128_14_uint16_t (Failed)
                 44 - run_poly_set128_14_uint16_t (Not Run)
                 45 - build_poly_mpz128_14_uint16_t (Failed)
                 46 - run_poly_mpz128_14_uint16_t (Not Run)
                 47 - build_poly_serialize_manually128_14_uint16_t (Failed)
                 48 - run_poly_serialize_manually128_14_uint16_t (Not Run)
                 53 - build_nfl_add1024_60_uint32_t (Failed)
                 54 - run_nfl_add1024_60_uint32_t (Not Run)
                 55 - build_nfl_sub1024_60_uint32_t (Failed)
                 56 - run_nfl_sub1024_60_uint32_t (Not Run)
                 57 - build_nfl_mul1024_60_uint32_t (Failed)
                 58 - run_nfl_mul1024_60_uint32_t (Not Run)
                 59 - build_nfl_eq1024_60_uint32_t (Failed)
                 60 - run_nfl_eq1024_60_uint32_t (Not Run)
                 61 - build_nfl_neq1024_60_uint32_t (Failed)
                 62 - run_nfl_neq1024_60_uint32_t (Not Run)
                 63 - build_nfl_stream1024_60_uint32_t (Failed)
                 64 - run_nfl_stream1024_60_uint32_t (Not Run)
                 65 - build_poly_p1024_60_uint32_t (Failed)
                 66 - run_poly_p1024_60_uint32_t (Not Run)
                 67 - build_poly_set1024_60_uint32_t (Failed)
                 68 - run_poly_set1024_60_uint32_t (Not Run)
                 69 - build_poly_mpz1024_60_uint32_t (Failed)
                 70 - run_poly_mpz1024_60_uint32_t (Not Run)
                 71 - build_poly_serialize_manually1024_60_uint32_t (Failed)
                 72 - run_poly_serialize_manually1024_60_uint32_t (Not Run)
                 77 - build_nfl_add8192_124_uint64_t (Failed)
                 78 - run_nfl_add8192_124_uint64_t (Not Run)
                 79 - build_nfl_sub8192_124_uint64_t (Failed)
                 80 - run_nfl_sub8192_124_uint64_t (Not Run)
                 81 - build_nfl_mul8192_124_uint64_t (Failed)
                 82 - run_nfl_mul8192_124_uint64_t (Not Run)
                 83 - build_nfl_eq8192_124_uint64_t (Failed)
                 84 - run_nfl_eq8192_124_uint64_t (Not Run)
                 85 - build_nfl_neq8192_124_uint64_t (Failed)
                 86 - run_nfl_neq8192_124_uint64_t (Not Run)
                 87 - build_nfl_stream8192_124_uint64_t (Failed)
                 88 - run_nfl_stream8192_124_uint64_t (Not Run)
                 89 - build_poly_p8192_124_uint64_t (Failed)
                 90 - run_poly_p8192_124_uint64_t (Not Run)
                 91 - build_poly_set8192_124_uint64_t (Failed)
                 92 - run_poly_set8192_124_uint64_t (Not Run)
                 93 - build_poly_mpz8192_124_uint64_t (Failed)
                 94 - run_poly_mpz8192_124_uint64_t (Not Run)
                 95 - build_poly_serialize_manually8192_124_uint64_t (Failed)
                 96 - run_poly_serialize_manually8192_124_uint64_t (Not Run)
                101 - build_nfl_add1048576_124_uint64_t (Failed)
                102 - run_nfl_add1048576_124_uint64_t (Not Run)
                103 - build_nfl_sub1048576_124_uint64_t (Failed)
                104 - run_nfl_sub1048576_124_uint64_t (Not Run)
                105 - build_nfl_mul1048576_124_uint64_t (Failed)
                106 - run_nfl_mul1048576_124_uint64_t (Not Run)
                107 - build_nfl_eq1048576_124_uint64_t (Failed)
                108 - run_nfl_eq1048576_124_uint64_t (Not Run)
                109 - build_nfl_neq1048576_124_uint64_t (Failed)
                110 - run_nfl_neq1048576_124_uint64_t (Not Run)
                111 - build_nfl_stream1048576_124_uint64_t (Failed)
                112 - run_nfl_stream1048576_124_uint64_t (Not Run)
                113 - build_poly_p1048576_124_uint64_t (Failed)
                114 - run_poly_p1048576_124_uint64_t (Not Run)
                115 - build_poly_set1048576_124_uint64_t (Failed)
                116 - run_poly_set1048576_124_uint64_t (Not Run)
                117 - build_poly_mpz1048576_124_uint64_t (Failed)
                118 - run_poly_mpz1048576_124_uint64_t (Not Run)
                119 - build_poly_serialize_manually1048576_124_uint64_t (Failed)
                120 - run_poly_serialize_manually1048576_124_uint64_t (Not Run)
Errors while running CTest
make: *** [test] Error 8

I think these tests are failed, since I allocated insufficient memory for virtual machine. 我认为这些测试失败了,因为我为虚拟机分配了不足的内存。 Thus, I ignored them and continue. 因此,我忽略了它们并继续。

Next, I finished the installation with make install command and I entered below to compile the demo: 接下来,我使用make install命令完成了安装,并在下面输入了要编译的演示:

g++ -Ilib -lnfllib_static.a -std=c++11 nfllib_demo_main_op.cpp

This time the following error is shown: 这次显示以下错误:

In file included from nfllib_demo_main_op.cpp:1:0:
nfllib_demo_main.hpp:4:19: fatal error: nfl.hpp: No such file or directory
 #include "nfl.hpp"

I could not understand the reason for this error, since the header locates in the right folder as you can see from the above link. 我无法理解此错误的原因,因为标题位于正确的文件夹中,如您从上面的链接中所见。 Maybe something is wrong with the command that I typed to compile the demo. 我键入的用于编译演示的命令可能有问题。 Please excuse my ignorance about basic C++-commands. 请原谅我对基本C ++命令的无知。 How can I complete installation of the library and compile the demo? 如何完成库的安装并编译演示?

Edit (mindoo's advice): 编辑(mindoo的建议):

Command: 命令:

g++ -Ilib -lnfllib_static.a -std=c++11 nfllib_demo_main_op.cpp nfl.hpp

Result: 结果:

In file included from nfl.hpp:17:0,
                 from nfllib_demo_main.hpp:4,
                 from nfllib_demo_main_op.cpp:1:
nfl/poly.hpp:23:25: fatal error: nfl/debug.hpp: No such file or directory
 #include "nfl/debug.hpp"
                         ^
compilation terminated.
In file included from nfl.hpp:17:0:
nfl/poly.hpp:23:25: fatal error: nfl/debug.hpp: No such file or directory
 #include "nfl/debug.hpp"
                         ^
compilation terminated.

I'm not really good with libraries and their installation, but I do usually compile using the command line and g++. 我对库及其安装不是很满意,但是我通常使用命令行和g ++进行编译。 Could you possibly try to do : 您能否尝试做:

g++ -Ilib -lnfllib_static.a -std=c++11 nfllib_demo_main_op.cpp nfl.hpp

Tell me if that worked 告诉我那是否有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM