Error during sqlite3 installation in Termux - node.js

when I install sqlite3 in Termux, after > node-pre-gyp install --fallback-to-build there is a warning about the absence of pre-built binaries, and after there are errors that I don't understand:
$ npm install sqlite3#5.0.2
npm WARN deprecated node-pre-gyp#0.11.0: Please upgrade to #mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the #mapbox scoped package will recieve updates in the future
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
> sqlite3#5.0.2 install /storage/emulated/0/Bots/Test/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-android-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3#5.0.2 and node#14.15.4 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
make: Entering directory '/storage/emulated/0/Bots/Test/node_modules/sqlite3/build' CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
AR(target) Release/obj.target/../node-addon-api/nothing.a
COPY Release/nothing.a
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3340000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3340000/sqlite3.o Release/obj/gen/sqlite-autoconf-3340000/sqlite3.c:744:17: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]
"THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE), ^ , Release/obj/gen/sqlite-autoconf-3340000/sqlite3.c:56:27: note: expanded from macro 'CTIMEOPT_VAL' #define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt) ^
Release/obj/gen/sqlite-autoconf-3340000/sqlite3.c:55:28: note: expanded from macro 'CTIMEOPT_VAL_' #define CTIMEOPT_VAL_(opt) #opt ^ :5:1: note: expanded from here "1"
^ Release/obj/gen/sqlite-autoconf-3340000/sqlite3.c:744:3: note: place parentheses around the string literal to silence warning "THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE), ^ 1 warning generated. AR(target) Release/obj.target/deps/sqlite3.a
COPY Release/sqlite3.a CXX(target) Release/obj.target/node_sqlite3/src/backup.o
../src/backup.cc:179:9: warning: unused variable 'status' [-Wunused-variable] int status = napi_create_async_work(
^ ../src/backup.cc:252:5: warning: unused variable 'status' [-Wunused-variable] BACKUP_BEGIN(Step);
^ ../src/macros.h:182:9: note: expanded from macro 'BACKUP_BEGIN' int status = napi_create_async_work( \
^
../src/backup.cc:319:5: warning: unused variable 'status' [-Wunused-variable] BACKUP_BEGIN(Finish);
^ ../src/macros.h:182:9: note: expanded from macro 'BACKUP_BEGIN'
int status = napi_create_async_work(
^ 3 warnings generated. CXX(target) Release/obj.target/node_sqlite3/src/database.o ../src/database.cc:153:9: warning: unused variable 'status' [-Wunused-variable]
int status = napi_create_async_work(
^ ../src/database.cc:247:9: warning: unused variable 'status' [-Wunused-variable] int status = napi_create_async_work( ^ ../src/database.cc:560:9: warning: unused variable 'status' [-Wunused-variable]
int status = napi_create_async_work(
^
../src/database.cc:669:9: warning: unused variable 'status' [-Wunused-variable] int status = napi_create_async_work(
^ 4 warnings generated. CXX(target) Release/obj.target/node_sqlite3/src/node_sqlite3.o CXX(target) Release/obj.target/node_sqlite3/src/statement.o ../src/statement.cc:122:9: warning: unused variable 'status' [-Wunused-variable] int status = napi_create_async_work(
^ ../src/statement.cc:344:5: warning: unused variable 'status' [-Wunused-variable] STATEMENT_BEGIN(Bind);
^ ../src/macros.h:146:9: note: expanded from macro 'STATEMENT_BEGIN' int status = napi_create_async_work(
^ ../src/statement.cc:396:5: warning: unused variable 'status' [-Wunused-variable] STATEMENT_BEGIN(Get);
^ ../src/macros.h:146:9: note: expanded from macro 'STATEMENT_BEGIN' int status = napi_create_async_work( \
^
../src/statement.cc:468:5: warning: unused variable 'status' [-Wunused-variable]
STATEMENT_BEGIN(Run);
^
../src/macros.h:146:9: note: expanded from macro 'STATEMENT_BEGIN'
int status = napi_create_async_work(
^ ../src/statement.cc:538:5: warning: unused variable 'status' [-Wunused-variable] STATEMENT_BEGIN(All);
^ ../src/macros.h:146:9: note: expanded from macro 'STATEMENT_BEGIN' int status = napi_create_async_work( \
^ ../src/statement.cc:639:5: warning: unused variable 'status' [-Wunused-variable] STATEMENT_BEGIN(Each); ^
../src/macros.h:146:9: note: expanded from macro 'STATEMENT_BEGIN'
int status = napi_create_async_work(
^ ../src/statement.cc:766:5: warning: unused variable 'status' [-Wunused-variable] STATEMENT_BEGIN(Reset);
^ ../src/macros.h:146:9: note: expanded from macro 'STATEMENT_BEGIN' int status = napi_create_async_work( \
^
7 warnings generated.
SOLINK_MODULE(target) Release/obj.target/node_sqlite3.node
COPY Release/node_sqlite3.node
COPY /storage/emulated/0/Bots/Test/node_modules/sqlite3/lib/binding/napi-v3-android-arm/node_sqlite3
TOUCH Release/obj.target/action_after_build.stamp make: Leaving directory '/storage/emulated/0/Bots/Test/node_modules/sqlite3/build'
npm WARN Test#1.0.0 No description
npm WARN Test#1.0.0 No repository field.
+sqlite3#5.0.2 added 43 packages from 109 contributors and audited 146 packages in 451.474s
5 packages are looking for funding run npm fund for details
found
2 high severity vulnerabilities
run npm audit fix to fix them, or npm audit for details
Yes, it is installed after as much as 5 minutes, but when you run code with sqlite3, it throws an error:
$ node test
internal/modules/cjs/loader.js:1122
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: dlopen failed: couldn't map "/storage/emulated/0/Bots/Test/node_modules/sqlite3/lib/binding/napi-v3-android-arm/node_sqlite3.node" segment 1: Permission denied
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/storage/emulated/0/Bots/Test/node_modules/sqlite3/lib/sqlite3-binding.js:4:15)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
test.js:
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('db.sqlite3');
I also created an issue on github, but no one has answered me there yet:
https://github.com/mapbox/node-sqlite3/issues/1491

npm install sqlite3 --build-from-source --sqlite=/data/data/com.termux/files/usr/bin/sqlite3

Related

problem with make command in arch linux (while trying to install RTL8723DE driver)

make -C /lib/modules/5.18.12-arch1-1/build M=/home/rim/Downloads/rtw88_8723de-master
make[1]: Entering directory '/usr/lib/modules/5.18.12-arch1-1/build'
CC [M] /home/rim/Downloads/rtw88_8723de-master/mac80211.o
In file included from ././include/linux/kconfig.h:5,
from <command-line>:
./include/generated/autoconf.h:1332: warning: "CONFIG_RTW88_DEBUGFS" redefined
1332 | #define CONFIG_RTW88_DEBUGFS 1
|
<command-line>: note: this is the location of the previous definition
./include/generated/autoconf.h:6997: warning: "CONFIG_RTW88_DEBUG" redefined
6997 | #define CONFIG_RTW88_DEBUG 1
|
<command-line>: note: this is the location of the previous definition
/home/rim/Downloads/rtw88_8723de-master/mac80211.c:741:35: error: initialization of ‘void (*)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_prep_tx_info *)’ from incompatible pointer type ‘void (*)(struct ieee80211_hw *, struct ieee80211_vif *, u16)’ {aka ‘void (*)(struct ieee80211_hw *, struct ieee80211_vif *, short unsigned int)’} [-Werror=incompatible-pointer-types]
741 | .mgd_prepare_tx = rtw_ops_mgd_prepare_tx,
| ^~~~~~~~~~~~~~~~~~~~~~
/home/rim/Downloads/rtw88_8723de-master/mac80211.c:741:35: note: (near initialization for ‘rtw_ops.mgd_prepare_tx’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /home/rim/Downloads/rtw88_8723de-master/mac80211.o] Error 1
make[1]: *** [Makefile:1838: /home/rim/Downloads/rtw88_8723de-master] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.18.12-arch1-1/build'
make: *** [Makefile:44: all] Error 2
[rim#archie rtw88_8723de-master]$
I have no idea why is this happening, I tried to install RTL8723_DE driver because I want to connect my computer to web.
Driver I used: https://github.com/rtlwifi-linux/rtw88_8723de
Can somebody help, please?

Why is my environment breaking? Yarn install error with sha3

The Issue
I am trying to clone this project: https://github.com/Bounties-Network/Explorer. When I run yarn install everything breaks. I think it might be related to gyp, but I don't really know how to fix this. Where do you look when you get that kind of error?
The Errors I get
2 warnings and 19 errors generated.
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/victorforissier/.nvm/versions/node/v14.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/Users/victorforissier/.nvm/versions/node/v14.5.0/bin/node" "/Users/victorforissier/.nvm/versions/node/v14.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/victorforissier/dev/Explorer/node_modules/sha3
Logs
yarn install v1.22.4
warning ../../package.json: No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "#apollo/react-hooks > #apollo/react-common#3.1.2" has unmet peer dependency "apollo-utilities#^1.3.2".
warning " > #storybook/addon-centered#5.2.0-rc.2" has unmet peer dependency "mithril#*".
warning " > #storybook/addon-centered#5.2.0-rc.2" has unmet peer dependency "preact#*".
warning "#types/reflexbox > #emotion/styled#10.0.17" has incorrect peer dependency "#emotion/core#^10.0.17".
warning "#types/reflexbox > #emotion/styled > #emotion/styled-base#10.0.19" has incorrect peer dependency "#emotion/core#^10.0.17".
warning " > sass-extract-loader#1.1.0" has incorrect peer dependency "webpack#^3 || ^2 || ^2.2.0-rc.0 || ^2.1.0-beta || ^1.12.6".
[4/4] 🔨 Building fresh packages...
[6/12] ⠄ scrypt
[8/12] ⠄ fsevents
[9/12] ⠄ fsevents
[4/12] ⠄ sha3
error /Users/victorforissier/dev/Explorer/node_modules/sha3: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/victorforissier/dev/Explorer/node_modules/sha3
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp#7.1.2
gyp info using node#14.5.0 | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args '/Users/victorforissier/.nvm/versions/node/v14.5.0/lib/node_modules/npm/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/victorforissier/dev/Explorer/node_modules/sha3/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/victorforissier/.nvm/versions/node/v14.5.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/victorforissier/Library/Caches/node-gyp/14.5.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/victorforissier/.nvm/versions/node/v14.5.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/victorforissier/Library/Caches/node-gyp/14.5.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/victorforissier/dev/Explorer/node_modules/sha3',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/sha3/src/addon.o
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
X(Boolean)
^~~~~~~~~~
../../nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
val->To ## TYPE(isolate->GetCurrentContext()) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:2844:37: note: passing argument to parameter 'isolate' here
Local<Boolean> ToBoolean(Isolate* isolate) const;
^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
X(bool, Boolean)
^~~~~~~~~~~~~~~~
../../nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext()); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:2854:30: note: passing argument to parameter 'isolate' here
bool BooleanValue(Isolate* isolate) const;
^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:203:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
return scope.Escape(v8::Function::New( isolate
^~~~~~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:186:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:186:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:190:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'v8::Isolate *'
V8_INLINE Local(Local<S> that)
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:333:22: note: explicit constructor is not a candidate
explicit V8_INLINE Local(T* that) : val_(that) {}
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:4442:22: note: passing argument to parameter 'context' here
Local<Context> context, FunctionCallback callback,
^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:203:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1
return v8::StringObject::New(value).As<v8::StringObject>();
~~~~~~~~~~~~~~~~~~~~~ ^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:5836:23: note: 'New' declared here
static Local<Value> New(Isolate* isolate, Local<String> value);
^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1034:53: error: too few arguments to function call, single argument 'context' was not specified
v8::Local<v8::String> string = from->ToString();
~~~~~~~~~~~~~~ ^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:2806:44: note: 'ToString' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1044:37: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
^~~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3033:26: note: passing argument to parameter 'isolate' here
int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1818:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1824:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(key, value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1830:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(index, value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3666:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3669:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1836:32: error: no matching member function for call to 'Get'
New(persistentHandle)->Get(New(key).ToLocalChecked()));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3713:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3716:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1842:48: error: no matching member function for call to 'Get'
return scope.Escape(New(persistentHandle)->Get(key));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3713:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3716:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1847:48: error: no matching member function for call to 'Get'
return scope.Escape(New(persistentHandle)->Get(index));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3713:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:3716:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2657:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object>'
assert(persistent().IsNearDeath());
~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2657:
../../nan/nan_object_wrap.h:67:18: error: no member named 'MarkIndependent' in 'Nan::Persistent<v8::Object>'
persistent().MarkIndependent();
~~~~~~~~~~~~ ^
../../nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object>'
assert(wrap->handle_.IsNearDeath());
~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2753:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:5254:3: note: 'GetContents' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'
# define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
^
In file included from ../src/addon.cpp:9:
In file included from ../src/KeccakNISTInterface.h:17:
../src/KeccakSponge.h:23:9: warning: 'ALIGN' macro redefined [-Wmacro-redefined]
#define ALIGN __attribute__ ((aligned(32)))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/i386/param.h:83:9: note: previous definition is here
#define ALIGN(p) __DARWIN_ALIGN(p)
^
../src/addon.cpp:36:64: error: too few arguments to function call, single argument 'context' was not specified
hashlen = info[0]->IsUndefined() ? 512 : info[0]->Int32Value();
~~~~~~~~~~~~~~~~~~~ ^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:2865:40: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
../src/addon.cpp:76:36: error: too few arguments to function call, single argument 'context' was not specified
constructor.Reset(t->GetFunction());
~~~~~~~~~~~~~~ ^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:6464:46: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
../src/addon.cpp:77:77: error: too few arguments to function call, single argument 'context' was not specified
target->Set(Nan::New<String>("SHA3Hash").ToLocalChecked(), t->GetFunction());
~~~~~~~~~~~~~~ ^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:6464:46: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
../src/addon.cpp:97:49: error: too few arguments to function call, single argument 'context' was not specified
Local<Object> buffer_obj = info[0]->ToObject();
~~~~~~~~~~~~~~~~~ ^
/Users/victorforissier/Library/Caches/node-gyp/14.5.0/include/node/v8.h:2818:44: note: 'ToObject' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
^
2 warnings and 19 errors generated.
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/victorforissier/.nvm/versions/node/v14.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/Users/victorforissier/.nvm/versions/node/v14.5.0/bin/node" "/Users/victorforissier/.nvm/versions/node/v14.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/victorforissier/dev/Explorer/node_modules/sha3
Update the npm it should resolve the issue.
npm i npm -g

Package xtables was not found in the pkg-config search path

I have downloaded iproute2. When I make ./configure && make && make install I get these errors.
TC schedulers
ATM no
IPT Package xtables was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtables.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtables' found
using iptables
IPSET yes
iptables modules directory: /lib/xtables
libc has setns: yes
SELinux support: no
ELF support: no
libmnl support: no
Berkeley DB: no
docs: latex: no
WARNING: no docs can be built from LaTeX files
sgml2html: no
WARNING: no HTML docs can be built from SGML
make[1]: Entering directory `/home/mininet/iproute2-4.6.0/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mininet/iproute2-4.6.0/lib'
make[1]: Entering directory `/home/mininet/iproute2-4.6.0/ip'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mininet/iproute2-4.6.0/ip'
make[1]: Entering directory `/home/mininet/iproute2-4.6.0/tc'
gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DHAVE_SETNS -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/lib/xtables\" -DYY_NO_INPUT -c -o m_ipt.o m_ipt.c
In file included from m_ipt.c:17:0:
../include/linux/if.h:106:19: error: redeclaration of enumerator ‘IFF_UP’
#define IFF_UP IFF_UP
^
../include/linux/if.h:79:2: note: previous definition of ‘IFF_UP’ was here
IFF_UP = 1<<0, /* sysfs */
^
../include/linux/if.h:107:25: error: redeclaration of enumerator ‘IFF_BROADCAST’
#define IFF_BROADCAST IFF_BROADCAST
^
../include/linux/if.h:80:2: note: previous definition of ‘IFF_BROADCAST’ was here
IFF_BROADCAST = 1<<1, /* __volatile__ */
^
../include/linux/if.h:108:21: error: redeclaration of enumerator ‘IFF_DEBUG’
#define IFF_DEBUG IFF_DEBUG
^
../include/linux/if.h:81:2: note: previous definition of ‘IFF_DEBUG’ was here
IFF_DEBUG = 1<<2, /* sysfs */
^
../include/linux/if.h:109:24: error: redeclaration of enumerator ‘IFF_LOOPBACK’
#define IFF_LOOPBACK IFF_LOOPBACK
^
../include/linux/if.h:82:2: note: previous definition of ‘IFF_LOOPBACK’ was here
IFF_LOOPBACK = 1<<3, /* __volatile__ */
^
../include/linux/if.h:110:27: error: redeclaration of enumerator ‘IFF_POINTOPOINT’
#define IFF_POINTOPOINT IFF_POINTOPOINT
^
../include/linux/if.h:83:2: note: previous definition of ‘IFF_POINTOPOINT’ was here
IFF_POINTOPOINT = 1<<4, /* __volatile__ */
^
../include/linux/if.h:111:26: error: redeclaration of enumerator ‘IFF_NOTRAILERS’
#define IFF_NOTRAILERS IFF_NOTRAILERS
^
../include/linux/if.h:84:2: note: previous definition of ‘IFF_NOTRAILERS’ was here
IFF_NOTRAILERS = 1<<5, /* sysfs */
^
../include/linux/if.h:112:23: error: redeclaration of enumerator ‘IFF_RUNNING’
#define IFF_RUNNING IFF_RUNNING
^
../include/linux/if.h:85:2: note: previous definition of ‘IFF_RUNNING’ was here
IFF_RUNNING = 1<<6, /* __volatile__ */
^
../include/linux/if.h:113:21: error: redeclaration of enumerator ‘IFF_NOARP’
#define IFF_NOARP IFF_NOARP
^
../include/linux/if.h:86:2: note: previous definition of ‘IFF_NOARP’ was here
IFF_NOARP = 1<<7, /* sysfs */
^
../include/linux/if.h:114:23: error: redeclaration of enumerator ‘IFF_PROMISC’
#define IFF_PROMISC IFF_PROMISC
^
../include/linux/if.h:87:2: note: previous definition of ‘IFF_PROMISC’ was here
IFF_PROMISC = 1<<8, /* sysfs */
^
../include/linux/if.h:115:24: error: redeclaration of enumerator ‘IFF_ALLMULTI’
#define IFF_ALLMULTI IFF_ALLMULTI
^
../include/linux/if.h:88:2: note: previous definition of ‘IFF_ALLMULTI’ was here
IFF_ALLMULTI = 1<<9, /* sysfs */
^
../include/linux/if.h:116:22: error: redeclaration of enumerator ‘IFF_MASTER’
#define IFF_MASTER IFF_MASTER
^
../include/linux/if.h:89:2: note: previous definition of ‘IFF_MASTER’ was here
IFF_MASTER = 1<<10, /* __volatile__ */
^
../include/linux/if.h:117:21: error: redeclaration of enumerator ‘IFF_SLAVE’
#define IFF_SLAVE IFF_SLAVE
^
../include/linux/if.h:90:2: note: previous definition of ‘IFF_SLAVE’ was here
IFF_SLAVE = 1<<11, /* __volatile__ */
^
../include/linux/if.h:118:25: error: redeclaration of enumerator ‘IFF_MULTICAST’
#define IFF_MULTICAST IFF_MULTICAST
^
../include/linux/if.h:91:2: note: previous definition of ‘IFF_MULTICAST’ was here
IFF_MULTICAST = 1<<12, /* sysfs */
^
../include/linux/if.h:119:23: error: redeclaration of enumerator ‘IFF_PORTSEL’
#define IFF_PORTSEL IFF_PORTSEL
^
../include/linux/if.h:92:2: note: previous definition of ‘IFF_PORTSEL’ was here
IFF_PORTSEL = 1<<13, /* sysfs */
^
../include/linux/if.h:120:25: error: redeclaration of enumerator ‘IFF_AUTOMEDIA’
#define IFF_AUTOMEDIA IFF_AUTOMEDIA
^
../include/linux/if.h:93:2: note: previous definition of ‘IFF_AUTOMEDIA’ was here
IFF_AUTOMEDIA = 1<<14, /* sysfs */
^
../include/linux/if.h:121:23: error: redeclaration of enumerator ‘IFF_DYNAMIC’
#define IFF_DYNAMIC IFF_DYNAMIC
^
../include/linux/if.h:94:2: note: previous definition of ‘IFF_DYNAMIC’ was here
IFF_DYNAMIC = 1<<15, /* sysfs */
^
In file included from ../include/xtables.h:16:0,
from ../include/iptables.h:5,
from m_ipt.c:18:
/usr/include/net/if.h:111:8: error: redefinition of ‘struct ifmap’
struct ifmap
^
In file included from m_ipt.c:17:0:
../include/linux/if.h:189:8: note: originally defined here
struct ifmap {
^
In file included from ../include/xtables.h:16:0,
from ../include/iptables.h:5,
from m_ipt.c:18:
/usr/include/net/if.h:126:8: error: redefinition of ‘struct ifreq’
struct ifreq
^
In file included from m_ipt.c:17:0:
../include/linux/if.h:226:8: note: originally defined here
struct ifreq {
^
In file included from ../include/xtables.h:16:0,
from ../include/iptables.h:5,
from m_ipt.c:18:
/usr/include/net/if.h:176:8: error: redefinition of ‘struct ifconf’
struct ifconf
^
In file included from m_ipt.c:17:0:
../include/linux/if.h:278:8: note: originally defined here
struct ifconf {
^
In file included from ../include/iptables.h:5:0,
from m_ipt.c:18:
../include/xtables.h:34:29: fatal error: xtables-version.h: No such file or directory
#include <xtables-version.h>
^
compilation terminated.
make[1]: *** [m_ipt.o] Error 1
make[1]: Leaving directory `/home/mininet/iproute2-4.6.0/tc'
make: *** [all] Error 2
please help
UPDATE
I ended up updating the kernel and it work!
TC schedulers
ATM no
IPT Package xtables was not found in the pkg-config search path.
Install libxtables-dev on Ubuntu. I can't find a similar package from Fedora. On Fedora you may need to build from sources.
Ubuntu:
$ apt-cache search xtables
libip4tc-dev - Development files for libiptc
libip4tc0 - netfilter libi4pt library
libip6tc-dev - Development files for libiptc
libip6tc0 - netfilter libipt library
libiptc-dev - Development files for libiptc
libiptc0 - netfilter libipt library
libxtables-dev - netfilter xtables library
libxtables11 - netfilter xtables library
Fedora:
$ dnf search xtables
No matches found.
$ dnf search libxtables
No matches found.
Perhaps you should add the directory containing `xtables.pc'
to the PKG_CONFIG_PATH environment variable
If you install into /usr/local/lib on Ubuntu (or /usr/local/lib64 on Fedora`), then you will see something like this:
$ ls -Al /usr/local/lib/pkgconfig/
total 88
-rw-r--r-- 1 root root 228 Oct 22 08:15 expat.pc
-rw-r--r-- 1 root root 726 Oct 19 23:56 gnutls-dane.pc
-rw-r--r-- 1 root root 911 Oct 19 23:56 gnutls.pc
-rw-r--r-- 1 root root 1199 Oct 22 08:53 guile-2.2.pc
-rw-r--r-- 1 root root 563 Oct 22 08:13 hogweed.pc
-rw-r--r-- 1 root root 315 Oct 16 06:56 libcrypto.pc
-rw-r--r-- 1 root root 1678 Oct 16 06:58 libcurl.pc
-rw-r--r-- 1 root root 860 Oct 16 06:52 libidn.pc
...
When you configure you can you can do something like:
INSTALL_PREFIX="/usr/local"
INSTALL_LIBDIR="$INSTALL_PREFIX/lib"
OPT_PKGCONFIG=("$INSTALL_LIBDIR/pkgconfig")
OPT_CPPFLAGS=("-I$INSTALL_PREFIX/include" "-DNDEBUG")
OPT_CFLAGS=("$SH_MARCH" "$SH_NATIVE")
OPT_CXXFLAGS=("$SH_MARCH" "$SH_NATIVE")
OPT_LDFLAGS=("$SH_MARCH" "-Wl,-rpath,$INSTALL_LIBDIR" "-L$INSTALL_LIBDIR")
OPT_LIBS=("-ldl" "-lpthread")
...
PKG_CONFIG_PATH="${OPT_PKGCONFIG[*]}" \
CPPFLAGS="${OPT_CPPFLAGS[*]}" \
CFLAGS="${OPT_CFLAGS[*]}" CXXFLAGS="${OPT_CXXFLAGS[*]}" \
LDFLAGS="${OPT_LDFLAGS[*]}" LIBS="${OPT_LIBS[*]}" \
./configure --enable-shared --prefix="$INSTALL_PREFIX" --libdir="$INSTALL_LIBDIR"
<other config options>

node.js - unable to install tcpsocket-serialport

I'm currently trying to set up my ESP8266 with Johnny Five wirelessly via node.js. To do this I need to get a virtual Serial Port via TCP. I found a very promising node-module but i just can't get it to install. I've been browsing the web for quite some time now. I installed the windows 8.1 SDK including c++ compiler, the windows build tools, node-gyp (which was basically the reason for all the other stuff) but now I'm completely stuck as I don't know what to make of the errors.
This is where I got the pacakage from
https://github.com/sizuhiko/tcpsocket-serialport
These are the errors (sorry for the mess)
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
serialport.cpp
serialport_win.cpp
enumser.cpp
win_delay_load_hook.cc
..\src\win\enumser.cpp(443): warning C4996: 'GetVersionExA': was declared deprecated [C:\Users\chris\OneDrive\P
rogrammieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\
serialport.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433): note: see declaration of 'GetVersionExA
'
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)': function template has alread
y been defined (compiling source file ..\src\serialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduin
o\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(256): note: see declaration of '_NanEnsureLocal' (compiling source file ..\src\serialport
.cpp)
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\src\win\stdstring.h(2123): warning C4311: 'reinterpret_cast': pointer truncation from 'const
void *' to 'unsigned long' (compiling source file ..\src\win\enumser.cpp) [C:\Users\chris\OneDrive\Programmier
en\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport
.vcxproj]
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\serialport\src\win\stdstring.h(2117): note: while compiling class template member function 'bool CS
tdStr<wchar_t>::TryLoad(const void *)' (compiling source file ..\src\win\enumser.cpp)
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\serialport\src\win\stdstring.h(2171): note: see reference to function template instantiation 'bool
CStdStr<wchar_t>::TryLoad(const void *)' being compiled (compiling source file ..\src\win\enumser.cpp)
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\serialport\src\win\stdstring.h(3982): note: see reference to class template instantiation 'CStdStr<
wchar_t>' being compiled (compiling source file ..\src\win\enumser.cpp)
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\src\win\stdstring.h(2123): warning C4302: 'reinterpret_cast': truncation from 'const void *'
to 'unsigned long' (compiling source file ..\src\win\enumser.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\
arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj
]
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\src\win\stdstring.h(2126): warning C4311: 'reinterpret_cast': pointer truncation from 'const
void *' to 'unsigned long' (compiling source file ..\src\win\enumser.cpp) [C:\Users\chris\OneDrive\Programmier
en\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport
.vcxproj]
c:\users\chris\onedrive\programmieren\code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\src\win\stdstring.h(2126): warning C4302: 'reinterpret_cast': truncation from 'const void *'
to 'unsigned long' (compiling source file ..\src\win\enumser.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\
arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj
]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (compiling sour
ce file ..\src\serialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialpor
t\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C2039: 'FreeCallback': is not a member of 'node' (compiling source file ..\src\se
rialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\jo
hnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_object_wrap.h(8): note: see declaration of 'node' (compiling
source file ..\src\serialport.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C2061: syntax error: identifier 'FreeCallback' (compiling source file ..\src\seri
alport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\john
ny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(665): error C2065: 'callback': undeclared identifier (compiling source file ..\src\serialport
.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-fiv
e\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(665): error C2065: 'hint': undeclared identifier (compiling source file ..\src\serialport.cpp
) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\no
de_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(672): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argumen
t types (compiling source file ..\src\serialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\te
st2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(46): note: could be 'v8::MaybeLocal<v8::Object> nod
e::Buffer::New(v8::Isolate *,char *,std::size_t)' (compiling source file ..\src\serialport.cpp)
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(34): note: or 'v8::MaybeLocal<v8::Object> nod
e::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)' (compiling source file ..\src\serialport.
cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(672): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32
_t)' (compiling source file ..\src\serialport.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(676): error C2440: 'return': cannot convert from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v
8::Object>' (compiling source file ..\src\serialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\j
f\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(676): note: No constructor could take the source type, or constructor overload resolution
was ambiguous (compiling source file ..\src\serialport.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(683): error C2039: 'Use': is not a member of 'node::Buffer' (compiling source file ..\src\ser
ialport.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\joh
nny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(11): note: see declaration of 'node::Buffer' (compi
ling source file ..\src\serialport.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(683): error C3861: 'Use': identifier not found (compiling source file ..\src\serialport.cpp)
[C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node
_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)': function template has alread
y been defined (compiling source file ..\src\serialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\ar
duino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(256): note: see declaration of '_NanEnsureLocal' (compiling source file ..\src\serialport
_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (compiling sour
ce file ..\src\serialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-seria
lport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C2039: 'FreeCallback': is not a member of 'node' (compiling source file ..\src\se
rialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_module
s\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_object_wrap.h(8): note: see declaration of 'node' (compiling
source file ..\src\serialport_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(661): error C2061: syntax error: identifier 'FreeCallback' (compiling source file ..\src\seri
alport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\
johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(665): error C2065: 'callback': undeclared identifier (compiling source file ..\src\serialport
_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny
-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(665): error C2065: 'hint': undeclared identifier (compiling source file ..\src\serialport_win
.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-fiv
e\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(672): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argumen
t types (compiling source file ..\src\serialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\j
f\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(46): note: could be 'v8::MaybeLocal<v8::Object> nod
e::Buffer::New(v8::Isolate *,char *,std::size_t)' (compiling source file ..\src\serialport_win.cpp)
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(34): note: or 'v8::MaybeLocal<v8::Object> nod
e::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)' (compiling source file ..\src\serialport_
win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(672): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32
_t)' (compiling source file ..\src\serialport_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(676): error C2440: 'return': cannot convert from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v
8::Object>' (compiling source file ..\src\serialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\ardui
no\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\nod
e_modules\nan\nan.h(676): note: No constructor could take the source type, or constructor overload resolution
was ambiguous (compiling source file ..\src\serialport_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(683): error C2039: 'Use': is not a member of 'node::Buffer' (compiling source file ..\src\ser
ialport_win.cpp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules
\johnny-five\node_modules\serialport\build\serialport.vcxproj]
C:\Users\chris\.node-gyp\4.6.1\include\node\node_buffer.h(11): note: see declaration of 'node::Buffer' (compi
ling source file ..\src\serialport_win.cpp)
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\nan\nan.h(683): error C3861: 'Use': identifier not found (compiling source file ..\src\serialport_win.c
pp) [C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\
node_modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(152): warning C4311: 'type cast': pointer truncation from 'HANDLE' to 'int' [C:\Users
\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\
serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(152): warning C4302: 'type cast': truncation from 'HANDLE' to 'int' [C:\Users\chris\O
neDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialpo
rt\build\serialport.vcxproj]
..\src\serialport_win.cpp(177): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(179): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(183): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(185): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(189): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(191): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(196): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(208): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(308): warning C4311: 'type cast': pointer truncation from 'HANDLE' to 'int' [C:\Users
\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\
serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(308): warning C4302: 'type cast': truncation from 'HANDLE' to 'int' [C:\Users\chris\O
neDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialpo
rt\build\serialport.vcxproj]
..\src\serialport_win.cpp(318): warning C4311: 'type cast': pointer truncation from 'HANDLE' to 'int' [C:\Users
\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\
serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(318): warning C4302: 'type cast': truncation from 'HANDLE' to 'int' [C:\Users\chris\O
neDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialpo
rt\build\serialport.vcxproj]
..\src\serialport_win.cpp(328): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(353): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(366): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(401): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(403): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(502): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
..\src\serialport_win.cpp(511): warning C4312: 'type cast': conversion from 'int' to 'HANDLE' of greater size [
C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_
modules\serialport\build\serialport.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\chris\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:285:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\chris\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\chris\\OneDrive\\Programmieren\\Code\\arduino\\jf\\test2\\tcpsocket-serialport\\node_modules\\johnny-five\\node_modules\\serialport\\build\\serialport\\v1.7.4\\Release\\node-v46-win32-x64\\serialport.node" "--module_name=serialport" "--module_path=C:\\Users\\chris\\OneDrive\\Programmieren\\Code\\arduino\\jf\\test2\\tcpsocket-serialport\\node_modules\\johnny-five\\node_modules\\serialport\\build\\serialport\\v1.7.4\\Release\\node-v46-win32-x64"
gyp ERR! cwd C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport
gyp ERR! node -v v4.6.1
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:829:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 10.0.15063
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\chris\\OneDrive\\Programmieren\\Code\\arduino\\jf\\test2\\tcpsocket-serialport\\node_modules\\johnny-five\\node_modules\\serialport\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport
node-pre-gyp ERR! node -v v4.6.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.7
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.7.4\Release\node-v46-win32-x64' (1)
tcpsocket-serialport#0.1.0 C:\Users\chris\OneDrive\Programmieren\Code\arduino\jf\test2\tcpsocket-serialport
+-- del#1.2.1
| +-- each-async#1.1.1
| | +-- onetime#1.1.0
...
| +-- string_decoder#1.0.1
| | `-- safe-buffer#5.0.1 deduped
| `-- util-deprecate#1.0.2 deduped
`-- jsdoctypeparser#1.2.0
`-- lodash#3.10.1
npm WARN tcpsocket-serialport#0.1.0 license should be a valid SPDX license expression
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: serialport#1.7.4 (node_modules\johnny-five\node_modules\serialport):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: serialport#1.7.4 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
Another package i found was this
https://www.npmjs.com/package/tcp-serial
Sadly it says ist tcp but if you try the given example it just gives you the error message, that it only works with udp. Anyways, if someone had an idea how to get either of those 2 running I'd be really thankful. I will still be trying to solve it by myself to and be sure to post an answer if I find one. Thanks in advance and
Greetings Chris
Turns out the mistake was pretty obvious once I took a look in the package.json.
The problem was I already included johnny-five in a parent folder which led to a conflict here. So if anyone happens to stumble over the same problem, don't install johnny five and try to install tcpsocket-serialport afterwards.

toolchain arm glibc 2.12.1 error

I try to create cross toolchian for arm
but have this error:
In file included from dl-lookup.c:28:0:
../glibc-ports-2.11/sysdeps/arm/dl-machine.h:29:0: warning: "VALID_ELF_ABIVERSION" redefined
In file included from dynamic-link.h:88:0,
from dl-load.c:34:
../glibc-ports-2.11/sysdeps/arm/dl-machine.h:29:0: warning: "VALID_ELF_ABIVERSION" redefined
../sysdeps/unix/sysv/linux/ldsodefs.h:62:0: note: this is the location of the previous definition
../glibc-ports-2.11/sysdeps/arm/dl-machine.h:30:0: warning: "VALID_ELF_OSABI" redefined
../sysdeps/unix/sysv/linux/ldsodefs.h:60:0: note: this is the location of the previous definition
../glibc-ports-2.11/sysdeps/arm/dl-machine.h:32:0: warning: "VALID_ELF_HEADER" redefined
../sysdeps/unix/sysv/linux/ldsodefs.h:58:0: note: this is the location of the previous definition
../glibc-ports-2.11/sysdeps/arm/dl-machine.h: In function 'elf_machine_load_address':
../glibc-ports-2.11/sysdeps/arm/dl-machine.h:81:38: warning: taking address of expression of type 'void'
../sysdeps/unix/sysv/linux/ldsodefs.h:62:0: note: this is the location of the previous definition
../glibc-ports-2.11/sysdeps/arm/dl-machine.h:30:0: warning: "VALID_ELF_OSABI" redefined
../sysdeps/unix/sysv/linux/ldsodefs.h:60:0: note: this is the location of the previous definition
../glibc-ports-2.11/sysdeps/arm/dl-machine.h:32:0: warning: "VALID_ELF_HEADER" redefined
../sysdeps/unix/sysv/linux/ldsodefs.h:58:0: note: this is the location of the previous definition
../glibc-ports-2.11/sysdeps/arm/dl-machine.h: In function 'elf_machine_load_address':
../glibc-ports-2.11/sysdeps/arm/dl-machine.h:81:38: warning: taking address of expression of type 'void'
dl-load.c: In function 'open_verify':
dl-load.c:1663:41: error: macro "VALID_ELF_ABIVERSION" passed 2 arguments, but takes just 1
dl-load.c:1662:12: error: 'VALID_ELF_ABIVERSION' undeclared (first use in this function)
dl-load.c:1662:12: note: each undeclared identifier is reported only once for each function it appears in
dl-load.c:1708:36: error: macro "VALID_ELF_ABIVERSION" passed 2 arguments, but takes just 1
dl-load.c:1577:3: warning: unused variable 'expected2'
make[2]: *** [/home/pahlevan/Desktop/rezaee/sources/glibc-build/elf/dl-load.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/pahlevan/Desktop/rezaee/sources/glibc-2.12.1/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/home/pahlevan/Desktop/rezaee/sources/glibc-2.12.1'
my configuration is :
gcc-4.5.1+linux.2.6.35.4+binutils-2.20.51+glibc-2.12.1+port-2.11
CLFS_TARGET="arm-pahlevan-linux-gnu"
cd /sources
tar -jxf glibc-2.12.1.tar.bz2
cd ./glibc-2.12.1
tar -jxf ../glibc-ports-2.11.tar.bz2
cp -v Makeconfig{,.orig}
sed -e 's/-lgcc_eh//g' Makeconfig.orig > Makeconfig
patch -Np1 -i ../glibc-2.12.1-gcc_fix-1.patch
patch -Np1 -i ../glibc-2.12.1-makefile_fix-1.patch
mkdir -v ../glibc-build
cd ../glibc-build
export CC="${CLFS_TARGET}-gcc"
export LD="${CLFS_TARGET}-ld"
export AS="${CLFS_TARGET}-as"
export RANLIB="${CLFS_TARGET}-ranlib"
../glibc-2.12.1/configure --prefix=/tools \
--host=${CLFS_TARGET} --build=${CLFS_HOST} --with-tls --with-__thread \
--disable-profile --enable-add-ons --with-binutils=/cross-tools/bin --with-headers=/tools/include \
--enable-kernel=2.6.22.5 --with-headers=/tools/include libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes libc_cv_gnu89_inline=yes
make
make install
cd ..
rm -rf glibc-2.12.1 glibc-build
I solved my compile error (glic-ports-2.12.1)
the problem in this file
"glibc-ports-2.12.1/sysdeps/arm/dl-machine.h"
you must erase this lines :
#define VALID_ELF_ABIVERSION(ver) (ver == 0)
#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM)
#define VALID_ELF_HEADER(hdr,exp,size) memcmp (hdr,exp,size-2) == 0 && VALID_ELF_OSABI (hdr[EI_OSABI]) && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
and replace with lines :
#ifndef VALID_ELF_ABIVERSION
#define VALID_ELF_ABIVERSION(ver) (ver == 0)
#endif
#ifndef VALID_ELF_OSABI
#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM)
#endif
#ifndef VALID_ELF_HEADER
#define VALID_ELF_HEADER(hdr,exp,size) memcmp (hdr,exp,size-2) == 0 && VALID_ELF_OSABI (hdr[EI_OSABI]) && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
#endif

Resources