juliangruber / require-rebuild

Patch `require()` to recompile a node module if it has been built for a different node version
74 stars 14 forks source link

Node ZeroMQ Bindings Fail to Recompile #13

Open ElliotChong opened 8 years ago

ElliotChong commented 8 years ago

When attempting to require the zmq module I'm receiving a repeated error (pasted below). I'm guessing this has something to do with the way the zmq module handles its particular build process; however, I figured I'd check here if someone has any pointers for debugging, avenues for investigation, or suggestions on fixes.

I'm using Electron 1.3.8 to load require-rebuild on OSX 10.11.6 - The module was originally installed and built with Node v6.9.1.

Thanks!

Recompiling electron-example/zero-mq/node_modules/zmq...
  CXX(target) Release/obj.target/zmq/binding.o
./Release/.deps/Release/obj.target/zmq/binding.o.d.raw { dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 1414231160,
  gid: 1896053708,
  rdev: 0,
  blksize: 4096,
  ino: 9270302,
  size: 1513,
  blocks: 8,
  atime: 2016-10-26T22:32:32.000Z,
  mtime: 2016-10-26T22:32:32.000Z,
  ctime: 2016-10-26T22:32:32.000Z,
  birthtime: 2016-10-26T22:32:32.000Z }
  SOLINK_MODULE(target) Release/zmq.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
ld: warning: directory not found for option '-L/opt/local/lib'
Done!
Recompiling electron-example/zero-mq/node_modules/zmq...
  CXX(target) Release/obj.target/zmq/binding.o
./Release/.deps/Release/obj.target/zmq/binding.o.d.raw { dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 1414231160,
  gid: 1896053708,
  rdev: 0,
  blksize: 4096,
  ino: 9270320,
  size: 1513,
  blocks: 8,
  atime: 2016-10-26T22:32:34.000Z,
  mtime: 2016-10-26T22:32:34.000Z,
  ctime: 2016-10-26T22:32:34.000Z,
  birthtime: 2016-10-26T22:32:34.000Z }
  SOLINK_MODULE(target) Release/zmq.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
ld: warning: directory not found for option '-L/opt/local/lib'
Done!
Recompiling electron-example/zero-mq/node_modules/zmq...
  CXX(target) Release/obj.target/zmq/binding.o
./Release/.deps/Release/obj.target/zmq/binding.o.d.raw { dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 1414231160,
  gid: 1896053708,
  rdev: 0,
  blksize: 4096,
  ino: 9270338,
  size: 1513,
  blocks: 8,
  atime: 2016-10-26T22:32:36.000Z,
  mtime: 2016-10-26T22:32:36.000Z,
  ctime: 2016-10-26T22:32:36.000Z,
  birthtime: 2016-10-26T22:32:36.000Z }
  SOLINK_MODULE(target) Release/zmq.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
ld: warning: directory not found for option '-L/opt/local/lib'
Done!
Recompiling electron-example/zero-mq/node_modules/zmq...
  CXX(target) Release/obj.target/zmq/binding.o
./Release/.deps/Release/obj.target/zmq/binding.o.d.raw { dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 1414231160,
  gid: 1896053708,
  rdev: 0,
  blksize: 4096,
  ino: 9270356,
  size: 1513,
  blocks: 8,
  atime: 2016-10-26T22:32:38.000Z,
  mtime: 2016-10-26T22:32:38.000Z,
  ctime: 2016-10-26T22:32:38.000Z,
  birthtime: 2016-10-26T22:32:38.000Z }
  SOLINK_MODULE(target) Release/zmq.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
ld: warning: directory not found for option '-L/opt/local/lib'
Done!
Recompiling electron-example/zero-mq/node_modules/zmq...
  CXX(target) Release/obj.target/zmq/binding.o
./Release/.deps/Release/obj.target/zmq/binding.o.d.raw { dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 1414231160,
  gid: 1896053708,
  rdev: 0,
  blksize: 4096,
  ino: 9270374,
  size: 1513,
  blocks: 8,
  atime: 2016-10-26T22:32:41.000Z,
  mtime: 2016-10-26T22:32:41.000Z,
  ctime: 2016-10-26T22:32:41.000Z,
  birthtime: 2016-10-26T22:32:40.000Z }
  SOLINK_MODULE(target) Release/zmq.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
ld: warning: directory not found for option '-L/opt/local/lib'
Done!
Recompiling electron-example/zero-mq/node_modules/zmq...
  CXX(target) Release/obj.target/zmq/binding.o
./Release/.deps/Release/obj.target/zmq/binding.o.d.raw { dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 1414231160,
  gid: 1896053708,
  rdev: 0,
  blksize: 4096,
  ino: 9270393,
  size: 1513,
  blocks: 8,
  atime: 2016-10-26T22:32:43.000Z,
  mtime: 2016-10-26T22:32:43.000Z,
  ctime: 2016-10-26T22:32:43.000Z,
  birthtime: 2016-10-26T22:32:43.000Z }
  SOLINK_MODULE(target) Release/zmq.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
ld: warning: directory not found for option '-L/opt/local/lib'
Done!
Recompiling electron-example/zero-mq/node_modules/zmq...
  CXX(target) Release/obj.target/zmq/binding.o
./Release/.deps/Release/obj.target/zmq/binding.o.d.raw { dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 1414231160,
  gid: 1896053708,
  rdev: 0,
  blksize: 4096,
  ino: 9270411,
  size: 1513,
  blocks: 8,
  atime: 2016-10-26T22:32:45.000Z,
  mtime: 2016-10-26T22:32:45.000Z,
  ctime: 2016-10-26T22:32:45.000Z,
  birthtime: 2016-10-26T22:32:45.000Z }
  SOLINK_MODULE(target) Release/zmq.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
ld: warning: directory not found for option '-L/opt/local/lib'
Done!
Error: Module version mismatch. Expected 49, got 48.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:168:20)
    at Object.Module._extensions..node (module.js:583:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:168:20)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Function.Module._load (node_modules/require-rebuild/index.js:69:19)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)