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

Allow overriding of SuiteSparse static library search #785

Closed
6e441f9c opened this issue May 1, 2012 · 7 comments
Closed

Allow overriding of SuiteSparse static library search #785

6e441f9c opened this issue May 1, 2012 · 7 comments
Labels
building Build system, or building Julia or its dependencies

Comments

@6e441f9c
Copy link

6e441f9c commented May 1, 2012

My system SuiteSparse is not in one of the standard directories. It would be nice to have a way to override the path; not sure which way is better from Makefile maintainability point of view.

@ViralBShah
Copy link
Member

I think we should just provide a shell script to do so. There is too much magic in building SuiteSparse that causes grief.

@ViralBShah
Copy link
Member

@staticfloat, @6e441f9c Would you be ok if we just provide a shell script for compiling SuiteSparse's .a files into the appropriate shared library? It's quite hairy to accommodate all cases in the Makefile.

@6e441f9c
Copy link
Author

6e441f9c commented May 5, 2012

If it is easier to write a shell script - of course. Hopefully separating this logic in another file would make it simpler to manage.

@6e441f9c 6e441f9c closed this as completed May 5, 2012
@6e441f9c 6e441f9c reopened this May 5, 2012
@6e441f9c
Copy link
Author

6e441f9c commented May 5, 2012

Sorry for missing the button.

@staticfloat
Copy link
Member

Absolutely, this is a much better solution than what's in the makefile right now.

@ViralBShah
Copy link
Member

@vtjnash does your SuiteSparse related Makefile reorganization address this?

@vtjnash
Copy link
Member

vtjnash commented May 20, 2012

Yes, the intent of contrib/repackage_system_suitesparse.make is to make this possible. Running it will copy the SuiteSparse*.a locally, build a shared object file from them, and place it in the local usr/lib path. That way it gets found first and is built to include the same functions as the usual Julia build. I didn't rewrite it as an explicit shell script, since I just pulled out what I originally put in the deps/Makefile (and each step in a Makefile is a sh script), and it made it convenient to pass environment variables on the command line. It is intended that this can be run before Julia's make, to prepare the environment. Setting the environment variable LDFLAGS=-L/path/to/ss/lib is all that is needed to get it to find your system's SuiteSparse libraries.

There is a second possibilities here, which when an object library is not on the standard path (since julia looks for an object library containing the SuiteSparse functions at startup). You can set the environment variable LD_LIBRARY_PATH=/path/to/lib, but this is not ideal. I haven't really addressed this scenario yet (I could just put symlinks in usr/lib), but some patch for it is probably needed before I can put Julia on MacPorts, so it'll have to be done eventually.

@vtjnash vtjnash closed this as completed May 20, 2012
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

No branches or pull requests

4 participants