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

embedding julia failed due to missing header file. #8690

Closed
randy3k opened this issue Oct 15, 2014 · 12 comments
Closed

embedding julia failed due to missing header file. #8690

randy3k opened this issue Oct 15, 2014 · 12 comments
Labels
building Build system, or building Julia or its dependencies

Comments

@randy3k
Copy link
Contributor

randy3k commented Oct 15, 2014

Following the comment here

libuv.a is not in the binaries any more, so this can probably be closed. But since #8024 we also aren't installing uv.h, which breaks the embedding use case since julia.h include's it. There are some uv_ types in julia.h, so do we need to put the libuv header back?

One fails to include julia.h as uv.h is missing from the binary distribution or the "make install" distribution.

gcc -g -Wall -I/usr/local/Cellar/r/3.1.1/R.framework/Resources/include -I/opt/local/julia-0.3.1/bin/../include/julia -fPIC -c external.c -o external.o
In file included from external.c:7:
/opt/local/julia-0.3.1/bin/../include/julia/julia.h:11:10: fatal error: 'uv.h'
      file not found
#include "uv.h"
         ^
1 error generated.
make: *** [external.o] Error 1
@stevengj stevengj added the building Build system, or building Julia or its dependencies label Oct 15, 2014
@stevengj
Copy link
Member

We could distribute uv.h, but maybe we should change julia.h so that it does not depend on this (by moving all libuv dependencies into julia_internal.h)?

@JeffBezanson
Copy link
Member

It does look like everything in julia.h that uses uv should be moved to julia_internal.h. We might want to keep the dlopen functions in julia.h, but they can be declared to return void* handles.

@nalimilan
Copy link
Member

Maybe worth fixing before 0.3.2? It's been reported once more on the list.

stevengj added a commit to stevengj/julia that referenced this issue Oct 21, 2014
JeffBezanson added a commit that referenced this issue Oct 23, 2014
fix #8690: remove uv.h dependency from julia.h
@randy3k
Copy link
Contributor Author

randy3k commented Oct 23, 2014

It has not fixed the problem, there is another file including "uv.h"

gcc -g -O2 -std=gnu99 -Wall -I/opt/local/julia-dev/include/julia -I/Library/Frameworks/R.framework/Resources/include -fPIC -c rj_cast.c -o rj_cast.o
In file included from rj_cast.c:5:
In file included from /opt/local/julia-dev/include/julia/julia.h:10:
In file included from /opt/local/julia-dev/include/julia/libsupport.h:11:
/opt/local/julia-dev/include/julia/ios.h:5:10: fatal error: 'uv.h' file not
      found
#include "uv.h"
         ^
1 error generated.
make: *** [rj_cast.o] Error 1

@tkelman tkelman reopened this Oct 23, 2014
@tkelman
Copy link
Contributor

tkelman commented Oct 23, 2014

Looks like the only thing that include's needed for is UV_HANDLE_TYPE_MAX ?

@stevengj
Copy link
Member

No, it's worse than that: there are all the uses of uv_loop_t and uv_stream_t and uv_async_t in julia.h. I don't know how I missed those...

@stevengj
Copy link
Member

Maybe we should revert #8754 and just ship uv.h?

@StefanKarpinski
Copy link
Member

Shipping uv.h seems pretty sane.

@JeffBezanson
Copy link
Member

Shipping uv.h is not the end of the world, but I think it's nice to properly separate julia.h and julia_internal.h based on what API clients actually need.

@waTeim
Copy link
Contributor

waTeim commented Nov 1, 2014

I could help with this, I have some experience with embedding and uv after all...

Ok, I have a possible (workaround?) solution. I don't think it's a complete solution; here are the current limitations.

jl_spawn is currently unavailable to embedding.
all of the various uv_ types are opaque, they need a factory.

@ghost
Copy link

ghost commented Nov 26, 2014

I would be interested in a solution enabling parallel computing and also using C/C++ code. Getting the uv.h code would be a possibility ?
Thank you.

JeffBezanson added a commit that referenced this issue Dec 12, 2014
Temp fix for #8690: added uv.h and dependencies to distribution.
@ViralBShah
Copy link
Member

Can we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants