-
Notifications
You must be signed in to change notification settings - Fork 48
Installation #21
Comments
Options:
Option 1 Is the most traditional route and would require work in both Project-OSRM build scripts and node-OSRM builds scripts. Option 2 Is something I've tried and gave up on because of challenges with gyp and relative paths (I could return to this but would prefer not). Option 3 Is a great solution for non-developers but not a full solution. |
For deployment and testing we will need to add node-osrm to a package.json file so I'm not sure option 2 will work in that case. Options 1 sounds like the most promising. What all is involved with that work? |
The cmake script doesn't have the pkg-config functionality built-in. |
Project-OSRM/osrm-backend@c3396fa partially implements this. Files are installed, and pkg-config follows shortly. |
Now that the command line programs and |
This is now implemented with Project-OSRM/osrm-backend@991c9f2 and 118058e Works reasonably well: $ make clean; make
rm -f lib/_osrm.node
rm -f *.osrm*
./node_modules/.bin/node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.1
gyp info using node@0.10.22 | darwin | x64
gyp info spawn python
gyp info spawn args [ '/Users/dennisluxen/Coding/node-osrm/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 '/Users/dennisluxen/Coding/node-osrm/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/dennisluxen/Coding/node-osrm/common.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/dennisluxen/Coding/node-osrm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/dennisluxen/.node-gyp/0.10.22/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/dennisluxen/.node-gyp/0.10.22',
gyp info spawn args '-Dmodule_root_dir=/Users/dennisluxen/Coding/node-osrm',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
./node_modules/.bin/node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.1
gyp info using node@0.10.22 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/osrm/src/node_osrm.o
SOLINK_MODULE(target) Release/osrm.node
ld: warning: option -s is obsolete and being ignored
ld: warning: option -s is obsolete and being ignored
SOLINK_MODULE(target) Release/osrm.node: Finished
COPY ../lib/osrm.node
TOUCH Release/obj.target/action_after_build.stamp
gyp info ok and $ make test
npm test
> osrm@0.1.0 test /Users/dennisluxen/Coding/node-osrm
> mocha -R spec
osrm
✓ should throw if new keyword is not used
✓ should throw if invalid args are passed
- should throw if ini file is blank
- should throw if ini file does not exist
- should throw if files referenced by ini do not exist
- should throw if ini references corrupt files
✓ should be initialized
✓ should throw if insufficient coordinates given
◦ should return results for berlin using sync api: . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
✓ should return results for berlin using sync api (603ms)
◦ should return results for berlin using sync api and shared memory: . 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
✓ should return results for berlin using sync api and shared memory (600ms)
6 passing (1s)
4 pending |
In master I'm looking at the README and it says to install node-osrm do:
however, this does not build the binary. If I run |
Ah, I see this uses node-pre-gyp now, so I think maybe all that's missing is:
@springmeyer does this sound right? |
@ianshward - yes, exactly Okay, this is basically done - thanks everyone for the work to get there.
|
@ianshward - install/developer section now fixed up in readme, thanks for catching that: /~https://github.com/DennisOSRM/node-osrm/blob/master/README.md#installing |
Installation is currently non-standard and currently depends on a clone of this repo being next to a built Project-OSRM directory. What would need to happen in order to it possible to install by simply running
npm install node-osrm
?The text was updated successfully, but these errors were encountered: