Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while "go get": go-systemd invalid version #5361

Closed
flynn1973 opened this issue Jan 28, 2020 · 9 comments
Closed

error while "go get": go-systemd invalid version #5361

flynn1973 opened this issue Jan 28, 2020 · 9 comments

Comments

@flynn1973
Copy link

while trying to install from source, the following error is shown...
im running on redhat EL 7.7 with go 13.3.

root@lpgaixmgmtlx01:/root/go>go get github.com/influxdata/chronograf
go: finding github.com/influxdata/chronograf latest
go: downloading github.com/influxdata/chronograf v0.0.0-20200123181532-1f1e1eebc965
go: extracting github.com/influxdata/chronograf v0.0.0-20200123181532-1f1e1eebc965
go get: github.com/influxdata/chronograf@v0.0.0-20200123181532-1f1e1eebc965 requires
github.com/coreos/go-systemd@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000

@russorat
Copy link
Contributor

@flynn1973 thanks for the issue. I'm trying to repro but I don't have a redhat EL 7.7 system to test on but i tried on my mac with the latest go and had no issues. I see this issue for go-systemd: coreos/go-systemd#321 (comment)

which it looks like that's what we do in our go.mod file.

I'll leave this open in case someone from the community can pitch in.

@flynn1973
Copy link
Author

i forgot to mention that i run on ppc64le architecture, just in case this could be problematic.

@flynn1973
Copy link
Author

after cleaning up my node env a little bit this error is gone...but now i get node-gyp rebuild errors...

root@lpgaixmgmtlx01:/scratch/go/src/github.com/influxdata/chronograf>make
cd ui && yarn --no-progress --no-emoji
yarn install v1.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments:
Directory: /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@12.15.0 | linux | ppc64
gyp info find Python using Python version 2.7.5 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/12.15.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/12.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/12.15.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[1]: Entering directory '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build'
....
gibberish removed
....
In file included from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/root/.cache/node-gyp/12.15.0/include/node/node_object_wrap.h:84:78:   required from here
/root/.cache/node-gyp/12.15.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.15.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:66:61:   required from here
/root/.cache/node-gyp/12.15.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
make[1]: *** [deasync.target.mk:111: Release/obj.target/deasync/src/deasync.o] Error 1
make[1]: Leaving directory '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 3.10.0-1062.9.1.el7.ppc64le
gyp ERR! command "/scratch/node-v12.15.0-linux-ppc64le/bin/node" "/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
Build failed
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
make: *** [Makefile:91: .jsdep] Error 1

@flynn1973
Copy link
Author

issue for node-gyp
nodejs/node-gyp#2045

@russorat
Copy link
Contributor

@flynn1973 so reading through the node-gyp issue, looks like the problem is with deasync? Is that coming from an outdated requirement we have?

@flynn1973
Copy link
Author

seems so, i emptyed out ui/yarn.lock and let it generate itself...than the build went through without any errors. could be that my node is to new to. (12 LTS)

@hoorayimhelping
Copy link
Contributor

hoorayimhelping commented Feb 13, 2020

could be that my node is to new to. (12 LTS)

@flynn1973 yep, an error like this is indicative of a node version mismatch. chronograf 1.x targets Node 10.13.0 LTS. Changing your node version either by using nvm or (my personal preference, one of the most poorly named libraries ever) n to 10.13.0 then re-running make should fix this.

I'll add something to the readme to explain this.

@flynn1973
Copy link
Author

this "n" thing is quite amazing, simple and very helpfull, works perfectly on ppc64le also.

root@lpgaixmgmtlx01:/scratch/n>n 10.19.0

  installing : node-v10.19.0
       mkdir : /scratch/n/n/versions/node/10.19.0
       fetch : https://nodejs.org/dist/v10.19.0/node-v10.19.0-linux-ppc64le.tar.xz
   installed : v10.19.0 to /scratch/n/bin/node
      active : v12.15.0 at /scratch/node/bin/node

@russorat
Copy link
Contributor

@flynn1973 glad we figured this out. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants