Comments (7)
I count it as resolved. One might be able to argue that failure might be caused by something in blst that can be formally viewed as ambiguous in respect to some comma in language specification, but odds are not in favour, since a whole bunch of compilers show no problem. But I'll keep my eyes open...
from blst.
Now travis-ci tests with --release, and it's all green. It's using stable rustc 1.44.1 and whatever C compiler there is. There is some gcc on Linux platforms, some clang on MacOS and some msvc on Windows.
It's now possible to effectively separate cc flags by pre-building libblst.a manually. In order to do that, go to bindings/rust, execute [say] ../../build.sh -O1
, cargo clean
[just in case] and finally cargo test --release
. This is assuming that you removed opt-level=2...
from blst.
Turns out I can get those tests to pass if I add this to the Cargo.toml
:
[profile.bench]
opt-level = 2
I'll make a branch which sets these values so it can compile inside Lighthouse, then make a PR for you to review.
from blst.
Tt turns out I need to set the global Lighthouse build to opt-level = 2
, which is a shame.
I imagine it's possible to run with opt-level = 3
(the default) if we can figure out what's causing the bad behaviour. I suspect it'll be inside an unsafe
block.
I need to move on now, but I might come back to this and have a poke around.
from blst.
What's your rustc --version
? And what's your cc --version
? Usually variance on optimization level is indication of a compiler bug. Note that there are two compilers involved and it can be bug in either... We probably should add an option to use pre-compiled libblst.a so that one can separate C and Rust flags for fine-grained troubleshooting... One should also wonder if CFLAGS environment variable have effect on cc-rs and if so, if you have one set... Try even env CC=clang cargo test --release
.
Just in case, excessive questions mean that we can't reproduce the problem...
from blst.
What's your rustc --version? And what's your cc --version?
Sorry for not providing this earlier.
rustc --version
rustc 1.44.1 (c7087fe00 2020-06-17)
cc --version
cc (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
from blst.
cc (GCC) 10.1.0
I bet this is the problem:-) Either way, I've limited cc optimization level to 2 in build.rs.
from blst.
Related Issues (20)
- Versioned EIP2333 Key Generation HOT 4
- A better build system? HOT 12
- How to compile the library libblst.a for iOS platform HOT 4
- multi-exponentiation with single point is wrong HOT 2
- Portable builds fail in shared library build HOT 2
- Support `-fvisibility=hidden`, use explicit visibility attributes for both private and public symbols HOT 7
- Using the C library: exp_mont_384 is hard to use HOT 1
- Rust bindings: `std` feature used but not declared in Cargo.toml HOT 25
- Unoptimized sha256 funcs always do runtime detection HOT 4
- Update optimization level recommendation HOT 2
- LVI countermeasures in assembly HOT 1
- Rust bindings reference non-existent "std" feature HOT 3
- Error building blst Wasm in Rust HOT 2
- Windows: bool is 4-bytes by default HOT 3
- `blst` fails to build in Windows on ARM device HOT 4
- `blst` fails to build macos 13.x HOT 2
- Rust bindings: `PublicKey::key_validate` not linking for `x86_64-fortanix-unknown-sgx` (current master branch) HOT 11
- [Rust-binding] Proposal to implement `std::hash::Hash` for publicly exposed structures HOT 6
- Rust Bindings: Replacing slices of references to iterators of references for aggregation HOT 3
- BLST throws illegal instruction error on AMD K10 CPUs (Windows) HOT 27
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blst.