Repository navigation
build: generate pkgconfig file - #473
Conversation
| # Set the path to the subdirectory of the share installation directory. | ||
| MK_SHARE_DIR_INST := $(INSTALL_SHAREDIR)/blis | ||
|
|
||
| PC_SHARE_DIR_INST := $(INSTALL_SHAREDIR)/pkgconfig |
There was a problem hiding this comment.
Isn't this supposed to be $(INSTALL_LIBDIR)/pkgconfig?
There was a problem hiding this comment.
It could be, but since the rest of the blis config files are installed in share, I used the same to be consistent.
There was a problem hiding this comment.
pkg-config will not find blis if it's not installed into $(INSTALL_LIBDIR)/pkgconfig right? (Unless the user manually sets PKG_CONFIG_PATH)
There was a problem hiding this comment.
Right. Thanks for bringing that up. I was only testing it from within a CMake project and that works either way with CMake. How about adding a datadir=@prefix@/share to blis.pc.in. pkg-config should automatically pick up from datadir/pkgconfig as well right ? Alternatively, I could also change it to $(INSTALL_LIBDIR)/pkgconfig, but I would prefer @devinamatthews comment on this one before I do that.
|
@ajaypanyala @isuruf I'm in over my head here but this guide says "On a typical Unix system, it will search in the directories /usr/lib/pkgconfig and /usr/share/pkgconfig". On my mac they're all in /usr/lib. On our cluster they're all in /usr/share... Since a pkg-config file is not actually an executable library I would put it in share, but then again .la files go in lib so I guess anything goes. My main concern is actually using the BLIS CFLAGS and LDFLAGS... these should only be necessary for downstream application to use when linking the static version, and even then not all of the flags are necessary. Perhaps the initial version can assume dynamic linking and omit those? |
|
@devinamatthews I was not sure how to separate |
|
For libraries that are needed only during static linking you can add them to |
Didn't know that. I'm fine with either option then. |
|
I would say leave them out, and we can put a caveat in the docs that says for now it (pkg-config) only works with dynamic linking. It's still a net gain in functionality. |
|
@devinamatthews I pushed a small change as suggested by @isuruf . With this |
@devinamatthews Could you point me to a |
|
I can't say for sure, maybe -funsafe-math-optimizations. But even basic optimization flags shouldn't be passed on to downstream applications. If -fopenmp is in Libs.private then I think that is sufficient and CFLAGS can be dropped. Good work on the --static workaround. |
|
Dropped |
|
@devinamatthews @isuruf Is this good to go ? Please let me know if something else is needed before merging. |
|
Yes, looks good. I'll merge. |
Fixes #472