R depends on gettext to fix build issue. #18198
Conversation
I came across this yesterday---R doesn't actually need So, we have to find a way to ensure |
In most cases we always use our cairo, to prevent situations where something has transitive dependencies on cairo from Homebrew and x11. |
In this case, R needs to be built against X11 as there is a small galaxy of R packages that expect it to be there. So, it looks like we could solve this by doing something like:
But, that seems redundant. |
That's how we've been doing it; see gtk+, for example. |
Also, another thing to note is that when I observed this issue the problem wasn't that
The problem was that |
If it's installed and/or with the option specified. When we don't require X for a package to function we shouldn't require it by default (@mxcl agreed with me on this) as users don't have it on 10.8. |
R is one of those cases where X11 is really not optional. The official R build ships with X11 support and there is a metric ton of R packages out there that use it. Switching it off by default would result in a stream of confused statisticians wandering around the issue tracker asking why their code no longer works. |
Cairo isn't in R's dependency tree. Where is it picking it up from? |
On Mar 3, 2013 2:44 PM, "Misty De Meo" notifications@github.com wrote:
I was wondering the same thing. Shouldn't superenv have it taken care of?
|
I think it pulls the Cairo info from |
cairo isn't keg-only on 10.8, so it's pkg-config file can be located through HOMEBREW_PREFIX/lib/pkgconfig, which is baked into the pkg-config binary. |
It still sounds optional to me. Our XQuartz handling on 10.8 is not nice; you are halted in your tracks and told to go and install some software from a DMG. Feel free to print a large warning or whatever but it should compile even if you don't have X11 installed. |
The wierd part is that I can no longer re-produce this on the box that was exhibiting the issue after ripping cairo out and reinstalling. It may be that this behavior only happens on machines where the cairo/gettext installation is old and crusty. |
But if you are an R user who expects X11 support to be there (the majority of R users) then you are halted in your tracks (possibly months later when something mysteriously fails) and have to re-install R Furthermore, even if we drop |
On Sun, Mar 3, 2013 at 3:25 PM, Charlie Sharpsteen <notifications@github.com
—
|
* Otherwise it fails to link due to "missing -lintl".
Changed to depends on 'cairo' as suggested. |
Adding "cairo" worked for installation but now trying to install any R package results in the same "missing -lintl" message. |
To get package installation to work, I did a |
So now it looks like the real fix should be in pkg-config, which should pick up cairo in X11/XQuartz instead of the one in Homebrew. |
Nope, it is our policy to always use Homebrew's cairo to keep things consistent. This is why, for example, gtk+ depends on Homebrew's cairo even though it depends on X11 as well. |
On Fri, Mar 8, 2013 at 1:07 PM, Jack Nagel notifications@github.com wrote:
But AIUI the problem with homebrew's cairo is that it is keg_only, Also, just curious, originally homebrew tried to avoid duplication
|
Not everyone has the most up-to-date XQuartz release. Some software in Homebrew won't build with older cairo. We started using only Homebrew's cairo to maintain consistency, and avoid situations where things are transitively linked against two different versions of cairo. |
Now I see. For this particular problem, I'd assume the proper fix is still #18243, no? |
Thinking about it, yes. I just want it to be clear why the current behavior exists and is the right thing for most situations. |
On Fri, Mar 8, 2013 at 2:02 PM, Jack Nagel notifications@github.com wrote:
Cool. Thanks for the clarification.
|
Patch to wrangle pkg-config here: https://github.com/jacknagel/homebrew/compare/pkgconfig |
Pushed; pkg-config should no longer be able to pick up non-deps under superenv. Hopefully that means this is resolved. |
@jacknagel retried building r and worked. Thanks for your work. |
Unfortunately the failed build log was erased by the successful build. It shouldn't happen.