Bug 229629 - textproc/py-pystemmer: Fails to build with Python 3.7 (@py37)
Summary: textproc/py-pystemmer: Fails to build with Python 3.7 (@py37)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo G. Baio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-09 08:50 UTC by Pascal Christen
Modified: 2018-07-11 19:18 UTC (History)
5 users (show)

See Also:


Attachments
Log of failed build (10.27 KB, text/plain)
2018-07-09 08:50 UTC, Pascal Christen
no flags Details
Makefile patch to force cythoning (1.02 KB, patch)
2018-07-11 05:40 UTC, Charlie Li
ml+freebsd: maintainer-approval? (dbaio)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Christen 2018-07-09 08:50:08 UTC
Created attachment 194984 [details]
Log of failed build

Hi

It fails to build for me for python37 on 10.4-RELEASE-p9 poudriere jail
Comment 1 Kai Knoblich freebsd_committer 2018-07-09 10:56:16 UTC
(In reply to Pascal Christen from comment #0)

Hello Pascal,

thank you for your report and the attached build log. The reason for those build failures (reported also in PR #229633 + #229632) is, that the base SSL from FreeBSD 10.4 lacks a specific feature because it's simply too old.

One can verify this by building Python 3.7 on 10.4:

> [...]
> checking whether compiling and linking against OpenSSL works... yes
> checking for X509_VERIFY_PARAM_set1_host in libssl... no
> checking for --with-ssl-default-suites... openssl
> [...]

On newer Platforms the X509_VERIFY_PARAM_set1_host feature is available.

To remedy this problem you may try openssl/libressl from the ports tree and compile Python 3.7 with it.

I haven't tested the solution so far but it could work.
Comment 2 Pascal Christen 2018-07-09 11:24:24 UTC
(In reply to Kai from comment #1)

Log from building python3.7 with openssl:
> [...]
> checking whether compiling and linking against OpenSSL works... yes
> checking for X509_VERIFY_PARAM_set1_host in libssl... yes
> checking for --with-ssl-default-suites... python
> [...]
Comment 3 Kai Knoblich freebsd_committer 2018-07-09 12:38:57 UTC
(In reply to Pascal Christen from comment #2)

First: I'm sorry because did a mistake between the PRs. My comment from above was meant either for PR #229633 (www/py-tornado) or PR #229632 (net/py-libcloud).

Please a look here for tracking the SSL issue with Python 3.7: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229640

The problem with textproc/py-stemmer seems to be an upstream issue.
Comment 4 Pascal Christen 2018-07-09 13:19:19 UTC
(In reply to Kai from comment #3)
Hei Kai

Yes, I noticed it. I solved the other problems. Now it's just pystemmer which doesn't work with python37.

Greetings
Comment 5 Charlie Li 2018-07-11 05:00:14 UTC
This was filed upstream. Currently waiting on feedback from the submitter to PyPi.

https://github.com/snowballstem/pystemmer/issues/18
Comment 6 Charlie Li 2018-07-11 05:40:22 UTC
Created attachment 195043 [details]
Makefile patch to force cythoning

setup.py contains a conditional checking if it can import cython. If not, the included (but stale) src/Stemmer.c is used. Add in cython as a build dependency to force regeneration of the C file from the actual source src/Stemmer.pyx. Also bump PORTREVISION to reflect possible differences between included and regenerated src/Stemmer.c.

Passes testport.
Comment 7 commit-hook freebsd_committer 2018-07-11 19:15:56 UTC
A commit references this bug:

Author: dbaio
Date: Wed Jul 11 19:15:15 UTC 2018
New revision: 474476
URL: https://svnweb.freebsd.org/changeset/ports/474476

Log:
  textproc/py-pystemmer: Fix build with Python 3.7

  setup.py contains a conditional checking if it can import cython. If not, the
  included (but stale) src/Stemmer.c is used. Add in cython as a build dependency
  to force regeneration of the C file from the actual source src/Stemmer.pyx.
  Also bump PORTREVISION to reflect possible differences between included and
  regenerated src/Stemmer.c.

  https://github.com/snowballstem/pystemmer/issues/18

  PR:		229629
  Submitted by:	Charlie Li <ml+freebsd@vishwin.info>
  Reported by:	Pascal Christen <pascal.christen@hostpoint.ch>

Changes:
  head/textproc/py-pystemmer/Makefile
Comment 8 Danilo G. Baio freebsd_committer 2018-07-11 19:18:45 UTC
Committed, thank you all.