status-im / nim-secp256k1

A wrapper for libsecp256k1
Apache License 2.0
9 stars 5 forks source link

Build error - Error: undeclared identifier: 'csize_t'` #20

Closed oskarth closed 4 years ago

oskarth commented 4 years ago

Problem

Running git submodule update --init and nimble test in nim-secp256k1 at latest (https://github.com/status-im/nim-secp256k1/commit/5af866754b5f17c49e1a1f7f90f2fd0c235eee99) results in error /home/oskarth/git/status-im/nim-secp256k1/secp256k1.nim(105, 9) Error: undeclared identifier: 'csize_t'.

Workaround

If I checkout HEAD~1 nimble test works.

Notes

I also notice that if I do git submodule update and run ./gen.sh in the wrapper that secp256k1_wrapper/libsecp256k1-config.h changes a bit (nothing major from what I can tell tho)

First encountered when building nim-libp2p. I tried clearing cache at ~/.cache/nim but I might be missing some other cache or submodule update command.

jangko commented 4 years ago

csize_t is introduced in Nim 1.2.0 probably your Nim compiler is outdated. we already port nimbus codebase to Nim 1.2.0

oskarth commented 4 years ago

Gotcha, it works now. Thanks