-
Notifications
You must be signed in to change notification settings - Fork 245
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
Use pkg-config to detect flags for statically linking dependencies (notably BLAS, GC, NTL) #2097
Comments
I'm afraid I'm not sure what you mean. What is the problem, and how does this solve the issue? |
Linking against a static CBLAS can require both
can fail to "find" it because it passes This matters at least to CRAN which links libraries statically to simplify distribution of R package binaries to Windows and macOS users, e.g., so that they can use an R interface to FLINT without needing to have FLINT, MPFR, GMP, CBLAS, ... installed on their systems. |
I see, thanks for the explanation. We could fix this, but I don't believe pkg-config should be a requirement for installing FLINT. I believe these cases are very limited (correct me if I'm wrong), so I would propose using the fifth argument in |
One would typically condition the use of Using the fifth argument of |
Of course I can empathize with reluctance to add complexity to But really |
Can you give any examples of libraries that use pkg-config this way in Autoconf? |
Yes, you can get inspiration from mature projects such as R, curl, and ghostscript. R in particular is very careful to test linking with each of |
Thanks, I will look into it! |
I'm on board with this, and I believe it should be an easy fix. Will try to fix it before next release. |
And substitute those flags in
flint.pc
so that software wanting to statically link FLINT can know how to do so. This means thatconfigure.ac
should, if it findspkg-config
, test linking first withpkg-config --libs <name>
and (only if that fails) again withpkg-config --static --libs <name>
. The output would typically contain both-L
and-l
options, so it could override user options--with-*-lib
not designed for static linking. In that case,pkg-config --cflags <name>
should probably override--with-*-include
.You could use
--libs-only-L
,--libs-only-l
, and--libs-only-other
to separate the flags if that simplifies the Autoconf implementation.The text was updated successfully, but these errors were encountered: