Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Weechat 0.4.0 failed to build on 10.6.8 #18722

Closed
pavellishin opened this issue Mar 25, 2013 · 23 comments
Closed

Weechat 0.4.0 failed to build on 10.6.8 #18722

pavellishin opened this issue Mar 25, 2013 · 23 comments

Comments

@pavellishin
Copy link

Weechat 0.4.0 failed to build on OS X 10.6.8

[2013-03-25 11:09:09] pavel@austin:~
# brew doctor
Your system is raring to brew.
[2013-03-25 11:13:34] pavel@austin:~
# brew install weechat
==> Downloading http://www.weechat.net/files/src/weechat-0.4.0.tar.bz2
######################################################################## 100.0%
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/weechat/0.4.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DPREFIX=/usr/local/Cellar/weechat/0.4.0 -DENABLE_GTK=OFF -DENABLE_LUA=OFF -DENABLE_PERL=OFF -DENABLE_RUBY=OFF -DENABLE
==> make install
[  8%] Compiling locales (pt_BR)
1082 translated messages, 208 fuzzy translations, 493 untranslated messages.
1783 translated messages.
[  8%] Built target translations
make: *** [all] Error 2

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

[2013-03-25 11:18:56] pavel@austin:~

As per weechat's actual author, adding a flag to disable translations fixed the issue.

args << '-DENABLE_NLS=OFF'

but I'm not sure if that should be in the default formula, since it compiled just fine on 10.7.5

@mistydemeo
Copy link
Member

Looks like it's not finding gettext, despite it being a dependency:

/tmp/weechat-Ip8w/weechat-0.4.0/src/core/weechat.h:35:29: error: libintl.h: No such file or directory
/tmp/weechat-Ip8w/weechat-0.4.0/src/core/weechat.c: In function ‘weechat_display_copyright’:
/tmp/weechat-Ip8w/weechat-0.4.0/src/core/weechat.c:110: error: implicit declaration of function ‘gettext’

@mistydemeo
Copy link
Member

As per weechat's actual author, adding a flag to disable translations fixed the issue.

Is this a public conversation? I'd be interested in seeing. Not sure why this would be better on 10.7.

@pavellishin
Copy link
Author

Pinged author, hopefully he'll join the conversation.

So, this still means that it's a homebrew bug, right, if gettext isn't being found? Or does it mean that weechat itself might be looking in the wrong place?

(I have basically zero experience with C.)

@mistydemeo
Copy link
Member

I don't think this is a homebrew bug. From the CMakeCache, it appears to correctly find libintl and the prefix it's installed to.

If you have access to a 10.7/10.8 box to test on, can you confirm whether this happens if you do brew install weechat --env=std?

@pavellishin
Copy link
Author

I'll do it in a bit, I need to update XCode apparently, and that'll probably take an hour.

@pavellishin
Copy link
Author

Nailed it, took an hour with zero feedback on what it was doing the whole time. Jobs is spinning in his grave.

Anyway: compiled fine on OS X 10.7.5.

[2013-03-25 18:20:47] pavel@addison:/usr/local
# brew doctor
Your system is raring to brew.
[2013-03-25 18:21:02] pavel@addison:/usr/local
# uname -a
Darwin addison 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
[2013-03-25 18:21:08] pavel@addison:/usr/local
# brew install weechat
==> Downloading http://www.weechat.net/files/src/weechat-0.4.0.tar.bz2
Already downloaded: /Users/pavel/Library/Caches/Homebrew/weechat-0.4.0.tar.bz2
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/weechat/0.4.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DPREFIX=/usr/local/Cellar/weechat/0.4.0 -DENABLE_GTK=OFF -DENABLE_LUA=OFF -DENABLE_PERL=OFF -DENABLE_RUBY=OFF -DENABLE_PYTHON=OFF -DENAB
==> make install
==> Caveats
Weechat can depend on Aspell if you choose the --aspell option, but
Aspell should be installed manually before installing Weechat so that
you can choose the dictionaries you want.  If Aspell was installed
automatically as part of weechat, there won't be any dictionaries.
==> Summary
[unicode beer mug here]  /usr/local/Cellar/weechat/0.4.0: 29 files, 4.0M, built in 32 seconds
[2013-03-25 18:21:43] pavel@addison:/usr/local

Damn, just realized that it doesn't wrap horizontal lines, so all the cmake options aren't visible. :/

@mistydemeo
Copy link
Member

Testing it on Lion, it looks like it's broken with --env=std, and only works correctly with superenv.

@samueljohn
Copy link
Contributor

Damn, just realized that it doesn't wrap horizontal lines, so all the cmake options aren't visible. :/

Scroll it, baby :-)

@adamv
Copy link
Contributor

adamv commented Mar 26, 2013

@samueljohn INVISIBLE SCROLL BAR

@samueljohn
Copy link
Contributor

@adamv TOUCHE

@pavellishin
Copy link
Author

Yeah, I don't think that there's such a thing as horizontal scrolling in Terminal/iTerm2, is there?

In any case, re-ran the install on 10.6.8, with full flags, and it worked fine:

[2013-03-26 16:28:53] pavel@austin:~
# brew doctor
Your system is raring to brew.
[2013-03-26 16:29:10] pavel@austin:~
# brew install weechat
==> Downloading http://www.weechat.net/files/src/weechat-0.4.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/weechat-0.4.0.tar.bz2
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/weechat/0.4.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DPREFIX=/usr/local/Cellar/weechat/0.4.0 -DENABLE_GTK=OFF -DENABLE_LUA=OFF -DENABLE_PERL=OFF -DENABLE_RUBY=OFF -DENABLE_PYTHON=OFF -DENABLE_ASPELL=OFF -DENABLE_GUILE=OFF -DENABLE_NLS=OFF ..
==> make install
==> Caveats
Weechat can depend on Aspell if you choose the --aspell option, but
Aspell should be installed manually before installing Weechat so that
you can choose the dictionaries you want.  If Aspell was installed
automatically as part of weechat, there won't be any dictionaries.
==> Summary
/usr/local/Cellar/weechat/0.4.0: 19 files, 1.9M, built in 73 seconds
[2013-03-26 16:30:32] pavel@austin:~

Also realized that I left off the --env=std flag on 10.7.5, so here's that:

[2013-03-26 16:33:25] pavel@addison:~
# brew install weechat --env=std
==> Downloading http://www.weechat.net/files/src/weechat-0.4.0.tar.bz2
Already downloaded: /Users/pavel/Library/Caches/Homebrew/weechat-0.4.0.tar.bz2
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/weechat/0.4.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DPREFIX=/usr/local/Cellar/weechat/0.4.0 -DENABLE_GTK=OFF -DENABLE_LUA=OFF -DENABLE_PERL=OFF -DENABLE_RUBY=OFF -DENABLE_PYTHON=OFF -DENABLE_ASPELL=OFF -DENABLE_GUILE=OFF ..
==> make install
1783 translated messages.
[ 44%] Built target translations
Linking C shared module irc.so
[ 44%] Built target irc
make: *** [all] Error 2

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

@mistydemeo - what does the --env flag do?

@mistydemeo
Copy link
Member

@pavellishin Homebrew has two build environments. On Xcode 4.3 and later, the default build environment is superenv, which was introduced in August. It wraps the compilers and controls which flags get through; it also sandboxes the build as much as possible, so that only explicitly declared dependencies are available. stdenv is the old build environment, which calls the compilers directly and has less control over misbehaving build systems.

This suggests to me that cmake isn't passing the correct -I flags for gettext/libintl; superenv passes them to the real compiler even though cmake didn't ask for it, since gettext is a declared dependency.

@mistydemeo
Copy link
Member

(The reason you're getting the build failure on 10.6.8 is because stdenv is the only build environment available on Xcode 4.2 and lower.)

@scifisamurai
Copy link

@mistydemeo I'm having the same issue on 10.6.8. I added @pavellishin's fix to the Formula file and that worked. Are you saying that this is expected behavior on 10.6.8?

@mistydemeo
Copy link
Member

@pavellishin's fix is a workaround; the bug seems to be in Weechat.

I'll pull a fix but this should be reported to the Weechat developers. @pavellishin, did you let him know about what was found in the thread here?

@mistydemeo
Copy link
Member

@pavellishin Did you file an issue on weechat's tracker?

@pavellishin
Copy link
Author

I did not, but I will - I'm sort of emailing back and forth, trying to fix another issue.

@pavellishin
Copy link
Author

Err... well, I can't figure out how to file a bug, but I'll ask him via e-mail.

@mistydemeo
Copy link
Member

Weechat's issue tracker is on Savannah: https://savannah.nongnu.org/bugs/?group=weechat

@pavellishin
Copy link
Author

I know, I just literally can't find the thing to click to create a new bug. (Full disclosure, I may be dumb.)

@mistydemeo
Copy link
Member

Yeah, it's hardly the most intuitive interface.

Hover over Bugs at the top, there's a "Submit" option.

mistydemeo added a commit that referenced this issue Apr 2, 2013
@mistydemeo
Copy link
Member

I've pushed a workaround by removing NLS and the gettext dependency. They'll be reenabled pending whatever we find from the developer.

@adamv
Copy link
Contributor

adamv commented Apr 13, 2013

Tagging this as an upstream issue and closing it.

@adamv adamv closed this as completed Apr 13, 2013
MikeMcQuaid pushed a commit that referenced this issue Dec 27, 2014
Devel version, returned the ` gettext ` dep that was removed in #18722
but is now functional again, prunes the redundant ` -DENABLE_GTK=OFF `
option as it’s not a valid option any more and reformats the args.

Closes #35280.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants