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

make failing test #4

Closed
frehberg opened this issue May 7, 2018 · 5 comments
Closed

make failing test #4

frehberg opened this issue May 7, 2018 · 5 comments

Comments

@frehberg
Copy link

frehberg commented May 7, 2018

building the repo "bls" I the make-process yields the following build-error. It seems the test fails while reading the key-file sample/secretkey.txt

make[1]: Leaving directory '/home/frehberg/src/proj-dfinity/bls_work/mcl'
g++ -g3 -Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith -m64 -I include -I test -I ../xbyak -I ../cybozulib/include  -fomit-frame-pointer -DNDEBUG -Ofast -march=native -fPIC -std=c++11 -I../mcl/include -D"MCLBN_FP_UNIT_SIZE=6" -c sample/bls_smpl.cpp -o obj/bls_smpl.o -MMD -MP -MF obj/bls_smpl.d
g++ obj/bls_smpl.o -o bin/bls_smpl.exe lib/libbls.a lib/libbls384.a -lmcl -L../mcl/lib -lrt -lgmp -lgmpxx -lcrypto -m64  -lpthread
python bls_smpl.py
make sample/secretkey and sample/publickey files
sign message `hello bls threshold signature` by id=0
ERR can't load:sample/secretkey.txt
Traceback (most recent call last):
  File "bls_smpl.py", line 40, in <module>
    main()
  File "bls_smpl.py", line 29, in main
    sign(m)
  File "bls_smpl.py", line 9, in sign
    subprocess.check_call([EXE, "sign", "-m", m, "-id", str(i)])
  File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bin/bls_smpl.exe', 'sign', '-m', 'hello bls threshold signature', '-id', '0']' returned non-zero exit status 1
Makefile:27: recipe for target 'sample_test' failed
make: *** [sample_test] Error 1

My installation steps are as follows:

I cloned the following repos into a work-directory, and installed gmp dev-lib

sudo apt-get install libgmp3-dev
git clone git://github.com/herumi/xbyak.git
git clone git://github.com/herumi/cybozulib.git
git clone git://github.com/herumi/mcl.git
git clone git://github.com/herumi/bls.git

cd bls ; make
@herumi
Copy link
Owner

herumi commented May 8, 2018

Could you update mcl and bls?

make
python bls_smpl.py

is ok?

@frehberg
Copy link
Author

frehberg commented May 8, 2018

Hi, sorry, still error :(
the file exists, but it seems to fail to parse it into bls::SecretKey

(cd mcl; git pull; git clean -f)
(cd bls; git pull; git clean -f)
(cd bls; make)

make sample/secretkey and sample/publickey files
sign message hello bls threshold signature by id=0
ERR can't load:sample/secretkey.txt
Traceback (most recent call last):
File "bls_smpl.py", line 40, in
main()
File "bls_smpl.py", line 29, in main
sign(m)
File "bls_smpl.py", line 9, in sign
subprocess.check_call([EXE, "sign", "-m", m, "-id", str(i)])
File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bin/bls_smpl.exe', 'sign', '-m', 'hello bls threshold signature', '-id', '0']' returned non-zero exit status 1
Makefile:27: recipe for target 'sample_test' failed
make: *** [sample_test] Error 1
frehberg@mochila:/src/proj-dfinity/bls_work$ cd bls/
frehberg@mochila:
/src/proj-dfinity/bls_work/bls$ ls sample/
bls_smpl.cpp publickey.txt secretkey.txt

frehberg@mochila:~/src/proj-dfinity/bls_work/bls$ bin/bls_smpl.exe sign -m 'hello bls threshold signature' -id 0
sign message hello bls threshold signature by id=0
ERR can't load:sample/secretkey.txt

frehberg@mochila:~/src/proj-dfinity/bls_work/bls$ cat sample/secretkey.txt
0x18a3aded1f292138d4ba687db96176ee48343f8d9a3327972f1ee9e62c8a1035

@frehberg
Copy link
Author

frehberg commented May 8, 2018

same error if I remove all directory and perform clean check-out of all 4

@herumi
Copy link
Owner

herumi commented May 9, 2018

I'm sorry that I forgot to push the latest cybozulib. Could you pull the repository?

@frehberg
Copy link
Author

frehberg commented May 9, 2018

make call is succeeding now, and test results are green :)

@frehberg frehberg closed this as completed May 9, 2018
colibrishin added a commit to colibrishin/bls that referenced this issue Aug 16, 2022
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

2 participants