-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add section to docs Addressing considerations for using shared libraries #248
Comments
For posterity, I have attached a copy of a post I made on the slack explaining things (we will need to rework some of this so that the documentation reads coherently).
Footnotes
|
When writing this documentation, it might be useful to also refer to Issue #198 (since it also provides a description of static linking and dynamic loading) |
While helping somebody on slack with some linking issues, I realized we should probably add a short section to the documentation to explain how to use Grackle as a shared library.
We already make a bunch of scattered references to the need for defining
DYLD_LIBRARY_PATH
orLD_LIBRARY_PATH
but we could use some improvements:export LD_LIBRARY_PATH=/path/to/grackle-install/lib:$LD_LIBRARY_PATH
to their shell startup script (e.g..bashrc
or.zshrc
).export ...
-L
flag to specify Grackle's location to a "static-linker" (likeld
) during a build process and I couldn't figure out why we also needed theLD_LIBRARY_PATH
. It was hard to understand thatLD_LIBRARY_PATH
provided information to distinct software -- the component of the operating system called a dynamic loader (a.k.a a "dynamic linker").LD_LIBRARY_PATH
outside of software development.LD_LIBRARY_PATH
is a necessary evil for using Grackle.LD_LIBRARY_PATH
only specifies a directory holding a small subset of custom shared libraries (i.e. no core libraries likeglibc
,zlib
,Glib
), then the risks are extremely minimal. The worst thing that happens is if you want to use 2 different versions grackle (or you are trying to develop grackle).sudo ldconfig -v
).1 We can also make it clear when exactly this becomes unnecessaryFootnotes
The
libtool
provides some breadcrumbs about the fact that this needs to happen, but the CMake build-system doesn't make any such suggestion. We should be clear that rules may differ on different operating systems (I vaguely recall reading that someldconfig
commands that work on linux do very different and very destructive things on certain BSD systems -- but I may be conflating things) ↩The text was updated successfully, but these errors were encountered: