Comments (14)
I've removed dependency on GNUMake, but the build commands still rely on a bunch of "common POSIX apps", so might require a basic setup on windows anyway. Try and see. I'm closing, so open new issue if required.
from mmap-io.
Not sure if this is the same issue, but I get a build error of error C3861: 'uv_get_osfhandle': identifier not found
from mmap-io.
Whoops, found that my issue is the same as #11 -- need to update my node.js. Would be good to document the version required; currently the package.json says "node": ">=0.10.0"
After installing Node 8.9.4 I am seeing the same issue as the OP: 'make' is not recognized as an internal or external command
. Seems to be triggered by the postinstall script in package.json. What is make ls
for?
from mmap-io.
I ended up making my own package after not getting any response on this issue, you can view it on my profile (node-filemap).
from mmap-io.
Well I need both unix and windows support, so I might take a shot at forking mmap-io and doing a PR if I can get it to play nice.
from mmap-io.
Fair enough - if not, I'm supporting both windows and unix with my package - I use mmap-io on unix and node-filemap on windows, then try { requrie(...) }
from mmap-io.
Would have liked to fork mmap-io and add windows support, but the API seems too closely tied to *nix. So I've thrown together a very minimal module that fits my requirements here instead.
from mmap-io.
Feel free to PR - or fork for own sake. Make is the traditional build tool. I'm rather preoccupied atm, but I try to be swift to merge PRs with fixes. Including the tiniest like version reqs in spec. Cheers!
from mmap-io.
Oh, and it should already work for win, btw. If you install make.
from mmap-io.
You shouldn't be required make on windows, node gyp should handle everything.
from mmap-io.
Yes, it could definitely be worked out, it's up for grabs!
from mmap-io.
If anyone has the minutes to take this on, I suggest this approach (which I would accept):
- Look in the Makefile for the few things needed — not many are essential for function
- The LS-source files could be eliminated, and the built js be used as originals instead from now on, this removes one build step, and the dependency on an esoteric language in favour of plain JS.
I'm close to a deadline on a massive project, so I have no coding-time away from that atm., but these changes should be fairly easy for anyone feeling inclined.
from mmap-io.
On Windows I use chocolatey to install nodejs-lts v8.11.1, miniconda 4.3.21 (Python-2), vcbuildtools 2015.4, and cyg-get 1.2.1
Using cyg-get I install a typical set of tools for C programming: make, gcc, autoconf, automake, bison, flex, etc.
Under the bash shell I export a PYTHON variable to reference the Miniconda's python.exe:
export PYTHON=$(cygpath -m /cygdrive/c/ProgramData/Miniconda2/python)
$ git clone https://github.com/ozra/mmap-io.git
$ cd mmap-io
$ npm install --save
There are a few gripes in the build, I think about pointer vs integer word sizes.
$ npm test
The test seems affirmative (with one small cosmetic problem at the end) but am really just starting to put time into evaluating it more closely, including some additional tests for sparse file and vm mapping support.
[email protected] test C:\mmap-io
node ./test.js
mmap in test is { PROT_READ: 1,
PROT_WRITE: 2,
PROT_EXEC: 4,
PROT_NONE: 0,
MAP_SHARED: 1,
MAP_PRIVATE: 2,
MADV_NORMAL: 0,
MADV_RANDOM: 1,
MADV_SEQUENTIAL: 2,
MADV_WILLNEED: 3,
MADV_DONTNEED: 4,
PAGESIZE: 4096,
map: [Function],
advise: [Function],
incore: [Function],
sync_lib_private__: [Function],
sync: [Function] }
mmap.PAGESIZE = 4096 tries to overwrite it with 47
now mmap.PAGESIZE should be the same: 4096 silently kept
file size 5074
buflen 1 = 5074
Give advise with 2 args
Give advise with 4 args
Buffer contents, read byte for byte backwards and see that nothing explodes:
read out of bounds test
buflen test 5-arg map call = 5074
buflen test 4-arg map call = 5074
Pass faulty arg - caught deliberate exception: mmap: size (arg[0]) must be an integer
Pass wrong page-size as offset - caught deliberate exception: mmap failed, 40
Pass faulty arg to advise() - caught deliberate exception: advice(): (arg[1]) must be an integer
Now for some write/read tests
Creates file
open write buffer
fd-write = 8
open read bufer
verify write and read
Write/read verification seemed to work out
sync() tests x 4
- Does explicit blocking sync to disk
- Does explicit blocking sync without offset/length arguments
- Does explicit sync to disk without blocking/invalidate flags
- Does explicit sync with no additional arguments
Failed to remove test-file ./tmp-mmap-file
All done
from mmap-io.
I'll remove the dependency on GNU Make for the next update, I'll see what else I manage to squeeze into time.
from mmap-io.
Related Issues (19)
- nan dependency version HOT 7
- Module is not Context-Aware. Creates module registration error with node js worker threads HOT 5
- Compiler warnings b/c V8 changes. Consider "node_addon_api" over "NAN"
- After upgrade to 1.1.0, the module cannot be imported HOT 7
- Readme reference Make HOT 1
- Invalid arg type The "path" argument must be one of type string, Buffer or URL. Received type number. HOT 1
- Can this do memory mapped not to file (e.g. not persisted/stored to/from disk)? HOT 2
- Current NAN fails for node 12.6.0, time for beast coding
- memory map large files on windows HOT 4
- Ability to get SharedArrayBuffer instead of ArrayBuffer
- Ability to explicitly unmap
- Release new version from latest master HOT 2
- TypeScript api sample?
- Bus error if 'offset' of mmap is greater than 2gb. HOT 1
- Build folder is empty and compatibility with phone apps
- Add minimal node example to Readme
- windows: incorrect split between high and low for position and offset HOT 3
- windows: always creating paging mapping, not file mapping HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmap-io.