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

fix for building on OSX against Node 6.2.2 / Julia 0.4.6 #32

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

complyue
Copy link

this is my fix to build NJ against latest Node/Julia releases on Mac

@waTeim
Copy link
Owner

waTeim commented Jul 4, 2016

It looks like there is a problem with Julia 0.5, but it's likely to be an aspect of a change to Julia; I can work on that. LGTM otherwise. I'm interested in the effect you found of changing delete [] to delete as well. I'm going to check how to deal with Julia 0.5 first and then merge shortly after.

@complyue
Copy link
Author

complyue commented Jul 5, 2016

So far I just confirmed npm test all passed after changing delete[], haven't go deeper in using NJ. BTW I read Julia is using uv too, and a different version than Node.js' uv are bundled together (perhaps with isolation?). I'm curious if they can be compiled with a same uv copy (so does the version), then Julia code can run cooperatively with other Node's threaded parts like fs etc. I'm new to Julia, but very delighted by its strength on computing power, to help overcome Node's shortcoming in this area, while I believe async is even more powerful to handle big data floating around. I'm really excited by the possibility that data be async-ly arranged get async-ly computed on and deducted, with no redundant copies in RAM, which NJ is offering.

@complyue
Copy link
Author

complyue commented Jul 8, 2016

I forgot to mention, I changed delete to delete[] due to a warning during build:

  CXX(target) Release/obj.target/nj/src/Call.o
../src/Call.cpp:165:10: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
         delete jl_args;
         ^
               []
../src/Call.cpp:157:33: note: allocated with 'new[]' here
         jl_value_t **jl_args = new jl_value_t*[numArgs];
                                ^
1 warning generated.

I do think the compiler is correct so did the change. For your reference.

@wolfiex
Copy link

wolfiex commented Mar 16, 2017

Your change removed the delete warning, however the following error still persists

error: cannot cast from type 'union jl_typemap_t' to
      pointer type 'jl_value_t *' (aka '_jl_value_t *')
         if(val && jl_is_function(val)) filteredNames.push_back(*s);
                   ^~~~~~~~~~~~~~~~~~~
../src/Import.cpp:14:28: note: expanded from macro 'jl_is_function'
#define jl_is_function(v) ((jl_value_t*)jl_gf_mtable(v)->defs != jl_nothing)
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

OSX node 6.7 julia .5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants