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

Obtain headers for a package (like unixodbc)? #354

Closed
kylecordes opened this issue Jun 13, 2016 · 4 comments
Closed

Obtain headers for a package (like unixodbc)? #354

kylecordes opened this issue Jun 13, 2016 · 4 comments
Labels
question An open question

Comments

@kylecordes
Copy link

Hello. No bug report per se... not sure if this is a question or feature request.

I'm trying to install a downstream (non brew) thing that needs the ODBC headers (sql.h and so on). I can obtain unixodbc from the brew package, but is there any way to obtain it's related compilation headers?

Is there any generic way for Brew to know of a relationship between package X and the headers to compile against package X? Or is this a totally manual process, of hoping the maintains of package X also maintain a package X-dev or whatever, and keep it nicely in version sync? If not, is that a worthwhile feature to consider?

@UniqMartin UniqMartin added the question An open question label Jun 13, 2016
@UniqMartin
Copy link
Contributor

Because Homebrew was originally a package manager that built everything from source and even today has to fall back to building from source every once in a while, our packages normally install everything that is needed to develop software with a given package. Thus *-dev packages like in Debian are not needed. In your particular example, you'll find the headers in $(brew --prefix)/opt/unixodbc/include or /usr/local/opt/unixodbc/include (if you have installed Homebrew in the default location).

@kylecordes
Copy link
Author

Thank you, this is both excellent and very helpful. I wonder if there is some way to explain this in the running software or the documentation. It might already be there, though I looked around for quite a while before entering the issue. Thanks again for your answer.

@UniqMartin
Copy link
Contributor

I wonder if there is some way to explain this in the running software or the documentation.

I'm not really sure what “this” is referring to, so feel free to provide a bit more context. But generally you can have a look at brew info <formula> and it will list all installed versions of that formula, including the paths they are installed to. Everything belonging to a certain version of a given formula is located in its prefix, that you can learn by issuing brew --prefix <formula>. The Formula Cookbook primarily addresses formula authors, but also starts off with some terminology and some overview of relevant formula paths in Homebrew. (Maybe that's the documentation you were looking for?)

@kylecordes
Copy link
Author

By "this", I mean that I searched everything I could find about homebrew quite extensively, looking for information about headers or "dev" packages. I could not find anything. Perhaps I overlooked it, but my suggestion was that the information you gave above, which is that brew already automatically provides those files and therefore does not need any extra packages, is fantastic information that I wish had been easy to find and obvious when I was looking for it.

@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question An open question
Projects
None yet
Development

No branches or pull requests

2 participants