tatsushid / docker-tinycore-node

Dockerfiles for building Node.js on Tiny Core Linux Docker image
MIT License
17 stars 1 forks source link

make causes Segmentation fault #1

Open day0ops opened 8 years ago

day0ops commented 8 years ago

Hey @tatsushid

Your TinyCore base image looks very promising. Im trying to build node-oracledb on top of this and running into a rather strange issue. make fails without any particular reason.

gyp info it worked if it ends with ok
gyp info using node-gyp@3.3.1
gyp info using node@6.2.2 | linux | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/opt/ama/node_modules/oracledb/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/6.2.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/6.2.2',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/opt/ama/node_modules/oracledb',
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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: null
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.4.12-boot2docker
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 /opt/ama/node_modules/oracledb
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm info lifecycle oracledb@1.10.0~install: Failed to exec install script
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.13
npm ERR! Linux 4.4.12-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "oracledb"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE

And running make on command line throws Segmentation fault,

tc@95cad6514a48:~$ make
Segmentation fault

Have you run into a similar issue ?

tatsushid commented 8 years ago

Hello,

I have never had such an issue. It seems that the make binary or loaded libraries by it have something problem.

Could you try the latest tatsushid/tinycore-node:6.3 image? I could build the oracledb npm with it in the following way.

docker run -it --rm tatsushid/tinycore-node:6.3 /bin/sh # run it on host machine
su tc
cd /tmp/
tce-load -wic python gcc make unzip linux-4.2.1_api_headers glibc_base-dev glibc_add_lib
unzip instantclient-basiclite-linux.x64-12.1.0.2.0.zip # copied from host machine by docker cp
unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip # copied from host machine by docker cp
export OCI_LIB_DIR=/tmp/instantclient_12_1
export OCI_INC_DIR=/tmp/instantclient_12_1/sdk/include
cd instantclient_12_1/
ln -s libclntsh.so.12.1 libclntsh.so
cd ..
npm install oracledb