Skip to content

Current master (AVX2 and REF) broken on Linux and Mac #14

Description

@mouse07410

Fails to compile on Mac and Linux (CentOS 8 and Ubuntu 18.04.02):

$ cd ref-hrss701
$ make
gcc -O3 -fomit-frame-pointer -march=native -fPIC -fPIE -pie -Wall -Wextra -Wpedantic -DCRYPTO_NAMESPACE\(s\)=##s -o test/test_polymul cmov.c fips202.c kem.c owcpa.c pack3.c packq.c poly.c poly_lift.c poly_mod.c poly_r2_inv.c poly_rq_mul.c poly_s3_inv.c sample.c sample_iid.c randombytes.c test/test_polymul.c
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
In file included from kem.c:1:
api.h:11:28: error: ‘CRYPTO_NAMESPACE’ declared as function returning a function
 #define crypto_kem_keypair CRYPTO_NAMESPACE(keypair)
                            ^~~~~~~~~~~~~~~~
api.h:12:5: note: in expansion of macro ‘crypto_kem_keypair’
 int crypto_kem_keypair(unsigned char *pk, unsigned char *sk);
     ^~~~~~~~~~~~~~~~~~
api.h:12:1: warning: parameter names (without types) in function declaration
 int crypto_kem_keypair(unsigned char *pk, unsigned char *sk);
 ^~~
api.h:14:24: error: ‘CRYPTO_NAMESPACE’ declared as function returning a function
 #define crypto_kem_enc CRYPTO_NAMESPACE(enc)
                        ^~~~~~~~~~~~~~~~
api.h:15:5: note: in expansion of macro ‘crypto_kem_enc’
 int crypto_kem_enc(unsigned char *c, unsigned char *k, const unsigned char *pk);
     ^~~~~~~~~~~~~~
api.h:15:1: warning: parameter names (without types) in function declaration
 int crypto_kem_enc(unsigned char *c, unsigned char *k, const unsigned char *pk);
 ^~~
api.h:17:24: error: ‘CRYPTO_NAMESPACE’ declared as function returning a function
 #define crypto_kem_dec CRYPTO_NAMESPACE(dec)
                        ^~~~~~~~~~~~~~~~
api.h:18:5: note: in expansion of macro ‘crypto_kem_dec’
 int crypto_kem_dec(unsigned char *k, const unsigned char *c, const unsigned char *sk);
     ^~~~~~~~~~~~~~
api.h:18:1: warning: parameter names (without types) in function declaration
 int crypto_kem_dec(unsigned char *k, const unsigned char *c, const unsigned char *sk);
 ^~~
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
<command-line>: error: '##' cannot appear at either end of a macro expansion
make: *** [Makefile:45: test/test_polymul] Error 1

The above happens with all the compilers I have - current Apple Clang, Clang-10, GCC-10, and on both Mac and Linux platforms.

With avx2-hrss701 it's even merrier - missing source file verify.c:

$ cd avx2-hrss701/
$ make
make: *** No rule to make target `verify.c', needed by `test/test_polymul'.  Stop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions