Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during "make test" #59

Open
sjhsjhsjh36 opened this issue Nov 24, 2024 · 0 comments
Open

Error during "make test" #59

sjhsjhsjh36 opened this issue Nov 24, 2024 · 0 comments

Comments

@sjhsjhsjh36
Copy link

I modified the poly.h file, added "extern" to each function, and then ran the make command to compile successfully. However, when the "make test" is executed, the following error message is displayed, It seems that there are a couple of key functions that are missing implementations

┌──(kali㉿kali)-[~/Desktop/libntru]
└─$ make test
make -f Makefile.linux testnoham
make[1]: Entering directory '/home/kali/Desktop/libntru'
rm -f src/.o src/.s tests/.o libntru.so libntru.a libntru.dylib libntru.dll testham testnoham testham.exe testnoham.exe bench bench.exe hybrid hybrid.exe
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/bitstring.c -o src/bitstring.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/encparams.c -o src/encparams.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/hash.c -o src/hash.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/idxgen.c -o src/idxgen.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/key.c -o src/key.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/mgf.c -o src/mgf.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/ntru.c -o src/ntru.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/poly.c -o src/poly.o
src/poly.c: In function ‘ntru_mult_int_64_base’:
src/poly.c:494:5: warning: ‘memset’ specified bound 18446744073709551614 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
494 | memset(c, 0, 2
(2len-1));
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/rand.c -o src/rand.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/arith.c -o src/arith.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/sha1.c -o src/sha1.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/sha2.c -o src/sha2.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/nist_ctr_drbg.c -o src/nist_ctr_drbg.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -c -fPIC src/rijndael.c -o src/rijndael.o
src/rijndael.c:856:64: warning: argument 3 of type ‘const u8[16]’ {aka ‘const unsigned char[16]’} with mismatched bound [-Warray-parameter=]
856 | rijndaelEncrypt(const u32 rk[/4(Nr + 1)
/], int Nr, const u8 pt[16],
| ~~~~~~~~~^~~~~~
In file included from src/rijndael.c:33:
src/rijndael.h:55:53: note: previously declared as ‘const unsigned char[]’
55 | void rijndaelEncrypt(const unsigned int [], int, const unsigned char [],
| ^~~~~~~~~~~~~~~~~~~~~~
src/rijndael.c:857:8: warning: argument 4 of type ‘u8[16]’ {aka ‘unsigned char[16]’} with mismatched bound [-Warray-parameter=]
857 | u8 ct[16])
| ~~~^~~~~~
src/rijndael.h:56:13: note: previously declared as ‘unsigned char[]’
56 | unsigned char []);
| ^~~~~~~~~~~~~~~~
CC=cc ASM="cc -c" /usr/bin/perl src/sha1-mb-x86_64.pl elf > src/sha1-mb-x86_64.s
cc -c src/sha1-mb-x86_64.s -o src/sha1-mb-x86_64.o
CC=cc ASM="cc -c" /usr/bin/perl src/sha256-mb-x86_64.pl elf > src/sha256-mb-x86_64.s
cc -c src/sha256-mb-x86_64.s -o src/sha256-mb-x86_64.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -mssse3 -c -fPIC src/hash_simd.c -o src/hash_simd.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -mssse3 -c -fPIC src/poly_ssse3.c -o src/poly_ssse3.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -mavx2 -c -fPIC src/poly_avx2.c -o src/poly_avx2.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -shared -Wl,-soname,libntru.so -o libntru.so src/bitstring.o src/encparams.o src/hash.o src/idxgen.o src/key.o src/mgf.o src/ntru.o src/poly.o src/rand.o src/arith.o src/sha1.o src/sha2.o src/nist_ctr_drbg.o src/rijndael.o src/sha1-mb-x86_64.o src/sha256-mb-x86_64.o src/hash_simd.o src/poly_ssse3.o src/poly_avx2.o -lrt
/usr/bin/ld: warning: src/sha256-mb-x86_64.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test_bitstring.c -o tests/test_bitstring.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test_hash.c -o tests/test_hash.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test_idxgen.c -o tests/test_idxgen.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test_key.c -o tests/test_key.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test_ntruprime.c -o tests/test_ntruprime.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test_ntru.c -o tests/test_ntru.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test.c -o tests/test.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test_poly.c -o tests/test_poly.o
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -fPIC -Isrc -c tests/test_util.c -o tests/test_util.o
CFLAGS=-g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT
cc -g -Wall -Wextra -Wno-unused-parameter -DNTRU_DETECT_SIMD -O2 -DNTRU_AVOID_HAMMING_WT_PATENT -o testnoham tests/test_bitstring.o tests/test_hash.o tests/test_idxgen.o tests/test_key.o tests/test_ntruprime.o tests/test_ntru.o tests/test.o tests/test_poly.o tests/test_util.o -L. -lntru -lm
/usr/bin/ld: tests/test_ntru.o: in function encrypt_poly': /home/kali/Desktop/libntru/tests/test_ntru.c:8:(.text+0x5): undefined reference to ntru_mult_tern'
/usr/bin/ld: /home/kali/Desktop/libntru/tests/test_ntru.c:10:(.text+0x2e): undefined reference to ntru_mod_mask' /usr/bin/ld: tests/test_ntru.o: in function decrypt_poly':
/home/kali/Desktop/libntru/tests/test_ntru.c:19:(.text+0x74): undefined reference to ntru_mult_tern' /usr/bin/ld: /home/kali/Desktop/libntru/tests/test_ntru.c:20:(.text+0x7d): undefined reference to ntru_mod_mask'
/usr/bin/ld: tests/test_poly.o: in function test_mult_int': /home/kali/Desktop/libntru/tests/test_poly.c:82:(.text+0x230): undefined reference to ntru_mult_int'
/usr/bin/ld: /home/kali/Desktop/libntru/tests/test_poly.c:92:(.text+0x412): undefined reference to ntru_mod_mask' /usr/bin/ld: /home/kali/Desktop/libntru/tests/test_poly.c:107:(.text+0x511): undefined reference to ntru_mod_mask'
/usr/bin/ld: tests/test_poly.o: in function test_mult_tern': /home/kali/Desktop/libntru/tests/test_poly.c:134:(.text+0x67b): undefined reference to ntru_mult_int'
/usr/bin/ld: tests/test_poly.o: in function verify_inverse': /home/kali/Desktop/libntru/tests/test_poly.c:219:(.text+0x8f3): undefined reference to ntru_mult_int'
/usr/bin/ld: /home/kali/Desktop/libntru/tests/test_poly.c:220:(.text+0x908): undefined reference to ntru_mod_mask' /usr/bin/ld: ./libntru.so: undefined reference to ntru_to_arr'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile.linux:155: testnoham] Error 1
make[1]: Leaving directory '/home/kali/Desktop/libntru'
make: *** [Makefile.linux:139: test] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant