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

Installs unneeded headers to <prefix>/include/julia? #17657

Closed
petercolberg opened this issue Jul 27, 2016 · 8 comments
Closed

Installs unneeded headers to <prefix>/include/julia? #17657

petercolberg opened this issue Jul 27, 2016 · 8 comments
Labels
building Build system, or building Julia or its dependencies

Comments

@petercolberg
Copy link
Contributor

In the process of packaging julia/0.5.0~rc0 for Debian, I noticed that the runtime library and headers are now installed system-wide for use by other programs. This is a list of headers currently installed here:

/usr/include/julia/END.h
/usr/include/julia/ENTRY.amd64.h
/usr/include/julia/ENTRY.i387.h
/usr/include/julia/MurmurHash3.h
/usr/include/julia/arraylist.h
/usr/include/julia/bitvector.h
/usr/include/julia/dirpath.h
/usr/include/julia/dtypes.h
/usr/include/julia/hashing.h
/usr/include/julia/htable.h
/usr/include/julia/ios.h
/usr/include/julia/julia.h
/usr/include/julia/julia_threads.h
/usr/include/julia/julia_version.h
/usr/include/julia/libsupport.h
/usr/include/julia/platform.h
/usr/include/julia/ptrhash.h
/usr/include/julia/strtod.h
/usr/include/julia/timefuncs.h
/usr/include/julia/tzfile.h
/usr/include/julia/utf8.h
/usr/include/julia/utils.h
/usr/include/julia/uv-errno.h
/usr/include/julia/uv-linux.h
/usr/include/julia/uv-threadpool.h
/usr/include/julia/uv-unix.h
/usr/include/julia/uv-version.h
/usr/include/julia/uv.h

Did you verify that all of these headers are in fact needed to link to libjulia.so?

@petercolberg petercolberg changed the title Install unneeded headers to <prefix>/include/julia? Installs unneeded headers to <prefix>/include/julia? Jul 27, 2016
@tkelman tkelman added the building Build system, or building Julia or its dependencies label Jul 27, 2016
@tkelman
Copy link
Contributor

tkelman commented Jul 27, 2016

Most, but not all, of those are likely needed for embedding. What headers were being installed before?

@petercolberg
Copy link
Contributor Author

With v0.4, no headers were installed, since libjulia was installed in julia’s private libdir. With v0.5, libjulia is installed in the system-wide libdir, so we will also ship the headers; ideally only those declaring functions that are exported for public use in libjulia.so.

@tkelman
Copy link
Contributor

tkelman commented Jul 28, 2016

no headers were installed

make install installs them. Was the debian packaging removing them? So you couldn't actually use libjulia from debian for embedding?

@petercolberg
Copy link
Contributor Author

petercolberg commented Jul 28, 2016

Correct, previously the headers were not packaged. Since I am not yet familiar with the libjulia API, it would be helpful if someone who is familiar could (as part of #17418) go over the list of headers installed with make install and check whether they actually refer to public symbols in libjulia.so.

@tkelman
Copy link
Contributor

tkelman commented Jul 28, 2016

Try https://github.com/JuliaLang/julia/blob/master/doc/manual/embedding.rst as a start. julia.h defines the public interface, but also includes many of the rest of these. Anything that julia.h doesn't recursively include can probably be taken out of make install.

@petercolberg
Copy link
Contributor Author

petercolberg commented Jul 28, 2016

This is the list of included headers:

# cpp -M -I/usr/include/julia -include julia.h /dev/null | grep -o '/usr/include/julia/[^ ]*' | sort
/usr/include/julia/arraylist.h
/usr/include/julia/bitvector.h
/usr/include/julia/dirpath.h
/usr/include/julia/dtypes.h
/usr/include/julia/hashing.h
/usr/include/julia/htable.h
/usr/include/julia/ios.h
/usr/include/julia/julia.h
/usr/include/julia/julia_threads.h
/usr/include/julia/julia_version.h
/usr/include/julia/libsupport.h
/usr/include/julia/platform.h
/usr/include/julia/ptrhash.h
/usr/include/julia/strtod.h
/usr/include/julia/timefuncs.h
/usr/include/julia/utf8.h
/usr/include/julia/utils.h
/usr/include/julia/uv-errno.h
/usr/include/julia/uv-linux.h
/usr/include/julia/uv-threadpool.h
/usr/include/julia/uv-unix.h
/usr/include/julia/uv-version.h
/usr/include/julia/uv.h

These headers are not used:

-/usr/include/julia/END.h
-/usr/include/julia/ENTRY.amd64.h
-/usr/include/julia/ENTRY.i387.h
-/usr/include/julia/MurmurHash3.h
-/usr/include/julia/tzfile.h

@tkelman
Copy link
Contributor

tkelman commented Jul 28, 2016

looks like we can be a little more selective about src/support/*.h here then

julia/Makefile

Line 375 in e717ded

$(INSTALL_F) $(addprefix $(JULIAHOME)/,src/julia.h src/julia_threads.h src/julia_version.h src/support/*.h) $(DESTDIR)$(includedir)/julia

@ViralBShah
Copy link
Member

This has all been considerably cleaned up.

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.

3 participants