Git Product home page Git Product logo

Comments (7)

karalabe avatar karalabe commented on July 28, 2024

Could you try with updating to Go 1.8.1? These error messages seem originate from Go's compiler, not this library golang/go#14669

from hid.

sergei-mironov avatar sergei-mironov commented on July 28, 2024

I've tried go1.8 compiler (the latest available on NixOS so far). Errors are still here, but the text is a bit different. As far as I understand the golang/go#14669, one could workaround errors by passing '-O0'. I'll try to do that.

# github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid
cgo-dwarf-inference:2:8: error: enumerator value for '__cgo_enum__0' is not an integer constant
cgo-dwarf-inference:10:8: error: enumerator value for '__cgo_enum__7' is not an integer constant
cgo-dwarf-inference:18:2: error: initializer element is not constant
cgo-dwarf-inference:18:2: note: (near initialization for '__cgodebug_data[0]')
cgo-dwarf-inference:25:2: error: initializer element is not constant
cgo-dwarf-inference:25:2: note: (near initialization for '__cgodebug_data[7]')

from hid.

javgh avatar javgh commented on July 28, 2024

Another NixOS user here - I also ran into this and have been attempting to debug it. It seems to be indeed unrelated to geth and a general problem with the go compiler under NixOS. I have filed a separate issue here: NixOS/nixpkgs#25599 .

from hid.

sergei-mironov avatar sergei-mironov commented on July 28, 2024

Thanks to @javaGH, looks like we used gcc instead of clang. So it is really a NixOS issue. Closing this one now.

from hid.

javgh avatar javgh commented on July 28, 2024

Indeed, the issue was that under NixOS the Go compiler is built using clang, but then while trying to build geth the C compiler was set to gcc. I have an updated NixOS package for geth 1.6.1 over here which works for me: https://github.com/javgh/nixpkgs/blob/master/pkgs/applications/altcoins/go-ethereum.nix . Cheers!

from hid.

aaronlevin avatar aaronlevin commented on July 28, 2024

I just wanted to pop in to say I'm seeing this too (via Nix) and this was a hard issue to track down.

from hid.

javgh avatar javgh commented on July 28, 2024

Just as a FYI: The original guess regarding the compiler mixup was actually incorrect. Everything is built using gcc by default on Nix - including the Go compiler. Switching to clang still helps though as a workaround. The root cause is still unsolved though, as far as I know. This is the most recent issue about it: NixOS/nixpkgs#25959 .

from hid.

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.