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

compile_commands_json breaks on Python3 #1946

Closed
gengjiawen opened this issue Oct 27, 2019 · 1 comment
Closed

compile_commands_json breaks on Python3 #1946

gengjiawen opened this issue Oct 27, 2019 · 1 comment
Labels

Comments

@gengjiawen
Copy link
Member

gengjiawen commented Oct 27, 2019

Similar to #1943

node-gyp configure -- -f compile_commands_json

cc @cclauss

Verbose output (from npm or node-gyp):
gyp info it worked if it ends with ok   
gyp info using node-gyp@6.0.0
gyp info using node@13.0.1 | linux | x64
gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/gyp_main.py',     
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'compile_commands_json',
gyp info spawn args   '-I',
gyp info spawn args   '/mnt/d/Developer/node-addon-examples/2_function_arguments/nan/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/share/.config/yarn/global/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/daniel/.cache/node-gyp/13.0.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/daniel/.cache/node-gyp/13.0.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/share/.config/yarn/global/node_modules/node-gyp',      
gyp info spawn args   '-Dnode_lib_file=/home/daniel/.cache/node-gyp/13.0.1/<(target_arch)/node.lib',    
gyp info spawn args   '-Dmodule_root_dir=/mnt/d/Developer/node-addon-examples/2_function_arguments/nan',
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 ]
Traceback (most recent call last):
  File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
    sys.exit(gyp.script_main())
  File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
    return main(sys.argv[1:])
  File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
    return gyp_main(args)
  File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 532, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py", line 95, in GenerateOutput
    for qualified_target, target in target_dicts.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/share/.config/yarn/global/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.4.0-18362-Microsoft
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "configure" "--" "-f" "compile_commands_json"
gyp ERR! cwd /mnt/d/Developer/node-addon-examples/2_function_arguments/nan
gyp ERR! node -v v13.0.1
gyp ERR! node-gyp -v v6.0.0
gyp ERR! not ok
@bnoordhuis
Copy link
Member

Closing as #1947 was merged.

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

Successfully merging a pull request may close this issue.

3 participants