你如何在Windows中构建node.js?

时间:2012-11-12 10:18:26

标签: c++ node.js compilation

首先, C:\Users\User\Desktop\nodejs\node-v0.8.14>vcbuild.bat >> build.output.txt

然后我在build.output.txt内找到了这个:

{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'clang': 0,
                 'gcc_version': 46,
                 'host_arch': 'ia32',
                 'node_install_npm': 'true',
                 'node_install_waf': 'true',
                 'node_prefix': '',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_unsafe_optimizations': 0,
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'true',
                 'node_use_openssl': 'true',
                 'target_arch': 'ia32',
                 'v8_no_strict_aliasing': 1,
                 'v8_use_snapshot': 'true'}}
creating  config.gypi
creating  config.mk
Project files generated.
  http_parser.c
  js2c, and also js2c_experimental
  http_parser.vcxproj -> C:\Users\User\Desktop\nodejs\node-v0.8.14\Release\lib\http_parser.lib
  node_etw
src\res\node_etw_provider.man : error : Failed to open file for write: 'C:\Users\User\Desktop\nodejs\node-v0.8.14\Release\obj\global_intermediate\node_etw_providerTEMP.BIN' [C:\Users\User\Desktop\nodejs\node-v0.8.14\node_etw.vcxproj]
MC : error : Failed creating  provider resources for manifest 2 [C:\Users\User\Desktop\nodejs\node-v0.8.14\node_etw.vcxproj]
  node_js2c
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\x86cpuid.asm to Release\obj\openssl\x86cpuid.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\bf\bf-686.asm to Release\obj\openssl\bf-686.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\ripemd\rmd-586.asm to Release\obj\openssl\rmd-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\cast\cast-586.asm to Release\obj\openssl\cast-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\rc4\rc4-586.asm to Release\obj\openssl\rc4-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\rc5\rc5-586.asm to Release\obj\openssl\rc5-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\bn\x86-mont.asm to Release\obj\openssl\x86-mont.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\bn\x86.asm to Release\obj\openssl\x86.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\des\des-586.asm to Release\obj\openssl\des-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\des\crypt586.asm to Release\obj\openssl\crypt586.obj.
  uv-common.c
  cares.c
  fs-poll.c
  loop-watcher.c
  process.c
  util.c
  stream.c
  getaddrinfo.c
  poll.c
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\camellia\cmll-x86.asm to Release\obj\openssl\cmll-x86.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\aes\aes-586.asm to Release\obj\openssl\aes-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\sha\sha256-586.asm to Release\obj\openssl\sha256-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\sha\sha1-586.asm to Release\obj\openssl\sha1-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\sha\sha512-586.asm to Release\obj\openssl\sha512-586.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\whrlpool\wp-mmx.asm to Release\obj\openssl\wp-mmx.obj.
  Assembling C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\asm\x86-win32-masm\md5\md5-586.asm to Release\obj\openssl\md5-586.obj.
  s2_pkt.c
  s3_enc.c
  s23_pkt.c
  threadpool.c
  fs-event.c
  handle.c
  tty.c
  timer.c
  dl.c
  winapi.c
  udp.c
  thread.c
  req.c
  fs.c
  pipe.c
  tcp.c
  core.c
  async.c
  process-stdio.c
  error.c
  winsock.c
  ares_parse_ptr_reply.c
  ares_timeout.c
  ares_process.c
  inet_net_pton.c
  ares_version.c
  ares_init.c
  ares_gethostbyname.c
  ares_getsock.c
  ares_free_hostent.c
  ares_getenv.c
  ares_cancel.c
  ares_strcasecmp.c
  ares_writev.c
  ares_mkquery.c
  ares_destroy.c
  ares_parse_txt_reply.c
  circular-queue.cc
  full-codegen.cc
  inspector.cc
  execution.cc
  ares_gethostbyaddr.c
  t1_meth.c
  ssl_lib.c
  ares_parse_mx_reply.c
  ares_expand_name.c
  ares__close_sockets.c
  ssl_asn1.c
  ares_getopt.c
  inet_ntop.c
  ares_library_init.c
  hydrogen.cc
  s23_lib.c
  ares_fds.c
  ssl_txt.c
  ares_expand_string.c
  ares_strdup.c
  ssl_algs.c
  ares_llist.c
  s23_srvr.c
  ares_parse_a_reply.c
  d1_both.c
  ares_free_string.c
  ares_platform.c
  s3_meth.c
  ares_options.c
  ares_parse_aaaa_reply.c
  ssl_err2.c
  ares_parse_srv_reply.c
  ares__timeval.c
  ares__read_line.c
  bio_ssl.c
  s2_meth.c
  bitncmp.c
  ares_parse_ns_reply.c
  ares_search.c
  ares__get_hostent.c
  ares_strerror.c
  s3_clnt.c
  s3_lib.c
  windows_port.c
  ares_data.c
  ares_nowarn.c
  debug.cc
  ares_send.c
  kssl.c
  t1_enc.c
  ares_getnameinfo.c
  ares_query.c
  d1_clnt.c
  t1_lib.c
  t1_srvr.c
  ssl_cert.c
  t1_clnt.c
  ssl_stat.c
  uv.vcxproj -> C:\Users\User\Desktop\nodejs\node-v0.8.14\Release\lib\uv.lib
  ssl_sess.c
  s3_both.c
  d1_pkt.c
  s23_clnt.c
  s2_lib.c
  t1_reneg.c
  s2_enc.c
  ssl_rsa.c
  d1_lib.c
  ssl_ciph.c
  s23_meth.c
  s2_srvr.c
  ssl_err.c
  builtins.cc
  global-handles.cc
  trees.c
  s2_clnt.c
  inffast.c
  uncompr.c
  inftrees.c
  infback.c
  compress.c
  zutil.c
  crc32.c
  adler32.c
  inflate.c
  gzio.c
  deflate.c
  zip.c
  iowin32.c
  unzip.c
  ioapi.c
  s3_pkt.c
  d1_srvr.c
  s3_srvr.c
  d1_meth.c
  d1_enc.c
  zlib.vcxproj -> C:\Users\User\Desktop\nodejs\node-v0.8.14\Release\lib\zlib.lib
openssl\ssl\s3_srvr.c(3307): warning C4018: '>' : signed/unsigned mismatch [C:\Users\User\Desktop\nodejs\node-v0.8.14\deps\openssl\openssl.vcxproj]
  cversion.c
  ex_data.c
  mem_dbg.c
  o_dir.c
  o_time.c
  cryptlib.c
  platform-win32.cc
  regexp-macro-assembler-irregexp.cc
  o_str.c
  uid.c
  ebcdic.c
  mem.c
  cpt_err.c
  krb5_asn.c
  rand_lib.c
  rand_os2.c
  rand_err.c
  rand_win.c
  rand_egd.c
  rand_unix.c
  rand_nw.c
  randfile.c
  md_rand.c
  v3_skey.c
  dtoa.cc
  debug-agent.cc
  v3_sxnet.c
  v3err.c
  v3_ocsp.c
  v3_ncons.c
  v3_lib.c
  pcy_node.c
  v3_bcons.c
  v3_pci.c
  pcy_data.c
  v3_ia5.c
  v3_utl.c
  v3_cpols.c
  objects-printer.cc
  v3_conf.c
  token.cc
  code-stubs.cc
  v3_akeya.c
  v3_pku.c
  v3_addr.c
  v3_int.c
  pcy_lib.c
  v3_pcons.c
  v3_genn.c
  objects-debug.cc
  v3_purp.c
  pcy_tree.c
  v3_enum.c
  v3_pmaps.c
  v3_alt.c
  v3_bitst.c
  v3_crld.c
  pcy_map.c
  v3_info.c
  v3_asid.c
  v3_prn.c
  win32-math.cc
  v3_akey.c
  pcy_cache.c
  v3_extku.c
  v3_pcia.c
  store-buffer.cc
  txt_db.c
  ech_lib.c
  ech_key.c
  ech_err.c
  ech_ossl.c
  p12_attr.c
  p12_asn.c
  p12_utl.c
  p12_add.c
  p12_crt.c
  type-info.cc
  p12_key.c
  p12_crpt.c
  p12_p8d.c
  pk12err.c
  p12_decr.c
  runtime-profiler.cc
  p12_mutl.c
  p12_kiss.c
  p12_p8e.c
  p12_init.c
  p12_npas.c
  conf_mod.c
  conf_def.c
  conf_lib.c
  conf_err.c
  conf_mall.c
  conf_sap.c
  conf_api.c
  ocsp_ext.c
  ocsp_asn.c
  ocsp_cl.c
  disassembler.cc
  ocsp_vfy.c
  ocsp_lib.c
  ocsp_srv.c
  ocsp_ht.c
  ocsp_prn.c
  ocsp_err.c
  sha256.c
  sha1_one.c
  sha512.c
  sha1dgst.c
  sha_dgst.c
  sha_one.c
  ts_req_utils.c
  ts_rsp_verify.c
  ts_rsp_print.c
  ts_rsp_sign.c
  ts_conf.c
  ts_verify_ctx.c
  ts_asn1.c
  ts_rsp_utils.c
  ts_err.c
  ts_lib.c
  ts_req_print.c
  evp_asn1.c
  x_sig.c
  t_x509a.c
  n_pkey.c
  a_object.c
  scopes.cc
  factory.cc
  d2i_pr.c
  tasn_new.c
  x_attrib.c
  x_info.c
  t_spki.c
  x_long.c
  a_time.c
  tasn_typ.c
  asn1_gen.c
  a_utctm.c
  tasn_prn.c
  x_bignum.c
  a_bool.c
  t_bitst.c
  api.cc
  asn_pack.c
  x_algor.c
  t_crl.c
  x_pkey.c
  a_bytes.c
  t_req.c
  a_set.c
  bio_asn1.c
  a_utf8.c
  asn1_lib.c
  asn_mime.c
  x_x509.c
  a_enum.c
  a_strex.c
  a_sign.c
  a_int.c
  a_strnid.c
  nsseq.c
  i2d_pu.c
  tasn_dec.c
  p5_pbe.c
  a_dup.c
  x_nx509.c
  date.cc
  t_pkey.c
  x_x509a.c
  a_octet.c
  p8_pkey.c
  a_mbstr.c
  f_string.c
  d2i_pu.c
  tasn_fre.c
  x_crl.c
  a_digest.c
  f_int.c
  asn1_par.c
  f_enum.c
  accessors.cc
  a_d2i_fp.c
  tasn_utl.c
  x_exten.c
  a_gentm.c
  ameth_lib.c
  asn1_err.c
  a_bitstr.c
  a_print.c
  x_req.c
  p5_pbev2.c
  a_type.c
  x_spki.c
  bio_ndef.c
  a_verify.c
  x_pubkey.c
  dateparser.cc
  x_name.c
  a_i2d_fp.c
  i2d_pr.c
  func-name-inferrer.cc
  asn_moid.c
  tasn_enc.c
  x_val.c
  t_x509.c
  pem_pk8.c
  pem_info.c
  pem_seal.c
  pem_x509.c
  pem_lib.c
  pem_oth.c
  scopeinfo.cc
  pem_all.c
  pem_pkey.c
  pem_xaux.c
  pvkfmt.c
  string-stream.cc
  pem_sign.c
  pem_err.c
  lh_stats.c
  lhash.c
  ecs_sign.c
  ecs_err.c
  ecs_ossl.c
  ecs_asn1.c
  ecs_vrf.c
  ecs_lib.c
  str_mem.c
  str_err.c
  str_meth.c
  str_lib.c
  dsa_err.c
  dsa_asn1.c
  bootstrapper.cc
  dsa_key.c
  dsa_prn.c
  dsa_gen.c
  dsa_pmeth.c
  dsa_vrf.c
  dsa_ossl.c
  dsa_lib.c
  dsa_ameth.c
  dsa_depr.c
  dsa_sign.c
  eng_openssl.c
  eng_list.c
  fixed-dtoa.cc
  log.cc
  tb_rsa.c
  tb_cipher.c
  tb_asnmth.c
  eng_err.c
  frames.cc
  eng_ctrl.c
  tb_dh.c
  eng_cryptodev.c
  eng_table.c
  eng_dyn.c
  eng_pkey.c
  tb_dsa.c
  eng_fat.c
  tb_store.c
  tb_digest.c
  eng_init.c
  tb_pkmeth.c
  eng_lib.c
  tb_rand.c
  eng_all.c
  tb_ecdh.c
  eng_cnf.c
  tb_ecdsa.c
  bio_cb.c
  compiler.cc
  b_print.c
  bss_bio.c
  bss_sock.c
  bf_buff.c
  bss_mem.c
  bf_null.c
  bss_acpt.c
  bss_file.c
  bio_err.c
  bio_lib.c
  bss_null.c
  bss_log.c
  b_sock.c
  bss_fd.c
  b_dump.c
  bf_nbio.c
  bss_dgram.c
  bss_conn.c
  bf_ecb.c
  bf_skey.c
  bf_cfb64.c
  bf_ofb64.c
  wp_dgst.c
  wp_block.c
  dh_ameth.c
  dh_err.c
  preparse-data.cc
  dh_depr.c
  regexp-stack.cc
  dh_check.c
  dh_key.c
  dh_asn1.c
  dh_pmeth.c
  dh_prn.c
  dh_lib.c
  dh_gen.c
  x509_req.c
  x509_txt.c
  by_file.c
  x509_obj.c
  cpu-profiler.cc
  x509_vpm.c
  x509_d2.c
  x509_set.c
  x509spki.c
  x_all.c
  x509type.c
  x509_def.c
  x509_vfy.c
  x509_cmp.c
  counters.cc
  x509_att.c
  x509_v3.c
  x509_lu.c
  x509_ext.c
  x509_err.c
  x509_r2x.c
  string-search.cc
  x509rset.c
  by_dir.c
  x509name.c
  x509_trs.c
  x509cset.c
  comp_err.c
  c_zlib.c
  c_rle.c
  comp_lib.c
  bn_lib.c
  bn_gf2m.c
  log-utils.cc
  bn_add.c
  bn_blind.c
  bn_kron.c
  bn_nist.c
  bn_gcd.c
  bn_word.c
  bn_mont.c
  bn_mod.c
  lithium-allocator.cc
  bn_exp2.c
  bn_exp.c
  bn_print.c
  bn_prime.c
  bn_mpi.c
  version.cc
  bn_sqrt.c
  bn_err.c
  bn_mul.c
  bn_recp.c
  bn_ctx.c
  bn_shift.c
  bn_sqr.c
  bn_const.c
  bn_depr.c
  bn_rand.c
  bn_div.c
  rsa_depr.c
  rsa_pk1.c
  rsa_pmeth.c
  rsa_ssl.c
  utils.cc
  incremental-marking.cc
  rsa_asn1.c
  rsa_saos.c
  rsa_err.c
  rsa_pss.c
  rsa_none.c
  rsa_null.c
  rsa_x931.c
  rsa_eay.c
  rsa_gen.c
  rsa_sign.c
  rsa_lib.c
  rsa_ameth.c
  rsa_oaep.c
  rsa_chk.c
  rsa_prn.c
  pqueue.c
  o_names.c
  obj_xref.c
  obj_dat.c
  obj_err.c
  obj_lib.c
  buffer.c
  deoptimizer.cc
  buf_err.c
  ecp_nist.c
  ec_lib.c
  ec2_mult.c
  ec_key.c
  ec_curve.c
  ec_ameth.c
  eck_prn.c
  ec2_smpl.c
  ec_check.c
  ec_asn1.c
  ec_pmeth.c
  ecp_smpl.c
  ec_print.c
  ec_cvt.c
  ec_err.c
  ec_mult.c
  ecp_mont.c
  md2_one.c
  md2_dgst.c
  dso_beos.c
  dso_null.c
  dso_openssl.c
  dso_err.c
  dso_lib.c
  stack.c
  md4_dgst.c
  md4_one.c
  md5_one.c
  md5_dgst.c
  aes_wrap.c
  aes_ige.c
  aes_ecb.c
  aes_cfb.c
  aes_ctr.c
  aes_misc.c
  aes_ofb.c
  rmd_dgst.c
  rmd_one.c
  cbc128.c
  ofb128.c
  cfb128.c
  ctr128.c
  cts128.c
  err_all.c
  err_prn.c
  assembler.cc
  err.c
  set_key.c
  cfb64enc.c
  cbc_enc.c
  ofb_enc.c
  enc_writ.c
  read2pwd.c
  rpc_enc.c
  fcrypt.c
  ecb3_enc.c
  cbc_cksm.c
  cfb_enc.c
  xcbc_enc.c
  ecb_enc.c
  handles.cc
  enc_read.c
  des_old.c
  ofb64ede.c
  qud_cksm.c
  str2key.c
  cfb64ede.c
  ofb64enc.c
  des_old2.c
  pcbc_enc.c
  rand_key.c
  ede_cbcm_enc.c
  rc2ofb64.c
  rc2cfb64.c
  rc2_cbc.c
  rc2_ecb.c
  rc2_skey.c
  pk7_asn1.c
  pk7_lib.c
  allocation.cc
  liveobjectlist.cc
  preparser.cc
  pk7_mime.c
  pk7_attr.c
  ic.cc
  pk7_smime.c
  bio_pk7.c
  pkcs7err.c
  pk7_doit.c
  c_ofb64.c
  c_skey.c
  c_cfb64.c
  c_ecb.c
  ui_err.c
  ui_compat.c
  ui_util.c
  ui_openssl.c
  ui_lib.c
  bio_b64.c
  m_wp.c
  bio_ok.c
  m_dss1.c
  p_enc.c
  m_md4.c
  e_bf.c
  p_sign.c
  evp_lib.c
  c_all.c
  p_seal.c
  spaces.cc
  evp_pkey.c
  m_ecdsa.c
  m_sha.c
  p5_crpt2.c
  e_seed.c
  m_sha1.c
  evp_key.c
  e_old.c
  m_dss.c
  v8-counters.cc
  e_des.c
  pmeth_gn.c
  c_allc.c
  e_null.c
  e_des3.c
  e_rc2.c
  isolate.cc
  e_rc4.c
  bio_md.c
  m_md5.c
  p_open.c
  m_mdc2.c
  evp_pbe.c
  p5_crpt.c
  m_ripemd.c
  p_verify.c
  m_null.c
  evp_err.c
  evp_acnf.c
  e_xcbc_d.c
  names.c
  encode.c
  e_camellia.c
  m_sigver.c
  p_dec.c
  bio_enc.c
  e_cast.c
  digest.c
  e_aes.c
  p_lib.c
  pmeth_lib.c
  cached-powers.cc
  property.cc
  m_md2.c
  c_alld.c
  e_rc5.c
  evp_enc.c
  safepoint-table.cc
  pmeth_fn.c
  hm_pmeth.c
  hmac.c
  hm_ameth.c
  e_atalla.c
  e_4758cca.c
  e_cswift.c
  e_aep.c
  e_nuron.c
  e_gmp.c
  e_chil.c
  e_capi.c
  stub-cache.cc
  e_ubsec.c
  e_sureware.c
  compilation-cache.cc
  data-flow.cc
  checks.cc
  conversions.cc
  bignum.cc
  heap-profiler.cc
  snapshot-common.cc
  interface.cc
  openssl.vcxproj -> C:\Users\User\Desktop\nodejs\node-v0.8.14\Release\lib\openssl.lib
  jsregexp.cc
  regexp-macro-assembler.cc
  v8utils.cc
  liveedit.cc
  scanner.cc
  interpreter-irregexp.cc
  heap.cc
  elements-kind.cc
  scanner-character-streams.cc
  parser.cc
  variables.cc
  v8conversions.cc
  unicode.cc
  objects-visiting.cc
  flags.cc
  objects.cc
  prettyprinter.cc
  hydrogen-instructions.cc
  runtime.cc
  codegen.cc
  bignum-dtoa.cc
  zone.cc
  elements.cc
  serialize.cc
  regexp-macro-assembler-tracer.cc
  messages.cc
  v8.cc
  profile-generator.cc
  lithium.cc
  v8threads.cc
  atomicops_internals_x86_gcc.cc
  once.cc
  fast-dtoa.cc
  diy-fp.cc
  ast.cc
  strtod.cc
  contexts.cc
  rewriter.cc
  mark-compact.cc
  ic-ia32.cc
  debug-ia32.cc
  cpu-ia32.cc
  lithium-ia32.cc
  macro-assembler-ia32.cc
  frames-ia32.cc
  code-stubs-ia32.cc
  lithium-codegen-ia32.cc
  regexp-macro-assembler-ia32.cc
  full-codegen-ia32.cc
  builtins-ia32.cc
  disasm-ia32.cc
  codegen-ia32.cc
  deoptimizer-ia32.cc
  stub-cache-ia32.cc
  lithium-gap-resolver-ia32.cc
  assembler-ia32.cc
  externalize-string-extension.cc
  gc-extension.cc
  v8_base.vcxproj -> ..\..\..\..\build\Release\lib\v8_base.lib

...但是,文件夹中没有node.exe。我在这里缺少什么?

1 个答案:

答案 0 :(得分:0)

这对您的帮助可能为时已晚,但我遇到了类似的问题,因此它也可能对其他人有所帮助。

Node 的 vcbuild 脚本似乎并不能很好地处理错误。如果发生构建错误,它只会继续,然后这些项目就不会被构建。

所以在你的情况下,问题可能是顶部附近的这个错误:

src\res\node_etw_provider.man : error : Failed to open file for write: 'C:\Users\User\Desktop\nodejs\node-v0.8.14\Release\obj\global_intermediate\node_etw_providerTEMP.BIN' [C:\Users\User\Desktop\nodejs\node-v0.8.14\node_etw.vcxproj]
MC : error : Failed creating  provider resources for manifest 2 [C:\Users\User\Desktop\nodejs\node-v0.8.14\node_etw.vcxproj]
  node_js2c

我遇到了一个与 OpenSSL 相关的不同错误,因此,vcbuild 会简单地跳过一半的目标,然后默默地完成,而没有明确指出错误发生在构建的早期。