Bug 205981 - irc/weechat: Build fails (package phase) against Python 3.5
Summary: irc/weechat: Build fails (package phase) against Python 3.5
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords: easy, needs-patch, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2016-01-06 19:36 UTC by VK
Modified: 2016-10-09 11:22 UTC (History)
4 users (show)

See Also:
vlad-fbsd: maintainer-feedback-


Attachments
WeeChat build log (63.94 KB, text/plain)
2016-01-06 19:36 UTC, VK
no flags Details
Restrict weechat's Python dependency to 2.7 (452 bytes, patch)
2016-06-04 11:19 UTC, VK
koobs: maintainer-approval-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VK freebsd_triage 2016-01-06 19:36:09 UTC
Created attachment 165179 [details]
WeeChat build log

WeeChat doesn't build against Python 3.5, fails in the package phase. Attached is the Poudriere build log. I am currently pressed with time but will take a look into it and see if I can come up with a patch later, unless someone beats me to it :)

I'm guessing same thing that happens in bug #205859 and/or bug #205807
Comment 1 VK freebsd_triage 2016-01-06 19:38:07 UTC
I forgot to mention, this is if PYTHON is enabled in options, of course.
Comment 2 VK freebsd_triage 2016-06-04 11:19:14 UTC
Created attachment 171003 [details]
Restrict weechat's Python dependency to 2.7

I took a deeper look into it. One solution would be to --enable-python3 and fix the plist for different python.so, in case the port is being built against Python 3.x, but Weechat's configure.ac seems to discourage it, with capital "NOT recommended" :)

So I'm proposing this port be limited to 2.7, until the upstream is okay with Python 3, I suppose. It already depends on 2.7 through asciidoc.

Passes portlint. Builds with poudriere under 10.3, with DEFAULT_VERSIONS= python=3.5 python3=3.5. Also with python 3.4.

Haven't tested with a FreeBSD 9 jail.
Comment 3 VK freebsd_triage 2016-06-04 11:21:12 UTC
CC python@ as well.
Comment 4 VK freebsd_triage 2016-06-20 09:51:07 UTC
Comment on attachment 171003 [details]
Restrict weechat's Python dependency to 2.7

Maintainer timeout, implicit approval.
Comment 5 VK freebsd_triage 2016-06-20 09:51:34 UTC
Feedback timeout, back to the pool...
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2016-06-20 11:20:23 UTC
@Vladimir, did you come across documentation/notes that weechat only works with 2.7? If so, can you include it here for maintainer (and future people) reference please, and I'll include it in the commit message
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2016-06-20 11:43:13 UTC
Also let's investigate a few things first, as I'm not sure explicitly disallowing Python 3.x builds entirely is the way to go without more information:

- Make the build verbose (so we can see full compile/link lines)
- Determine why the weechat Python plugin shared library isn't being created
- Given the dependencies of weechat install both Python 2.x and 3.x, whether the weechat build process is getting confused, doing something bizzare, or just needs some more information to see the right Python

At the moment, given the weechat configure script has an explicit and separate option for python3, granted 'not recommended', the right course of action seems to be:

- Warn the user (as the configure script comment does)
- Have the port do the right thing to build with Python 2.x or Python 3.x (pass the right args) without requiring an OPTION depending on what the user has asked for
Comment 8 VK freebsd_triage 2016-06-20 12:12:41 UTC
The "NOT recommended" comment is in the configure.ac in $WRKSRC, but also here:

https://github.com/weechat/weechat/blob/master/configure.ac#L149

I'll check if we can make it work with python3 or provide better feedback why not.
Comment 9 VK freebsd_triage 2016-06-21 21:15:05 UTC
At the moment, my recommendation to limit this to Python 2.7 remains. WeeChat currently does not work adequately with Python 3, and the upstream discourages it.
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2016-06-23 06:00:41 UTC
Thanks Vladimir. In the case where Python 3.x support is intended but broken, the change that should be implemented is:

- Add relevant (missing) bits for Python 3.x (eg: CONFIGURE_ARGS, etc)
- Leave USES=python intact (support is intended, but not working/broken)
- Set BROKEN when PYTHON_REL is a version of Python 3.x, with an informative message
- Ideally BROKEN entry is commented with a link to a reported upstream issue, such that it isn't forgotten, and removed when fixed
Comment 11 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-30 10:59:52 UTC
Comment on attachment 171003 [details]
Restrict weechat's Python dependency to 2.7

maintainer-approval - (post review by me) and obsolete (needs new patch)
Comment 12 commit-hook freebsd_committer freebsd_triage 2016-10-04 21:07:49 UTC
A commit references this bug:

Author: brnrd
Date: Tue Oct  4 21:07:01 UTC 2016
New revision: 423303
URL: https://svnweb.freebsd.org/changeset/ports/423303

Log:
  irc/weechat: Update to 1.6

    - Update to 1.6
    - Take maintainership
    - OPT_CMAKE_ON= -DENABLE_OPT=yes to OPT_CMAKE_BOOL= OPT
    - Add LICENSE_FILE
    - Drop BSD_LUA_* extra CMAKE_ARGS
    - Add asciidoctor depend for DOCS and MANPAGES
    - Fix build with Python 3.5 / Add warning
    - Transform to post-patch-ICON-off target

  PR:		205981
  Reported by:	Vladimir Krstulja <vlad-fbsd@acheronmedia.com>

Changes:
  head/irc/weechat/Makefile
  head/irc/weechat/distinfo
  head/irc/weechat/files/patch-CMakeLists.txt
  head/irc/weechat/files/patch-cmake_FindIconv.cmake
  head/irc/weechat/files/patch-cmake_FindLua.cmake
  head/irc/weechat/files/patch-cmake_FindPython.cmake
  head/irc/weechat/files/patch-cmake_FindRuby.cmake
  head/irc/weechat/files/patch-cmake_FindTCL.cmake
  head/irc/weechat/files/patch-src_core_CMakeLists.txt
  head/irc/weechat/pkg-plist