asfernandes / node-firebird-drivers

Node.js Firebird Drivers
MIT License
53 stars 17 forks source link

Build failed on linux #6

Closed ayshvab closed 5 years ago

ayshvab commented 5 years ago

Hi, @asfernandes.

make: Leaving directory '/usr/src/gdmn-back/node_modules/node-firebird-native-api/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.9.93-linuxkit-aufs
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/src/gdmn-back/node_modules/node-firebird-native-api
gyp ERR! node -v v10.11.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

What I should add in linux case here? : https://github.com/asfernandes/node-firebird-drivers/blob/master/packages/node-firebird-native-api/binding.gyp

asfernandes commented 5 years ago

I develop the project mainly in Linux, so everything should be ok.

What distro/version are you using?

ayshvab commented 5 years ago

Thanks, @asfernandes . I make npm install after building docker container (which based on latest node.js image ) with my app. Maybe you know what is missing?

docker-compose build
db uses an image, skipping
Building back
Step 1/4 : FROM node:10
 ---> 8672b25e842c
Step 2/4 : ENV PROJECT_ROOT /usr/src/gdmn-back
 ---> Using cache
 ---> 14d92df37fcb
Step 3/4 : RUN npm install -g node-gyp
 ---> Using cache
 ---> ee178e29ca3f
Step 4/4 : WORKDIR $PROJECT_ROOT
 ---> Using cache
 ---> 529a8f8dc6ef
Successfully built 529a8f8dc6ef
Successfully tagged d-gdmn_back:latest
docker-compose run back npm install
Creating network "d-gdmn_default" with the default driver
Creating d-gdmn_db_1 ... done

> node-firebird-native-api@0.1.0 install /usr/src/gdmn-back/node_modules/node-firebird-native-api
> node-gyp rebuild
asfernandes commented 5 years ago

Does the node.js image supports node-gyp?

ayshvab commented 5 years ago

I think yes. Container has make, python 2.7 and gcc. As stated here: https://github.com/nodejs/node-gyp#on-unix

asfernandes commented 5 years ago

What is g++ --version?

ayshvab commented 5 years ago

g++ (Debian 4.9.2-10+deb8u1) 4.9.2

ayshvab commented 5 years ago

Hi, @asfernandes Package build successfully in container with linux-alpine. What can be wrong with previous container based on jessie?

asfernandes commented 5 years ago

Maybe too old g++?

ayshvab commented 5 years ago

Thanks. Work on debian stretch.