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

Cannot build native module node-pty #138

Open
hhhoney opened this issue May 18, 2020 · 3 comments
Open

Cannot build native module node-pty #138

hhhoney opened this issue May 18, 2020 · 3 comments

Comments

@hhhoney
Copy link

hhhoney commented May 18, 2020

relevant issue: nwjs/nw.js#7473

Hello :), I found that some native modules (like node-pty) cannot be built under latest NW & nw-gyp.

NWJS Version : 0.45.6
nw-gyp version: 3.6.5
node version: 14.2.0
Operating System : macOS 10.15.4 (19E287) & Windows 10

How to reproduce

Just run following commands

npm i --save [email protected]
cd node_modules/node-pty
nw-gyp rebuild --arch=x64 --target=0.45.6

Error Example

......
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:669:10: error: use of undeclared identifier 'openpty'
  return openpty(amaster, aslave, name, (termios *)termp, (winsize *)winp);
         ^
../src/unix/pty.cc:717:10: error: use of undeclared identifier 'forkpty'
  return forkpty(amaster, name, (termios *)termp, (winsize *)winp);
         ^
2 errors generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
......
@GnorTech
Copy link
Member

A workaround is to remove ~/.nw-gyp/0.45.6/src/util.h

@mightytyphoon
Copy link

A workaround is to remove ~/.nw-gyp/0.45.6/src/util.h

I have also problems building node-pty, on windows, and I don't have this file. I am using the last version of nwjs 0.49.1 and I have only util-inl.h, debug_utils.h, json_utils.h...

@mightytyphoon
Copy link

relevant issue: nwjs/nw.js#7473

Hello :), I found that some native modules (like node-pty) cannot be built under latest NW & nw-gyp.

NWJS Version : 0.45.6

nw-gyp version: 3.6.5

node version: 14.2.0

Operating System : macOS 10.15.4 (19E287) & Windows 10

How to reproduce

Just run following commands

npm i --save [email protected]

cd node_modules/node-pty

nw-gyp rebuild --arch=x64 --target=0.45.6

Error Example

......

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]

  CXX(target) Release/obj.target/pty/src/unix/pty.o

../src/unix/pty.cc:669:10: error: use of undeclared identifier 'openpty'

  return openpty(amaster, aslave, name, (termios *)termp, (winsize *)winp);

         ^

../src/unix/pty.cc:717:10: error: use of undeclared identifier 'forkpty'

  return forkpty(amaster, name, (termios *)termp, (winsize *)winp);

         ^

2 errors generated.

make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1

......

Hi, do you know any nwjs / nw-gyp / node-pty versions trio that was possible to build ?

Thank you for your response

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

No branches or pull requests

3 participants