Weechat 0.4.0 failed to build on 10.6.8 #18722

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

Projects

None yet

5 participants

@pavellishin

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

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

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

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

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

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

@pavellishin

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

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

@samueljohn

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

Scroll it, baby :-)

@adamv

@samueljohn INVISIBLE SCROLL BAR

@pavellishin

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

@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

(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

@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

@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

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

@pavellishin

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

@pavellishin

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

@mistydemeo

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

@pavellishin

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

@mistydemeo

Yeah, it's hardly the most intuitive interface.

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

@mistydemeo mistydemeo added a commit that referenced this issue Apr 2, 2013
@mistydemeo mistydemeo weechat: disable gettext/NLS for now
This is a workaround for #18722.
b4e940a
@mistydemeo

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

@nesv nesv added a commit to nesv/homebrew that referenced this issue Apr 12, 2013
@mistydemeo mistydemeo weechat: disable gettext/NLS for now
This is a workaround for #18722.
2489e40
@adamv

Tagging this as an upstream issue and closing it.

@adamv adamv closed this Apr 13, 2013
@rajeeja rajeeja pushed a commit that referenced this issue Apr 19, 2013
@mistydemeo mistydemeo weechat: disable gettext/NLS for now
This is a workaround for #18722.
91f270b
@draftycode draftycode added a commit to draftycode/homebrew that referenced this issue Feb 24, 2014
@mistydemeo mistydemeo weechat: disable gettext/NLS for now
This is a workaround for #18722.
c0e18b9
@shelhamer shelhamer added a commit that referenced this issue Apr 18, 2014
@mistydemeo mistydemeo weechat: disable gettext/NLS for now
This is a workaround for #18722.
de8d7dd
@DomT4 DomT4 added a commit that referenced this issue Dec 27, 2014
@DomT4 DomT4 weechat 1.1-rc1 devel
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.
79eb462
@BrewTestBot BrewTestBot added a commit to BrewTestBot/homebrew that referenced this issue Dec 27, 2014
@DomT4 DomT4 weechat 1.1-rc1 devel
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.
4b14bd2
@DomT4 DomT4 added a commit that referenced this issue Dec 27, 2014
@DomT4 DomT4 weechat 1.1-rc1 devel
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.
c9a51e1
@DomT4 DomT4 added a commit that referenced this issue Dec 27, 2014
@DomT4 DomT4 weechat 1.1-rc1 devel
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.
7f39e73
@BrewTestBot BrewTestBot added a commit to BrewTestBot/homebrew that referenced this issue Dec 27, 2014
@DomT4 DomT4 weechat 1.1-rc1 devel
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.
357b324
@DomT4 DomT4 added a commit that referenced this issue Dec 27, 2014
@DomT4 DomT4 weechat 1.1-rc1 devel
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.
068d8f6
@BrewTestBot BrewTestBot added a commit to BrewTestBot/homebrew that referenced this issue Dec 27, 2014
@DomT4 DomT4 weechat 1.1-rc1 devel
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.
1840e70
@MikeMcQuaid MikeMcQuaid added a commit that referenced this issue Dec 27, 2014
@DomT4 DomT4 weechat 1.1-rc1 devel
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>
41ad0f8
@xu-cheng xu-cheng 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.