-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added pkg-config file and .gitignore #86
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
b9a7bed
to
a94f4d6
Compare
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
a94f4d6
to
94dd4a1
Compare
Is there anything else needed on this PR? |
We will not add pkg-config support for now. We don't want to get into supporting individual package managers, because the C++ ecosystem hasn't converged into a single solution, and there are quite a few equally reasonable candidates. We can't justify the investment into supporting all the package managers, or into supporting a couple of package managers and trying to rationalize where we drew the line. |
I am confused by this decision. pkg-config is fairly standard and the vast majority of libraries I work with that provide headers and dylibs also provide a pkg-confg file. Without this PR, I am left with the option to add the file via the package managers I would use (homebrew, apt, yum, nix, etc.), which is a ton of repetitive configuration. It only works currently without a pkg-config because people typically install on a prefix like i.e. It only works by accident. |
Someone else from my team has also experienced problems compiling the snappy gem on macOS catalina. They fixed by:
I believe this patch would have fixed his problem. |
👍 for reconsidering this patch, thanks! |
Thanks for the attempt to get this fixed up @lavoiesl and the workaround instructions. |
Any chance this be reconsider?? 🙏 It would be super helpful for many different package managers to have snappy supporting pkg-config. |
Sorry, my answer above still stands. We'd only reconsider if there is a Google use case that would justify the ongoing maintenance cost. I'm going to lock this issue. If googlers want to discuss this, please reach out internally. |
This is a redo of #55, which had merge conflicts and seemed abandoned.
I implemented the suggested fix of using the variables provided by GNUInstallDirs
A notable difference is that the
snappy.pc
is now installed in<prefix>/lib/pkgconfig
instead of<prefix>/share/pkgconfig
, which seems to be more in line with the other packages installing libraries.Grabbed the absolute/relative logic from rtrlib/rtrlib#150; when building in Nixos, it overrides
GNUInstallDirs
to absolute paths, which may not be in the prefix:Verification using a relative
CMAKE_INSTALL_LIBDIR
:With an absolute
CMAKE_INSTALL_LIBDIR
, building with nix:Installing the snappy gem (i.e. it properly detected it and didn't recompile snappy):