make -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DCMAKE_CXX_FLAGS_RELEASE="-Wno-array-bounds -Wno-uninitialized -Wno-error" ..
make -j($nproc)
export PUBLISH=On
export BUILD_TYPE=Release
export NPM_FLAGS=--target_arch=arm64
bash scripts/ci/node_package.sh
The result of scripts/ci/node_package.sh is:
$ bash scripts/ci/node_package.sh
node version is:
/usr/bin/node
v18.16.1
dumping binary meta...
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.9
node-pre-gyp info using node@18.16.1 | linux | arm64
{
"name": "@project-osrm/osrm",
"configuration": "Release",
"module_name": "node_osrm",
"version": "5.27.1",
"prerelease": "",
"build": "",
"major": 5,
"minor": 27,
"patch": 1,
"runtime": "node",
"node_abi": "node-v108",
"node_abi_napi": "napi",
"napi_version": "8",
"napi_build_version": "",
"node_napi_label": "node-v108",
"target": "",
"platform": "linux",
"target_platform": "linux",
"arch": "arm64",
"target_arch": "arm64",
"libc": "glibc",
"module_main": "lib/index.js",
"toolset": "",
"s3ForcePathStyle": false,
"host": "https://github.com/",
"module_path": "/home/ubuntu/osrm5_27_1/lib/binding",
"module": "/home/ubuntu/osrm5_27_1/lib/binding/node_osrm.node",
"remote_path": "./Project-OSRM/osrm-backend/releases/download/v5.27.1/",
"package_name": "node_osrm-v5.27.1-node-v108-linux-arm64-Release.tar.gz",
"staged_tarball": "build/stage/Project-OSRM/osrm-backend/releases/download/v5.27.1/node_osrm-v5.27.1-node-v108-linux-arm64-Release.tar.gz",
"hosted_path": "https://github.com/Project-OSRM/osrm-backend/releases/download/v5.27.1/",
"hosted_tarball": "https://github.com/Project-OSRM/osrm-backend/releases/download/v5.27.1/node_osrm-v5.27.1-node-v108-linux-arm64-Release.tar.gz"
}
node-pre-gyp info ok
Found ORIGIN flag in readelf output
Dynamic section at offset 0x75f3c0 contains 38 entries:
Tag Type Name/Value
0x0000000000000003 (PLTGOT) 0x76ffe8
0x0000000000000002 (PLTRELSZ) 433320 (bytes)
0x0000000000000017 (JMPREL) 0x321468
0x0000000000000014 (PLTREL) RELA
0x0000000000000007 (RELA) 0x315720
0x0000000000000008 (RELASZ) 48456 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffff9 (RELACOUNT) 385
0x0000000000000006 (SYMTAB) 0x228
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000005 (STRTAB) 0x82aa0
0x000000000000000a (STRSZ) 2483915 (bytes)
0x000000006ffffef5 (GNU_HASH) 0x2e1170
0x0000000000000001 (NEEDED) Shared library: [libboost_filesystem.so.1.74.0]
0x0000000000000001 (NEEDED) Shared library: [libboost_iostreams.so.1.74.0]
0x0000000000000001 (NEEDED) Shared library: [libboost_thread.so.1.74.0]
0x0000000000000001 (NEEDED) Shared library: [libtbb.so.12]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [ld-linux-aarch64.so.1]
0x000000000000000e (SONAME) Library soname: [node_osrm.node]
0x000000000000000c (INIT) 0x38b110
0x000000000000000d (FINI) 0x5fca68
0x000000000000001a (FINI_ARRAY) 0x76bcb0
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x0000000000000019 (INIT_ARRAY) 0x76bcb8
0x000000000000001b (INIT_ARRAYSZ) 360 (bytes)
0x000000000000000f (RPATH) Library rpath: [$ORIGIN]
0x000000000000001e (FLAGS) ORIGIN
0x000000006ffffffb (FLAGS_1) Flags: ORIGIN
0x000000006ffffff0 (VERSYM) 0x30a714
0x000000006ffffffc (VERDEF) 0x315520
0x000000006ffffffd (VERDEFNUM) 1
0x000000006ffffffe (VERNEED) 0x31553c
0x000000006fffffff (VERNEEDNUM) 5
0x0000000000000000 (NULL) 0x0
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.9
node-pre-gyp info using node@18.16.1 | linux | arm64
skipping binding/.gitkeep
packing binding/node_osrm.node
packing binding/osrm-components
packing binding/osrm-contract
packing binding/osrm-customize
packing binding/osrm-datastore
packing binding/osrm-extract
packing binding/osrm-partition
packing binding/osrm-routed
node-pre-gyp info package Binary staged at "build/stage/Project-OSRM/osrm-backend/releases/download/v5.27.1/node_osrm-v5.27.1-node-v108-linux-arm64-Release.tar.gz"
node-pre-gyp info install unpacking [binding/node_osrm.node]
node-pre-gyp info install unpacking [binding/osrm-components]
node-pre-gyp info install unpacking [binding/osrm-contract]
node-pre-gyp info install unpacking [binding/osrm-customize]
node-pre-gyp info install unpacking [binding/osrm-datastore]
node-pre-gyp info install unpacking [binding/osrm-extract]
node-pre-gyp info install unpacking [binding/osrm-partition]
node-pre-gyp info install unpacking [binding/osrm-routed]
node-pre-gyp info validate Running test command: '/usr/bin/node --eval require('/home/ubuntu/osrm5_27_1/lib/binding/node_osrm.node')'
[@project-osrm/osrm] Package appears valid
node-pre-gyp info ok
I noticed that in the official release, some ".so" files are inside the tar/zip file
In the release I'm generating using the script, these ".so" files are not zipping together
I'm trying to generate the release of node packages for Linux arm64, so I did the following steps:
The result of
scripts/ci/node_package.sh
is:I noticed that in the official release, some ".so" files are inside the tar/zip file In the release I'm generating using the script, these ".so" files are not zipping together