-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Made the package compile in termux on android #198
Conversation
@rolftimmermans Would it make sense to move the |
Shouldn't node-gyp add -fPIC already? I don't think it should be necessary to add it explicitly. |
@arrkiin, would you be able to check whether your PR works without In fact, you may be able to remove |
@n-riesco, that what you described was my first attemp to resolve the problem. I cloned the ijavacript repository and did an
But during the linking of the libzmq library it produced the following errror message:
So I digged a lot deeper, cloned the zeromq.js project and did some sole experiments with the zeromq build process. In the end I came up with the changes bundled in this PR. To verify the whole build process I cloned the whole dependency chain ijavascript -> jp-kernel -> jmp -> zeromq.js with modified dependenies. In the end I had a nice ijavascript-kernel on my android device termux-app. |
Well, node-gyp already adds Deciding which flags need to be added for certain platforms to correctly compile Node.js modules (in general) should be added in the node-gyp project, not in each project separately. There is nothing specific in ZeroMQ.js which would require I recommend opening a pull request with node-gyp. |
Great investigation. Thanks for the hint. I will look into it later this week and do some tests. |
Looked into https://github.com/nodejs/node-gyp/blob/master/addon.gypi#L140 and did the needed modifications (https://github.com/arrkiin/node-gyp/blob/termux_on_android/addon.gypi#L142). |
Fyi. Here is my PR for node-gyp (nodejs/node-gyp#1340). So ijavascript and jp-babel were installed without any problems. I like my new possibility to use jupyter on my android device as a scratchpad and idea-lab for python and now also for javascript stuff. @n-riesco, thanks for that. @rolftimmermans thanks for your help, just learned more about npm and node-gyp now. |
To compile the package in the termux app on android you have to compile the sources with the compiler flag "-fPIC". I added this in an special condition branch. The compiled package is working properly within the following constellation ijavascript -> jp-kernel -> jmp -> zeromq.js