GithubHelp home page GithubHelp logo

Comments (7)

dot-asm avatar dot-asm commented on May 27, 2024 2

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.

dot-asm avatar dot-asm commented on May 27, 2024 1

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.

paulhauner avatar paulhauner commented on May 27, 2024

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.

paulhauner avatar paulhauner commented on May 27, 2024

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.

dot-asm avatar dot-asm commented on May 27, 2024

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.

paulhauner avatar paulhauner commented on May 27, 2024

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.

dot-asm avatar dot-asm commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.