Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Error #12379

Closed
hjjayakrishnan opened this issue Apr 13, 2017 · 6 comments
Closed

Make Error #12379

hjjayakrishnan opened this issue Apr 13, 2017 · 6 comments
Labels
build Issues and PRs related to build files or the CI. mips Issues and PRs related to the MIPS architecture. question Issues that look for answers.

Comments

@hjjayakrishnan
Copy link

hjjayakrishnan commented Apr 13, 2017

  • Version*: The program 'node' can be found in the following packages:
    node
    nodejs-legacy

Try: sudo apt-get install

  • Platform: Linux grimreaper 3.13.0-34-generic #60-Ubuntu SMP Wed Aug 13 15:45:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem:

I'm trying to cross compile node.js for a MIPS-24kc architecture running openwrt.

This is my environment script:

#!/bin/sh

export AR=../openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-ar
export CC=../openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-gcc
export CXX=../openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-g++
export LINK=../openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-g++
export RANLIB=../openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-ranlib
export STAGING_DIR=../openwrt/staging_dir
export LIBPATH=../openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib
export LDFLAGS='-Wl,-rpath-link '${LIBPATH}

output of ls:

$ ls
a.out  environment_jk.sh  example.c  node  openwrt  sys

output of ls in the openwrt directory

smith@foo:~/ubiquiti/openwrt$ ls
bin          build_dir  Config.in  docs   feeds.conf.default  key-build      LICENSE   package  rules.mk  staging_dir  tmp        tools
BSDmakefile  config     dl         feeds  include             key-build.pub  Makefile  README   scripts   target       toolchain

Output of ./configure --without-snapshot --without-npm

creating ./icu_config.gypi
* Using ICU in deps/icu-small
Using version-specific floating patch tools/icu/patches/58/source/i18n/digitlst.cpp
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'asan': 0,
                 'coverage': 'false',
                 'debug_devtools': 'node',
                 'force_dynamic_crt': 0,
                 'gas_version': '2.24',
                 'host_arch': 'mips',
                 'icu_data_file': 'icudt58l.dat',
                 'icu_data_in': '../../deps/icu-small/source/data/in/icudt58l.dat',
                 'icu_endianness': 'l',
                 'icu_gyp_path': 'tools/icu/icu-generic.gyp',
                 'icu_locales': 'en,root',
                 'icu_path': 'deps/icu-small',
                 'icu_small': 'true',
                 'icu_ver_major': '58',
                 'mips_arch_variant': 'r2',
                 'mips_fpu_mode': 'fp32',
                 'node_byteorder': 'little',
                 'node_enable_d8': 'false',
                 'node_enable_v8_vtunejit': 'false',
                 'node_install_npm': 'false',
                 'node_module_version': 54,
                 'node_no_browser_globals': 'false',
                 'node_prefix': '/usr/local',
                 'node_release_urlbase': '',
                 'node_shared': 'false',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_use_bundled_v8': 'true',
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_lttng': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_v8_platform': 'true',
                 'openssl_fips': '',
                 'openssl_no_asm': 0,
                 'shlib_suffix': 'so.54',
                 'target_arch': 'mips',
                 'uv_parent_path': '/deps/uv/',
                 'uv_use_dtrace': 'false',
                 'v8_can_use_fpu_instructions': 'true',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 1,
                 'v8_enable_inspector': 1,
                 'v8_no_strict_aliasing': 1,
                 'v8_optimized_debug': 0,
                 'v8_random_seed': 0,
                 'v8_use_mips_abi_hardfloat': 'true',
                 'v8_use_snapshot': 'false',
                 'want_separate_host_toolset': 0,
                 'want_separate_host_toolset_mkpeephole': 0}}
creating ./config.gypi
creating ./config.mk

This is the make error I'm getting:

make[1]: ../openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-g++: Command not found
make[1]: *** [/home/smith/ubiquiti/node/out/Release/obj.target/v8_libbase/deps/v8/src/base/bits.o] Error 127
make[1]: Leaving directory `/home/smith/ubiquiti/node/out'
make: *** [node] Error 2
@aqrln aqrln added the build Issues and PRs related to build files or the CI. label Apr 13, 2017
@aqrln
Copy link
Contributor

aqrln commented Apr 13, 2017

I believe the problem is with paths to your toolchain. Try to use absolute paths in your environment script, not relative ones.

FWIW, your architecture is not on the list of supported platforms, so I'm not sure you'll succeed building and running Node after you'll have resolved this problem, but give it a try if you want.

@mscdex mscdex added the question Issues that look for answers. label Apr 13, 2017
@hjjayakrishnan
Copy link
Author

hjjayakrishnan commented Apr 13, 2017

Hi,
It's weird that it's not listed in the list of supported platforms but there are a lot of questions pertaining to mips in this forum.

Also I tried changing the paths to absolute paths:

export AR=/home/jayakrishnan/ubiquiti/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-ar
export CC=/home/jayakrishnan/ubiquiti/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-gcc
export CXX=/home/jayakrishnan/ubiquiti/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-g++
export LINK=/home/jayakrishnan/ubiquiti/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-g++
export RANLIB=/home/jayakrishnan/ubiquiti/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-ranlib
export STAGING_DIR=/home/jayakrishnan/ubiquiti/openwrt/staging_dir
export LIBPATH=/home/jayakrishnan/ubiquiti/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib
export LDFLAGS='-Wl,-rpath-link '${LIBPATH}

But I run into this new error:

.
.
.
../deps/v8/src/base/debug/stack_trace_posix.cc
../deps/v8/src/base/debug/stack_trace_posix.cc:34:22: fatal error: execinfo.h: No such file or directory
 #include <execinfo.h>
                      ^
compilation terminated.
make[1]: *** [/home/jayakrishnan/ubiquiti/node/out/Release/obj.target/v8_libbase/deps/v8/src/base/debug/stack_trace_posix.o] Error 1
make[1]: Leaving directory `/home/jayakrishnan/ubiquiti/node/out'
make: *** [node] Error 2

@bnoordhuis Although patches have been merged for the uclibc error, it seems to keep happening.

@aqrln aqrln added the mips Issues and PRs related to the MIPS architecture. label Apr 13, 2017
@artynet
Copy link

artynet commented Jun 27, 2017

hello @hjjayakrishnan, this is my patch to build nodejs v8.1.2 on chaos calmer :

diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js
index da019ac4d6..8b81e28940 100644
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -166,7 +166,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
     'legacy-bundling': false,
     link: false,
     'local-address': undefined,
-    loglevel: 'notice',
+    loglevel: 'info',
     logstream: process.stderr,
     'logs-max': 10,
     long: false,
@@ -214,7 +214,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
     'sign-git-tag': false,
     'sso-poll-frequency': 500,
     'sso-type': 'oauth',
-    'strict-ssl': true,
+    'strict-ssl': false,
     tag: 'latest',
     'tag-version-prefix': 'v',
     timing: false,
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
index 64b9dd267b..1ddd95b86b 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
@@ -144,6 +144,30 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
 quiet_cmd_link = LINK($(TOOLSET)) $@
 cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
 
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+        rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+        rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
 # We support two kinds of shared objects (.so):
 # 1) shared_library, which is just bundling together many dependent libraries
 # into a link line.
@@ -188,6 +212,30 @@ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
 quiet_cmd_alink_thin = AR($(TOOLSET)) $@
 cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
 
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+        rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+        rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
 # Due to circular dependencies between libraries :(, we wrap the
 # special "figure out circular dependencies" flags around the entire
 # input list during linking.
@@ -1581,11 +1629,17 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
             "Spaces in alink input filenames not supported (%s)"  % link_dep)
       if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
           self.is_standalone_static_library):
-        self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
-                        part_of_all, postbuilds=postbuilds)
+        if self.flavor in ('linux', 'android'):
+          self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_thin_archive,$@,$^)'])
+        else:
+          self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
+                          part_of_all, postbuilds=postbuilds)
       else:
-        self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
-                        postbuilds=postbuilds)
+        if self.flavor in ('linux', 'android'):
+          self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_archive,$@,$^)'])
+        else:
+          self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
+                          postbuilds=postbuilds)
     elif self.type == 'shared_library':
       self.WriteLn('%s: LD_INPUTS := %s' % (
             QuoteSpaces(self.output_binary),
diff --git a/deps/uv/src/unix/getaddrinfo.c b/deps/uv/src/unix/getaddrinfo.c
index 2049aea2f3..dde17b9068 100644
--- a/deps/uv/src/unix/getaddrinfo.c
+++ b/deps/uv/src/unix/getaddrinfo.c
@@ -99,6 +99,7 @@ static void uv__getaddrinfo_work(struct uv__work* w) {
   int err;
 
   req = container_of(w, uv_getaddrinfo_t, work_req);
+  req->hints->ai_flags &= ~AI_V4MAPPED;
   err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo);
   req->retcode = uv__getaddrinfo_translate_error(err);
 }
diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc
index 896c25dab1..54dcb3ce1d 100644
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -144,6 +144,7 @@ int __detect_fp64_mode(void) {
       ".set push\n\t"
       ".set noreorder\n\t"
       ".set oddspreg\n\t"
+      ".set hardfloat\n\t"
       "lui $t0, 0x3FF0\n\t"
       "ldc1 $f0, %0\n\t"
       "mtc1 $t0, $f1\n\t"
diff --git a/deps/v8/src/base/debug/stack_trace_posix.cc b/deps/v8/src/base/debug/stack_trace_posix.cc
index 87c0a73d19..7064e5de87 100644
--- a/deps/v8/src/base/debug/stack_trace_posix.cc
+++ b/deps/v8/src/base/debug/stack_trace_posix.cc
@@ -25,7 +25,7 @@
 #include <string>
 #include <vector>
 
-#if V8_LIBC_GLIBC || V8_LIBC_BSD || V8_LIBC_UCLIBC || V8_OS_SOLARIS
+#if V8_LIBC_GLIBC || V8_LIBC_BSD || V8_OS_SOLARIS
 #define HAVE_EXECINFO_H 1
 #endif
 
diff --git a/deps/v8/src/compiler/node-matchers.h b/deps/v8/src/compiler/node-matchers.h
index d2bdb8bff5..a7dcce3b66 100644
--- a/deps/v8/src/compiler/node-matchers.h
+++ b/deps/v8/src/compiler/node-matchers.h
@@ -168,7 +168,7 @@ struct FloatMatcher final : public ValueMatcher<T, kOpcode> {
     return this->HasValue() && std::isnormal(this->Value());
   }
   bool IsInteger() const {
-    return this->HasValue() && std::nearbyint(this->Value()) == this->Value();
+    return this->HasValue() && nearbyint(this->Value()) == this->Value();
   }
   bool IsPositiveOrNegativePowerOf2() const {
     if (!this->HasValue() || (this->Value() == 0.0)) {
diff --git a/deps/v8/src/wasm/wasm-result.h b/deps/v8/src/wasm/wasm-result.h
index 004ac22d33..eac307c2d0 100644
--- a/deps/v8/src/wasm/wasm-result.h
+++ b/deps/v8/src/wasm/wasm-result.h
@@ -5,6 +5,7 @@
 #ifndef V8_WASM_RESULT_H_
 #define V8_WASM_RESULT_H_
 
+#include <cstdarg>
 #include <memory>
 
 #include "src/base/compiler-specific.h"
diff --git a/lib/module.js b/lib/module.js
index ae6f4ff453..bd912c88f0 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -626,7 +626,8 @@ Module._initPaths = function() {
   } else {
     prefixDir = path.resolve(process.execPath, '..', '..');
   }
-  var paths = [path.resolve(prefixDir, 'lib', 'node')];
+  var paths = [path.resolve(prefixDir, 'lib', 'node'),
+               path.resolve(prefixDir, 'lib', 'node_modules')];
 
   if (homeDir) {
     paths.unshift(path.resolve(homeDir, '.node_libraries'));
diff --git a/src/backtrace_posix.cc b/src/backtrace_posix.cc
index 8fd798757a..8328b59439 100644
--- a/src/backtrace_posix.cc
+++ b/src/backtrace_posix.cc
@@ -4,9 +4,7 @@
 #include <features.h>
 #endif
 
-#if defined(__linux__) && !defined(__GLIBC__) || \
-    defined(__UCLIBC__) || \
-    defined(_AIX)
+#if defined(__linux__) && defined(__UCLIBC__)
 #define HAVE_EXECINFO_H 0
 #else
 #define HAVE_EXECINFO_H 1
diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
index f7f519b3e6..6f7cc23442 100644
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -149,6 +149,30 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
 quiet_cmd_link = LINK($(TOOLSET)) $@
 cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
 
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+        rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+        rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
 # We support two kinds of shared objects (.so):
 # 1) shared_library, which is just bundling together many dependent libraries
 # into a link line.
@@ -177,7 +201,7 @@ quiet_cmd_alink = LIBTOOL-STATIC $@
 cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
 
 quiet_cmd_link = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
+cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
 
 quiet_cmd_solink = SOLINK($(TOOLSET)) $@
 cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
@@ -193,6 +217,30 @@ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
 quiet_cmd_alink_thin = AR($(TOOLSET)) $@
 cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
 
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+        rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+        rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+        $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+        $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
 # Due to circular dependencies between libraries :(, we wrap the
 # special "figure out circular dependencies" flags around the entire
 # input list during linking.
@@ -1589,11 +1637,17 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
             "Spaces in alink input filenames not supported (%s)"  % link_dep)
       if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
           self.is_standalone_static_library):
-        self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
-                        part_of_all, postbuilds=postbuilds)
+        if self.flavor in ('linux', 'android'):
+          self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_thin_archive,$@,$^)'])
+        else:
+          self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
+                          part_of_all, postbuilds=postbuilds)
       else:
-        self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
-                        postbuilds=postbuilds)
+        if self.flavor in ('linux', 'android'):
+          self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_archive,$@,$^)'])
+        else:
+          self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
+                          postbuilds=postbuilds)
     elif self.type == 'shared_library':
       self.WriteLn('%s: LD_INPUTS := %s' % (
             QuoteSpaces(self.output_binary),

Best, Arturo

[refack: folded the patch]

@refack
Copy link
Contributor

refack commented Jun 27, 2017

@artynet It's quite an extensive patch, you touch npm, GYP, libuv and V8... Did you make sure it's the minimal change needed?
Also IMHO it would be beneficial to publish this patch as a gist, with a good description, that way it will be googlable.

@refack refack self-assigned this Jun 27, 2017
@artynet
Copy link

artynet commented Jun 27, 2017

@refack it is the sum of these patches :

https://github.com/artynet/openwrt-git/tree/openwrt-1505-setup-04/package/linino/node8/patches

in particular, number 001 to 005 are mandatory to build the sources at least when using uClibc 0.9.33.2. Please take a deeper look at all of them....They are based on the work of the OpenWRT developers and @nxhack here :

https://github.com/nxhack/openwrt-node-packages/tree/master/node/patches

and of the buildroot developers.

Best, Arturo

@Trott
Copy link
Member

Trott commented Aug 7, 2017

This issue has been inactive for sufficiently long that it seems like perhaps it should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. mips Issues and PRs related to the MIPS architecture. question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests

6 participants