Closed davidm-public closed 4 years ago
Pushed and published fixes for that (I think). Had a lot of pending changes also, so it is possible different errors have appeared.
Got it to build for mac; but it segfaults... I don't have any way to debug that at this time. I tried to setup a mac VM but apple makes that really hard, maybe I'll look into that again later.
still failing:
$ npm i gun-db
> sack.vfs@0.1.99322 install /Users/davem/Auctionologies/repository/AuctionSoftware/au-2016/experiments/reactive/gun/gun-db-1/node_modules/sack.vfs
> node-gyp configure build
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
CXX(target) Release/obj.target/sack_vfs/src/vfs_module.o
CXX(target) Release/obj.target/sack_vfs/src/sack/sack.o
In file included from ../src/sack/sack.cc:21184:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:310:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/limits:112:
/Library/Developer/CommandLineTools/usr/include/c++/v1/__undef_min_max:17:2: warning: : macro min is incompatible with C++. #undefing min [-W#warnings]
#warning: macro min is incompatible with C++. #undefing min
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__undef_min_max:29:2: warning: : macro max is incompatible with C++. #undefing max [-W#warnings]
#warning: macro max is incompatible with C++. #undefing max
^
../src/sack/sack.cc:35022:15: warning: unknown pragma ignored [-Wunknown-pragmas]
# pragma GCC push_options
^
../src/sack/sack.cc:35023:15: warning: unknown pragma ignored [-Wunknown-pragmas]
# pragma GCC optimize ("O0")
^
../src/sack/sack.cc:35090:15: warning: unknown pragma ignored [-Wunknown-pragmas]
# pragma GCC pop_options
^
../src/sack/sack.cc:49844:4: error: use of undeclared identifier 'GetPrivateProfileString'; did you mean
'sack::sql::options::Interface::option_interface_tag::_GetPrivateProfileString'?
GetPrivateProfileString( WIDE("COM PORTS"), szPort, WIDE(""), szInit, sizeof( szInit ), WIDE("comports.ini") );
^~~~~~~~~~~~~~~~~~~~~~~
sack::sql::options::Interface::option_interface_tag::_GetPrivateProfileString
../src/sack/sack.cc:10086:2: note: 'sack::sql::options::Interface::option_interface_tag::_GetPrivateProfileString' declared here
METHOD_PTR( size_t, GetPrivateProfileString )( CTEXTSTR pSection, CTEXTSTR pOptname, CTEXTSTR pDefaultbuf, TEXTSTR pBuffer, size_t nBuffer, CTEXTSTR pININame );
^
../src/sack/sack.cc:8287:44: note: expanded from macro 'METHOD_PTR'
#define METHOD_PTR(type,name) type (CPROC *_##name)
^
<scratch space>:93:1: note: expanded from here
_GetPrivateProfileString
^
../src/sack/sack.cc:49844:4: error: invalid use of non-static data member '_GetPrivateProfileString'
GetPrivateProfileString( WIDE("COM PORTS"), szPort, WIDE(""), szInit, sizeof( szInit ), WIDE("comports.ini") );
^~~~~~~~~~~~~~~~~~~~~~~
../src/sack/sack.cc:49846:6: error: use of undeclared identifier 'WritePrivateProfileString'; did you mean
'sack::sql::options::Interface::option_interface_tag::_WritePrivateProfileString'?
WritePrivateProfileString( WIDE("COM PORTS"), szPort, WIDE("57600,N,8,1,cARRIER,RTS,rTSFLOW"), WIDE("comports.ini") );
^~~~~~~~~~~~~~~~~~~~~~~~~
sack::sql::options::Interface::option_interface_tag::_WritePrivateProfileString
../src/sack/sack.cc:10091:2: note: 'sack::sql::options::Interface::option_interface_tag::_WritePrivateProfileString' declared here
METHOD_PTR( LOGICAL, WritePrivateProfileString )( CTEXTSTR pSection, CTEXTSTR pName, CTEXTSTR pValue, CTEXTSTR pINIFile );
^
../src/sack/sack.cc:8287:44: note: expanded from macro 'METHOD_PTR'
#define METHOD_PTR(type,name) type (CPROC *_##name)
^
<scratch space>:97:1: note: expanded from here
_WritePrivateProfileString
^
../src/sack/sack.cc:49846:6: error: invalid use of non-static data member '_WritePrivateProfileString'
WritePrivateProfileString( WIDE("COM PORTS"), szPort, WIDE("57600,N,8,1,cARRIER,RTS,rTSFLOW"), WIDE("comports.ini") );
^~~~~~~~~~~~~~~~~~~~~~~~~
../src/sack/sack.cc:57814:4: error: unknown type name 'PDATLIST'; did you mean 'PDATALIST'?
PDATLIST kevents;
^~~~~~~~
PDATALIST
../src/sack/sack.cc:1514:27: note: 'PDATALIST' declared here
typedef struct DataBlock *PDATALIST;
^
5 warnings and 5 errors generated.
make: *** [Release/obj.target/sack_vfs/src/sack/sack.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/davem/.nvm/versions/node/v8.9.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.3.0
gyp ERR! command "/Users/davem/.nvm/versions/node/v8.9.1/bin/node" "/Users/davem/.nvm/versions/node/v8.9.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /Users/davem/Auctionologies/repository/AuctionSoftware/au-2016/experiments/reactive/gun/gun-db-1/node_modules/sack.vfs
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN gun-db-1@1.0.0 No description
npm WARN gun-db-1@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sack.vfs@0.1.99322 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sack.vfs@0.1.99322 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/davem/.npm/_logs/2017-12-23T15_46_47_824Z-debug.log
Well I didn't publish a new version to npm because it segfaults even if it does compile correctly. Sorry; again I don't have a mac to debug it.
Got a mac; was able to debug the segfault, and sqlite database basically works. I want to test gun-ws which uses the same sack.vfs module on the backend and will probably publish an update later today. (it's now 6:36am for me PST)
Okay; if you're still playin with this. Fixed sack.vfs so this should now work on mac. (also gun-ws which uses same backend) (published to npm) so npm update should work.
Seems to install, some warnings but no errors, haven't tried it out yet:
$ npm i gun-db
> sack.vfs@0.1.99324 install /Users/davem/Auctionologies/repository/AuctionSoftware/au-2016/experiments/reactive/gun/gun-exp-1/node_modules/sack.vfs
> node-gyp configure build
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
CXX(target) Release/obj.target/sack_vfs/src/vfs_module.o
CXX(target) Release/obj.target/sack_vfs/src/sack/sack.o
In file included from ../src/sack/sack.cc:16862:
In file included from /System/Library/Frameworks/Security.framework/Headers/Security.h:32:
In file included from /System/Library/Frameworks/Security.framework/Headers/SecKey.h:38:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:24:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:310:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/limits:112:
/Library/Developer/CommandLineTools/usr/include/c++/v1/__undef_min_max:17:2: warning: : macro min is
incompatible with C++. #undefing min [-W#warnings]
#warning: macro min is incompatible with C++. #undefing min
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__undef_min_max:29:2: warning: : macro max is
incompatible with C++. #undefing max [-W#warnings]
#warning: macro max is incompatible with C++. #undefing max
^
../src/sack/sack.cc:35170:15: warning: unknown pragma ignored [-Wunknown-pragmas]
# pragma GCC push_options
^
../src/sack/sack.cc:35171:15: warning: unknown pragma ignored [-Wunknown-pragmas]
# pragma GCC optimize ("O0")
^
../src/sack/sack.cc:35238:15: warning: unknown pragma ignored [-Wunknown-pragmas]
# pragma GCC pop_options
^
5 warnings generated.
CC(target) Release/obj.target/sack_vfs/src/sack/sqlite3.o
CXX(target) Release/obj.target/sack_vfs/src/com_interface.o
CXX(target) Release/obj.target/sack_vfs/src/sql_module.o
CXX(target) Release/obj.target/sack_vfs/src/thread_module.o
CXX(target) Release/obj.target/sack_vfs/src/jsonParse.o
CXX(target) Release/obj.target/sack_vfs/src/tls_interface.o
CXX(target) Release/obj.target/sack_vfs/src/srg_module.o
CXX(target) Release/obj.target/sack_vfs/src/websocket_module.o
CXX(target) Release/obj.target/sack_vfs/src/network_module.o
SOLINK_MODULE(target) Release/sack_vfs.node
npm WARN gun-exp-1@1.0.0 No description
npm WARN gun-exp-1@1.0.0 No repository field.
+ gun-db@1.0.568
added 22 packages in 50.336s
5 by 5.