baudehlo / node-fs-ext

Extras missing from node's fs module
MIT License
101 stars 45 forks source link

OSX build issues #60

Closed FranciscoG closed 7 years ago

FranciscoG commented 8 years ago

Originally posted this issue to another library that uses fs-ext as a dependency but thought it would make sense to post it here since most of the errors seem centered around fs-ext

they are using fs-ext v0.5.0


I'm also getting installation errors:

Node v5.5.0 npm v3.3.12 OSX 10.11.2

+> npm install -g ttembed-js
/Users/me/.npm-packages/bin/ttembed-js -> /Users/me/.npm-packages/lib/node_modules/ttembed-js/bin/ttembed-js

> fs-ext@0.3.2 install /Users/me/.npm-packages/lib/node_modules/ttembed-js/node_modules/fs-ext
> node-gyp configure build

  CXX(target) Release/obj.target/fs-ext/fs-ext.o
../fs-ext.cc:91:23: error: unknown type name 'uv_work_t'
static void EIO_After(uv_work_t *req) {
                      ^
../fs-ext.cc:92:15: error: calling a protected constructor of class 'v8::HandleScope'
  HandleScope scope;
              ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:889:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../fs-ext.cc:106:15: warning: 'ErrnoException' is deprecated: Use ErrnoException(isolate, ...) [-Wdeprecated-declarations]
    argv[0] = ErrnoException(store_data->error);
              ^
/Users/me/.node-gyp/5.5.0/include/node/node.h:100:45: note: 'ErrnoException' has been explicitly marked deprecated here
                inline v8::Local<v8::Value> ErrnoException(
                                            ^
../fs-ext.cc:109:33: error: no matching function for call to 'Null'
    argv[0] = Local<Value>::New(Null());
                                ^~~~
/Users/me/.node-gyp/5.5.0/include/node/v8.h:8120:18: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Primitive> Null(Isolate* isolate) {
                 ^
../fs-ext.cc:120:49: error: too few arguments to function call, expected 2, have 1
        argv[1] = Number::New(store_data->offset);
                  ~~~~~~~~~~~                   ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2483:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../fs-ext.cc:125:38: error: too few arguments to function call, single argument 'isolate' was not specified
        statvfs_result = Object::New();
                         ~~~~~~~~~~~ ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2930:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
../fs-ext.cc:127:93: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_namemax_symbol, Integer::New(store_data->statvfs_buf.f_namemax));
                                              ~~~~~~~~~~~~                                  ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2496:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
../fs-ext.cc:128:89: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_bsize_symbol, Integer::New(store_data->statvfs_buf.f_bsize));
                                            ~~~~~~~~~~~~                                ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2496:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
../fs-ext.cc:129:91: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_frsize_symbol, Integer::New(store_data->statvfs_buf.f_frsize));
                                             ~~~~~~~~~~~~                                 ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2496:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
../fs-ext.cc:130:90: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_blocks_symbol, Number::New(store_data->statvfs_buf.f_blocks));
                                             ~~~~~~~~~~~                                 ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2483:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../fs-ext.cc:131:90: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_bavail_symbol, Number::New(store_data->statvfs_buf.f_bavail));
                                             ~~~~~~~~~~~                                 ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2483:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../fs-ext.cc:132:88: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_bfree_symbol, Number::New(store_data->statvfs_buf.f_bfree));
                                            ~~~~~~~~~~~                                ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2483:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../fs-ext.cc:133:88: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_files_symbol, Number::New(store_data->statvfs_buf.f_files));
                                            ~~~~~~~~~~~                                ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2483:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../fs-ext.cc:134:90: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_favail_symbol, Number::New(store_data->statvfs_buf.f_favail));
                                             ~~~~~~~~~~~                                 ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2483:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../fs-ext.cc:135:88: error: too few arguments to function call, expected 2, have 1
        statvfs_result->Set(f_ffree_symbol, Number::New(store_data->statvfs_buf.f_ffree));
                                            ~~~~~~~~~~~                                ^
/Users/me/.node-gyp/5.5.0/include/node/v8.h:2483:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../fs-ext.cc:147:22: error: member reference type 'Persistent<v8::Function>' is not a pointer; did you mean to use '.'?
  (*(store_data->cb))->Call(v8::Context::GetCurrent()->Global(), argc, argv);
  ~~~~~~~~~~~~~~~~~~~^~
                     .
../fs-ext.cc:147:24: error: no member named 'Call' in 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >'
  (*(store_data->cb))->Call(v8::Context::GetCurrent()->Global(), argc, argv);
  ~~~~~~~~~~~~~~~~~~~  ^
../fs-ext.cc:147:42: error: no member named 'GetCurrent' in 'v8::Context'
  (*(store_data->cb))->Call(v8::Context::GetCurrent()->Global(), argc, argv);
                            ~~~~~~~~~~~~~^
../fs-ext.cc:150:5: warning: 'FatalException' is deprecated: Use FatalException(isolate, ...) [-Wdeprecated-declarations]
    FatalException(try_catch);
    ^
/Users/me/.node-gyp/5.5.0/include/node/node.h:283:29: note: 'FatalException' has been explicitly marked deprecated here
                inline void FatalException(const v8::TryCatch& try_catch) {
                            ^
../fs-ext.cc:154:3: error: use of undeclared identifier 'cb_destroy'
  cb_destroy(store_data->cb);
  ^
../fs-ext.cc:159:25: error: unknown type name 'uv_work_t'
static void EIO_StatVFS(uv_work_t *req) {
                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make: *** [Release/obj.target/fs-ext/fs-ext.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /Users/me/.npm-packages/lib/node_modules/ttembed-js/node_modules/fs-ext
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:fs-ext@0.3.2 fs-ext@0.3.2 install: `node-gyp configure build`
npm WARN install:fs-ext@0.3.2 Exit status 1
/Users/me/.npm-packages/lib
└── (empty)

npm ERR! code 1
caseycarroll commented 7 years ago

Experiencing this issue but with the following configuration:

Node: 6.9.1 NPM: 4.0.3 macOS 10.12.1

baudehlo commented 7 years ago

Should be fine now. Closing.