HarryR / ethsnarks

A toolkit for viable zk-SNARKS on Ethereum, Web, Mobile and Desktop
GNU Lesser General Public License v3.0
240 stars 57 forks source link

Release build on OSX/clang optimisation causes problems #108

Closed HarryR closed 4 years ago

HarryR commented 5 years ago

As per https://github.com/HarryR/ethsnarks-miximus/pull/7#issuecomment-455622067

Under the release build there is a problem where it crashes (while proving) immediately before:

  • QAP number of variables: 22897

This is likely an odd bug with the optimiser passing an invalid object reference so the number of variables exceeds the number of roots of unity (e.g. it gets a 64bit pointer, which exceeds 2**28).

There is a second bug:

from file '/tmp/lto.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

When including ethsnarks or libff in a .dylib, where by default visibility should be hidden apart from the necessary external module symbols.

HarryR commented 5 years ago

This may be related to the problems on Windows: #28

However, the Windows build problems are prevalent on all builds (not just Release / Optimised)

HarryR commented 4 years ago

This was fixed by #138

It's unrelated to the Windows problems.