Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Updates weechat to 0.4.1 and fixes python support #20025

Closed
wants to merge 1 commit into from
Closed

Updates weechat to 0.4.1 and fixes python support #20025

wants to merge 1 commit into from

Conversation

chadcatlett
Copy link
Contributor

This patch upgrades weechat to 0.4.1 as well as fixing the cmake issues that lead to python errors as reported in #19300 and #19168.

Basically cmake is searching a cmake defined list of paths as well as the ones that weechat's cmake scripts define. This is leading to both system and brewed versions of python being picked up together.

FIND_PROGRAM(PYTHON_EXECUTABLE
NAMES python2.7 python2.6 python2.5 python
- PATHS /usr/bin /usr/local/bin /usr/pkg/bin
+ PATHS /usr/local/bin /usr/bin /usr/pkg/bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't accommodate non-/usr/local installs of Homebrew. Perhaps you can add in something like @@HOMEBREW_PREFIX@@ in the first entry that can be updated via inreplace in the install method?

@chadcatlett
Copy link
Contributor Author

i'll update things appropriately

@mistydemeo
Copy link
Contributor

The HOMEBREW_PREFIX string still needs to get expanded into the real string somewhere. Since the patch is in the __END__ block, string interpolation is not happening to it.

Can you add an inreplace 'FindPython.cmake', 'HOMEBREW_PREFIX', HOMEBREW_PREFIX line to the install method please?

@chadcatlett
Copy link
Contributor Author

The line that adamv referenced in patches.rb#L137 does the substitution in the DATA/END block. I've verified it with install --interactive, the file is patched correctly.

@adamv
Copy link
Contributor

adamv commented May 24, 2013

Pulled, thanks!

@adamv adamv closed this in 774a779 May 24, 2013
@Julian
Copy link
Contributor

Julian commented May 24, 2013

This doesn't appear to fix anything for me Python-wise, I get the same compilation error. Is it working for someone?

@chadcatlett
Copy link
Contributor Author

@Julian which compilation error are you referring to?

@Julian
Copy link
Contributor

Julian commented May 24, 2013

Sorry, my mistake. The ones which I thought were in one of those two tickets, where weechat was failing to link properly against homebrewed Python:

It looks like both of those tickets were referring to the stdlib issues though, apologies, this wasn't meant to address the linking issues then, is that someplace else that you saw, it was being discussed on IRC but maybe no one filed a ticket for it.

 Linking C shared module python.so
brew: superenv removed: -Wall -W -Werror-implicit-function-declaration
Undefined symbols for architecture x86_64:
  "_PyLong_Check", referenced from:
      _weechat_python_exec in weechat-python.o
  "_PyString_Check", referenced from:
      _weechat_python_dict_to_hashtable in weechat-python.o
      _weechat_python_exec in weechat-python.o
  "_PyUnicode_AsUTF8String", referenced from:
      _weechat_python_unicode_to_string in weechat-python.o
  "_PyUnicode_Check", referenced from:
      _weechat_python_exec in weechat-python.o
  "_PyUnicode_FromString", referenced from:
      _weechat_python_init_module_weechat in weechat-python.o
  "__Py_InitPyPyModule", referenced from:
      _weechat_python_init_module_weechat in weechat-python.o
      _weechat_python_load in weechat-python.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/plugins/python/python.so] Error 1
make[1]: *** [src/plugins/python/CMakeFiles/python.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking C shared module tcl.so
brew: superenv removed: -Wall -W -Werror-implicit-function-declaration
[ 65%] Built target tcl
make: *** [all] Error 2
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: b8e7f3cd15fe87be4f56bca4c633396037a7a670
CPU: dual-core 64-bit penryn
OS X: 10.8.3-x86_64
Xcode: 4.6.2
CLT: 4.6.0.0.1.1365549073
X11: 2.7.4 => /opt/X11
==> ENV
HOMEBREW_CC: clang
MAKEFLAGS: -j2
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/opt/libtasn1/lib/pkgconfig:/usr/local/opt/p11-kit/lib/pkgconfig:/usr/local/opt/nettle/lib/pkgconfig:/usr/local/opt/gnutls/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.8
ACLOCAL_PATH: /usr/local/share/aclocal
OBJC: cc
PATH: /usr/local/Library/ENV/4.3:/usr/local/opt/cmake/bin:/usr/local/opt/libtasn1/bin:/usr/local/opt/p11-kit/bin:/usr/local/opt/nettle/bin:/usr/local/opt/gnutls/bin:/usr/local/opt/libgpg-error/bin:/usr/local/opt/libgcrypt/bin:/usr/local/opt/aspell/bin:/usr/local/opt/python/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: weechat did not build

handyman5 pushed a commit to handyman5/homebrew that referenced this pull request Oct 7, 2013
* fixes CMake Python detection

Fixes Homebrew#19168.
Closes Homebrew#20025.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
@chadcatlett chadcatlett deleted the weechat_0.4.1 branch January 14, 2014 15:02
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants