-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Error when doing npm install #307
Comments
The formatting got messed up here. Could you:
|
I ran into this when trying to Workaround (if this is the issue): find your |
@clausreinke Thank you for your solution, I am able to build bufferutil module on my Nexus 7 2013 Android 6 now. Have you commit your fix ? so that we don't need to change the flags manually. |
I've asked the original committer to test and apply a fix, as it is his code, and i've got no experience with node-gyp. I suggest to follow that commit discussion to see when this issue is fixed. |
@clausreinke What is the best way forward here? Should we try using a patch in the node package in termux, and then trying to get it upstream? |
No, no. After I've created simple JavaScript script to test:
And it throws an error:
|
@fornwall It is a pity that the original committer has gone quiet - the problem is in his commit. It would be simple enough to make a pull request based on my suggested fix, but (1) the nodejs repo has rules which includes testing requirements and (2) might include android-only patches on a best-effort basis, giving no guarantees that a patch might not make things worse for someone else. I do not currently have a setup for building and testing nodejs itself (or can we do that in termux?-) for/on android and on a supported platform. |
@clausreinke Does this look like the correct patch? diff -u -r ../node-v6.5.0/common.gypi ./common.gypi
--- ../node-v6.5.0/common.gypi> 2016-08-26 11:27:16.000000000 -0400
+++ ./common.gypi> 2016-09-14 06:35:35.551380791 -0400
@@ -78,7 +78,12 @@
}],
['OS == "android"', {
'cflags': [ '-fPIE' ],
- 'ldflags': [ '-fPIE', '-pie' ]
+ 'ldflags': [ '-fPIE' ],
+ 'target_conditions': [
+ ['_type == "executable"', {
+ 'ldflags': [ '-pie' ]
+ }]
+ ]
}],
['node_shared=="true"', {
'msvs_settings': { We could add it to the nodejs package in Termux, and propose it for inclusion upstream later. |
@fornwall Looks about right, but there used to be two occurrences (a normal and a debug configuration?). I tried to guess the syntax from similar stuff elsewhere in the file, and tested it for building packages on termux (on android). If it also works for you building node for termux (android), that would be two good points in favour of this change. If there was a way to run node's testsuite on android, a pull-request should be pretty obvious, as that includes building packages, which is what this issue is all about.. |
@clausreinke I realized that patching common.gypi in the nodejs source folder before building, does not affect the file that ends up in |
@fornwall That connection happens when the patch enters the newest release. See this comment, or the gist it links to. Node-gyp fetches those files from Until then, you need to patch both copies, it seems. |
@fornwall, thank you very much! Now everyhthing works. Only need to fix this issue (I had to mangle common.gypi manually, I havent tried 'target_conditions', I just remove '-pie' from 'ldflags'). |
I don't think this is an urgent issue anymore after switching to clang, as clang only emits a warning when |
Hi termux experts,
I am facing an installation issue when doing my experiments: npm i bufferutil --save
node-gyp 3.3.1 was installed successfully by npm install -g node-gyp
$uname -a
Linux localhost 3.4.0-g09a22c6 #1 SMP PREEMPT Wed Apr 20 00:06:25 UTC 2016 armv7l Android
app: termux , linux 3.4.0-g1680ab8 in android 6.0.1
gcc: 6.1.0
make: 4.2
node v6.2.1
npm v3.9.5
node-gyp v3.3.1
Command to reproduce:
npm i bufferutil --save
Is it lacking of kerberos lib: libkrb5-dev ?
npm.install.txt
The text was updated successfully, but these errors were encountered: