-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Brewing glib is wonky. #11
Comments
I believe the GUI popups are unavoidable, I've seen it outside of Homebrew, it's usually fine. Configure does a lot of stuff and plenty of it is writing little programs that crash, and the crash means the configure failed. etc. But indeed, I don't think glib and gettext are building yet, or if they are, it's badly. I added them a long time ago because I wanted wireshark and it wasn't easy so I just commited what was there. I'll check them out again, I'm sure we'll get to the bottom of it. I'll leave this open when we finish anyway because the GUI popups suck and maybe there is a solution. I gotta say, I never saw it with macports. |
More info, brewing wget is similarly wonky. It's the configure's use of xgettext, which links lib-gettext-something, which defines an extern char ** _environ which doesn't exist on OS X. Some sort of patch to gettext might be in order, if we want to "go there"; I don't particularly want to go there, so much as being able to brew wget. (I suspect that if I didn't have gettext installed, then wget would brew fine and just not use gettext...) |
This I don't get as I can brew both wget and glib just fine, although I do get the GUI popup error -- but it doesn't stop the brew. Do they brew successfully if you remove GNU gettext? |
So it turns out that, for me at least, a ton of stuff breaks during compile if gettext is linked, and works if I unlink it first (but then have to remember to re-link it for sshfs.) The errors seem entirely due to the xgettext and msgfmt helper apps being invoked doing ./configure or make or make install. |
I think it's clear we need to keep gettext unlinked by default. Handy that Homebrew can do this :) Wonder what Macports does? |
This patch fixed the issue for me on 10.5 and 10.6. Woot! |
All Gettext binaries fail at runtime with linking problems related to the environ variable. According to <http://www.mail-archive.com/bug-gnulib@gnu.org/msg09272.html> the environ variable is missing from some platforms (between them MacOS X), and autoconf test for it, and sets HAVE_ENVIRON_DECL accordingly. A common workaround was declaring "extern char** environ" in the code if the OS didn't provide the environ variable, but that doesn't work since 10.5. Since then you have to use _NSGetEnviron() function declared in crt_externs.h. This workaround works at least since 10.3. t Signed-off-by: Max Howell <max@methylblue.com> Closes Homebrew#11
All Gettext binaries fail at runtime with linking problems related to the environ variable. According to <http://www.mail-archive.com/bug-gnulib@gnu.org/msg09272.html> the environ variable is missing from some platforms (between them MacOS X), and autoconf test for it, and sets HAVE_ENVIRON_DECL accordingly. A common workaround was declaring "extern char** environ" in the code if the OS didn't provide the environ variable, but that doesn't work since 10.5. Since then you have to use _NSGetEnviron() function declared in crt_externs.h. This workaround works at least since 10.3. t Signed-off-by: Max Howell <max@methylblue.com> Closes Homebrew#11
All Gettext binaries fail at runtime with linking problems related to the environ variable. According to <http://www.mail-archive.com/bug-gnulib@gnu.org/msg09272.html> the environ variable is missing from some platforms (between them MacOS X), and autoconf test for it, and sets HAVE_ENVIRON_DECL accordingly. A common workaround was declaring "extern char** environ" in the code if the OS didn't provide the environ variable, but that doesn't work since 10.5. Since then you have to use _NSGetEnviron() function declared in crt_externs.h. This workaround works at least since 10.3. t Signed-off-by: Max Howell <max@methylblue.com> Closes Homebrew#11
I tried to brew glib, but it depends on gettext, so I brewed gettext first.
Then I tried to brew glib again, and it apparently worked, but during the "configure" phase I got two "This app has unexpectedly..." dialogs that I had to ignore.
This is OS X 10.5.8, on a Mac Pro.
Both messages are: """
The application msgfmt quit unexpectedly.
Symbol not found: _environ
Referenced from: /usr/local/Cellar/gettext/0.17/lib/libgettext-0.17.dylib
Expected in: dynamic lookup
"""
Expected: no GUI pops up while I'm brewing.
Note that brewing continued unabated in the background.
The text was updated successfully, but these errors were encountered: