Bug 212446 - www/mod_python35 cannot build against python3
Summary: www/mod_python35 cannot build against python3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Olli Hauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-07 02:19 UTC by George Michaelson
Modified: 2016-09-17 18:19 UTC (History)
1 user (show)

See Also:


Attachments
cd /usr/ports/www/mod_python35 && make clean && make (53.17 KB, text/plain)
2016-09-07 02:19 UTC, George Michaelson
no flags Details
cd /usr/ports/www/mod_python35 && make clean && make after making -lpython3 symlink (63.38 KB, text/plain)
2016-09-07 02:20 UTC, George Michaelson
no flags Details
cd /usr/ports/www/mod_python35 && make clean && make install after symlink but fails due to .pyc/.pyo handling (4.79 KB, text/plain)
2016-09-07 02:21 UTC, George Michaelson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description George Michaelson 2016-09-07 02:19:55 UTC
Created attachment 174459 [details]
cd /usr/ports/www/mod_python35 && make clean && make

www/mod_python35 cannot build against python3.

Two bugs. 

Bug 1: it expects -lpython3 when the installed library is -lpython3.5m

Bug 2: handling of .pyc and .pyo files during make install doesn't recognize the python3 sub-directory model of cypython compile during the make phase and so fails to install named objects listed in pkg-plist

attachment make-lpython3 documents first problem.

attachment make.log documents compile phase with symlink to make -lpython3 work

attacmnent make-install.log documents make install failure.

all run on a clean jail made from FreeBSD10.3 updated.

FreeBSD maate.rand.apnic.net 10.1-RELEASE-p5 FreeBSD 10.1-RELEASE-p5 #0: Tue Jan 27 08:55:07 UTC 2015     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
Comment 1 George Michaelson 2016-09-07 02:20:44 UTC
Created attachment 174460 [details]
cd /usr/ports/www/mod_python35 && make clean && make after making -lpython3 symlink
Comment 2 George Michaelson 2016-09-07 02:21:30 UTC
Created attachment 174461 [details]
cd /usr/ports/www/mod_python35 && make clean && make install after symlink but fails due to .pyc/.pyo handling
Comment 3 George Michaelson 2016-09-07 02:26:33 UTC
I had to set make.conf DEFAULT_VERSIONS= python=3.5 because the Mk/ requested preferred versions puts 2.7 before any 3 version of Python and this causes the port to install Python2.7

If the port is actually wired *on FreeBSD* to version 2.7 it should be set explicitly in the port. Depending on a system wide setting feels wrong.

in 2013 mod_python was released including support for python3. So wiring this to 2 on FreeBSD is not good IMO
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-09-17 18:14:06 UTC
A commit references this bug:

Author: ohauer
Date: Sat Sep 17 18:13:35 UTC 2016
New revision: 422338
URL: https://svnweb.freebsd.org/changeset/ports/422338

Log:
  - limit python version to 2.7
  - re- generate mod_python33 patch files

  PR:		212446
  Reported by:	George Michaelson

Changes:
  head/www/mod_python33/Makefile
  head/www/mod_python33/files/patch-configure
  head/www/mod_python33/files/patch-src__connobject.c
  head/www/mod_python35/Makefile
Comment 5 Olli Hauer freebsd_committer freebsd_triage 2016-09-17 18:19:34 UTC
Thanks for the report!

The Makefile's are changed to request explicit python:2.7