Git Product home page Git Product logo

Comments (14)

ozra avatar ozra commented on July 23, 2024 1

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.

grrrwaaa avatar grrrwaaa commented on July 23, 2024

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.

grrrwaaa avatar grrrwaaa commented on July 23, 2024

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.

ImOnALampshade avatar ImOnALampshade commented on July 23, 2024

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.

grrrwaaa avatar grrrwaaa commented on July 23, 2024

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.

ImOnALampshade avatar ImOnALampshade commented on July 23, 2024

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.

grrrwaaa avatar grrrwaaa commented on July 23, 2024

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.

ozra avatar ozra commented on July 23, 2024

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.

ozra avatar ozra commented on July 23, 2024

Oh, and it should already work for win, btw. If you install make.

from mmap-io.

ImOnALampshade avatar ImOnALampshade commented on July 23, 2024

You shouldn't be required make on windows, node gyp should handle everything.

from mmap-io.

ozra avatar ozra commented on July 23, 2024

Yes, it could definitely be worked out, it's up for grabs!

from mmap-io.

ozra avatar ozra commented on July 23, 2024

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.

jhicks-camgian avatar jhicks-camgian commented on July 23, 2024

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

  1. Does explicit blocking sync to disk
  2. Does explicit blocking sync without offset/length arguments
  3. Does explicit sync to disk without blocking/invalidate flags
  4. Does explicit sync with no additional arguments
    Failed to remove test-file ./tmp-mmap-file

All done

from mmap-io.

ozra avatar ozra commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.