HorizenOfficial / zen

Horizen
https://www.horizen.io
Other
264 stars 120 forks source link

Build error using clang #626

Closed AndreaLanfranchi closed 10 months ago

AndreaLanfranchi commented 11 months ago

Describe the issue

Building with ./zcutil/build.sh --use-clang does not succeed due to the following error

In file included from libsnark/algebra/curves/tests/test_groups.cpp:11:
In file included from libsnark/algebra/curves/alt_bn128/alt_bn128_pp.hpp:11:
In file included from libsnark/algebra/curves/alt_bn128/alt_bn128_init.hpp:11:
In file included from libsnark/algebra/fields/fp.hpp:13:
In file included from libsnark/algebra/fields/bigint.hpp:15:
In file included from libsnark/common/serialization.hpp:102:
In file included from libsnark/common/serialization.tcc:19:
libsnark/common/utils.hpp:26:39: fatal error: use of undeclared identifier 'UINT64_C'
inline size_t exp2(size_t k) { return UINT64_C(1) << k; }
                                      ^
1 error generated.

Can you reliably reproduce the issue?

  1. Fresh clone the repository
  2. Start building the binary with ./zcutil/build.sh --use-clang
  3. Build does not succeed

Expected behavior

Build should succeed

Actual behavior and errors

No response

The full version of zend you are using

Latest source at commit 37c5823

Machine specs

Any extra information that might be useful in the debugging process

Build with no clang extra args (i.e. with gcc/g++) succeeds.

Do you have a back-up of ~/.zen directory and/or a VM snapshot?

Not relevant

ptagl commented 10 months ago

Hi @AndreaLanfranchi, thanks for reporting the issue.

It's been addressed with #629 and the fix will be available in the next Zen 5.0.0 release.