Skip to content

Conversation

@robertzk
Copy link

@robertzk robertzk commented May 27, 2018

This pull request adds build support for OSX, tested on High Sierra with clang 9. See build log below.

Let me know what other modifications are required to get this merged. Thank you!

Build log

> make
/Library/Developer/CommandLineTools/usr/bin/make -C sha3
gcc -O2 -march=native -Wall -Wextra -Wpedantic -Werror -Wno-unused-function -std=gnu99    -c -o KeccakHash.o KeccakHash.c
gcc -O2 -march=native -Wall -Wextra -Wpedantic -Werror -Wno-unused-function -std=gnu99    -c -o KeccakP-1600-reference.o KeccakP-1600-reference.c
gcc -O2 -march=native -Wall -Wextra -Wpedantic -Werror -Wno-unused-function -std=gnu99    -c -o KeccakSpongeWidth1600.o KeccakSpongeWidth1600.c
gcc KeccakHash.o KeccakP-1600-reference.o KeccakSpongeWidth1600.o -o libshake.dylib  -dynamiclib -undefined suppress -flat_namespace
gcc -c -O2 -march=native -Wall -Wextra -Wpedantic -Werror -std=gnu99 -D__LINUX__ -D__X64__ -I./sha3 picnic_impl.c -o picnic_impl.o
gcc -c -O2 -march=native -Wall -Wextra -Wpedantic -Werror -std=gnu99 -D__LINUX__ -D__X64__ -I./sha3 picnic.c -o picnic.o
gcc -c -O2 -march=native -Wall -Wextra -Wpedantic -Werror -std=gnu99 -D__LINUX__ -D__X64__ -I./sha3 lowmc_constants.c -o lowmc_constants.o
gcc -c -O2 -march=native -Wall -Wextra -Wpedantic -Werror -std=gnu99 -D__LINUX__ -D__X64__ -I./sha3 hash.c -o hash.o
gcc -c -O2 -march=native -Wall -Wextra -Wpedantic -Werror -std=gnu99 -D__LINUX__ -D__X64__ -I./sha3 picnic_types.c -o picnic_types.o
mv sha3/libshake.dylib .
gcc picnic_impl.o picnic.o lowmc_constants.o hash.o picnic_types.o -o libpicnic.dylib libshake.dylib -dynamiclib -undefined suppress -flat_namespace
gcc example.c -O2 -march=native -Wall -Wextra -Wpedantic -Werror -std=gnu99 -D__LINUX__ -D__X64__ -I./sha3 libpicnic.dylib -o example libshake.dylib
gcc create_test_vectors.c -O2 -march=native -Wall -Wextra -Wpedantic -Werror -std=gnu99 -D__LINUX__ -D__X64__ -I./sha3 libpicnic.dylib -o create_test_vectors libshake.dylib
gcc unit_test.c -O2 -march=native -Wall -Wextra -Wpedantic -Werror -std=gnu99 -D__LINUX__ -D__X64__ -I./sha3 libpicnic.dylib -o unit_test libshake.dylib
> ./example                                                                                                                                                                    
Picnic example with parameter set: Picnic_L1_FS
Generating key...  success
Max signature length 34000 bytes
Signing a 500 byte message...  success, signature is 32848 bytes
Verifying signature...  success
Testing public key serialization...  success
Testing private key serialization...  success
# Etc...

@msftclas
Copy link

msftclas commented May 27, 2018

CLA assistant check
All CLA requirements met.

@mrtuborg
Copy link

mrtuborg commented Apr 2, 2019

Thanks @robertzk,

I can't wait when this PR will be merged.
I have applied your changes on my code and it works!

But in the master branch here one more file that can be fixed the same way: hash.c, line 19 https://github.com/Microsoft/Picnic/blob/master/hash.c

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

Successfully merging this pull request may close these issues.

3 participants