nodejs_client icon indicating copy to clipboard operation
nodejs_client copied to clipboard

full build instructions

Open shimondoodkin opened this issue 6 years ago • 1 comments

no need to build pcre-8.39.tar.gz yourself pcre development packages available in all systems. it will prevent problems LD_LIBRARY_PATH because of with incorrectly configured build of pcre library.

# ubuntu contains swig3 that does not support new-nodejs/v8.
# need to install swig4 from git:

if swig -version|grep -vE 'Version [0123]\\.'|grep 'Version'    # if swig 3 exists
then

  apt remove swig swig3.0

  sudo apt-get install build-essential autoconf automake libtool bison git

  sudo apt-get install libpcre3-dev

  git clone https://github.com/swig/swig.git
  cd swig
  ./autogen.sh && ./configure && make
  make install
  cd ..
fi

ldconfig  # update cache
if ldconfig -pv| grep -q libgridstore  # if libgridstore.so exists
then
  git clone https://github.com/griddb/c_client.git
  cd c_client/client/c
  ./bootstrap.sh
  ./configure
  make
  make install
  cd ../../..
fi

mkdir my_modules
cd my_modules
git clone https://github.com/griddb/nodejs_client griddb_node
cd griddb_node

echo '
{
  "name": "griddb_node",
  "version": "0.8.4",
  "description": "Node.JS Client for GridDB (an In-Memory NoSQL Database for highly scalable IoT applications)",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/griddb/nodejs_client.git"
  },
  "dependencies": {
    "nan": "^2.14.0"
  },
  "keywords": [
    "griddb",
    "client",
    "libgridstore",
    "iot"
  ],
  "author": "TOSHIBA Digital Solutions Corporation",
  "license": "Apache-2.0",
  "bugs": {
    "url": "https://github.com/griddb/nodejs_client/issues"
  },
  "homepage": "https://github.com/griddb/nodejs_client#readme",
  "files": [
    "index.js",
    "package.json",
    "lib",
    "sample",
    "README.md"
  ]
}
' > package.json

npm install # install nan from package.json
make
mv griddb_node.js index.js
cd ../..

npm install ./my_modules/griddb_node

use:
var Griddb=require('griddb_node')



maybe it is possible to make it build using a install.sh file that is activated on package install or maybe it is possible to make it work from inside Makefile also this there should be package.json file

shimondoodkin avatar Jul 03 '19 22:07 shimondoodkin

Thank you for your comment and information of full build instructions.

knonomura avatar Jul 05 '19 05:07 knonomura