Skip to content

Error compiling "cryptdigest" example #139

Description

@lll000111

Platform: Linux

# cc xsBigIntEx.c.o
# cc mont.c.o
# cc ec.c.o
# cc modular.c.o
# cc bin.c.o
# cc modBase64.c.o
# cc mc.resources.c
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c: In function ‘fxBigInt_ec_double’:
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c:544:17: error: ‘true’ undeclared (first use in this function)
   r->identity = true;
                 ^
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c:544:17: note: each undeclared identifier is reported only once for each function it appears in
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c:548:16: error: ‘false’ undeclared (first use in this function)
  r->identity = false;
                ^
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c: In function ‘fxBigInt_ec_add’:
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c:626:18: error: ‘true’ undeclared (first use in this function)
    r->identity = true;
                  ^
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c:631:16: error: ‘false’ undeclared (first use in this function)
  r->identity = false;
                ^
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c: In function ‘fxBigInt_ec_mul’:
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c:678:16: error: ‘true’ undeclared (first use in this function)
  r->identity = true;
                ^
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c: In function ‘fxBigInt_ec_mul2’:
/home/mha/Projects/moddable/modules/crypt/arith/xsBigIntEx.c:698:16: error: ‘true’ undeclared (first use in this function)
  r->identity = true;
                ^
/home/mha/Projects/moddable/build/tmp/lin/debug/mc/cryptdigest/makefile:476: recipe for target '/home/mha/Projects/moddable/build/tmp/lin/debug/mc/cryptdigest/xsBigIntEx.c.o' failed
make: *** [/home/mha/Projects/moddable/build/tmp/lin/debug/mc/cryptdigest/xsBigIntEx.c.o] Error 1

Unfortunately, when I define true and false the compilation appears to run through...

$ mcconfig -d -m -p lin
# xsid xsBigIntEx.c.xsi
# xsl modules
# cc mc.xs.c
# cc xsBigIntEx.c.o
# ld mc.so
mha@mint-virtual-machine ~/Projects/one.moddable/DEVICE $ 

... but nothing happens (xsbug is open and remains silent).

Seems to work on ESP32, the only other platform I tested. I use Linux for the basic tests to catch simpel errors like "module not found" without having to write to the board every time...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions