I found out that I have some Eigen file in /usr/include/eigen3/...

Is Eigen provided by deafult with XCode 4.3 or were them installed by me with a package manager like macport or homebrew?

I'm asking it because I'd like to remove them and build a new installation.


  • 1
    What is Eigen? Can you edit your question to include a link to information about this application? – user9290 Apr 18 '12 at 13:32

Try to do something like

pkgutil --file-info /usr/include/eigen3/your.file

That will return where the file comes from...

For instance (I do not have eigen3 in /usr/include):

$ pkgutil --file-info /usr/include/cups/ppd.h
volume: /
path: /usr/include/cups/ppd.h
pkgid: com.apple.pkg.DevSDKLeo

Let me add, Macports would not install anything in /usr/include (unless there is a bug OR You told it do so by doing a custom install). I do not use Homebrew so I cannot comment on where it keeps the files it installs.

In any case, I have Lion, XCode 4.3.2 with the Command Line tools installed, and do not have eigen3 in /usr/include

| improve this answer | |
  • Wow, cool! I didn't know about pkgutil --file-info... it's like magic! – jtbandes Apr 18 '12 at 15:36

For the record Homebrew should have installed the eigen3 header into /usr/local/include/eigen3/. According to HomeBrew FAQ the default install location is:


Unless further customization was performed, it does not seem like eigen3 in your case was installed by a default configuration of HomeBrew nor MacPorts as noted by user1256923.

After looking at a Mac with Lion and no Xcode installed there is currently no include directory at the /usr/include path. So you should be safe to remove it and rebuild.

Additionally, Xcode 4.3.2 is self contained as observed by Install the Command Line C Compilers in OS X Lion

Which means that Apple is installing things Xcode needs within the Xcode application package so in this case its safe to say that eigen3 is not needed by Xcode. For example gcc and everything else Xcode needs is located within its package at the following path:


In order to get compiling tools back for things other than Xcode's back into '/usr' you will need to install the Xcode Command Line tools in order to make any changes in the /usr directory.

As noted by The MacObserver here is how to install the Command Line Tools:

After launching Xcode, go to Preferences and select the Downloads pane, then Components. There, in the list of candidate items, one will be the Command line tools. Click “Install.”

Xcode's Command Line Tools

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .