Bug 193261 - devel/glib20 doesn't support python3.2 (WAS: won't install - has plist/staging problems)
Summary: devel/glib20 doesn't support python3.2 (WAS: won't install - has plist/stagin...
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: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-02 19:07 UTC by Kevin Thompson
Modified: 2014-09-03 19:15 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Thompson 2014-09-02 19:07:33 UTC
`make build` of devel/glib20 succeeds, however the installation phase fails:

===>   Registering installation for glib-2.36.3_4
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__init__.pyc): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__init__.pyo): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/codegen.pyc): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/codegen.pyo): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/codegen_docbook.pyc): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/codegen_docbook.pyo): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/codegen_main.pyc): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/codegen_main.pyo): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/config.pyc): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/config.pyo): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/dbustypes.pyc): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/dbustypes.pyo): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/parser.pyc): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/parser.pyo): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/utils.pyc): No such file or directory
pkg-static: lstat(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/utils.pyo): No such file or directory
*** Error code 74



The plist expects the .py, .pyc, and .pyo files to be found for the codegen directory:

angst(/usr/ports/devel/glib20) # cat pkg-plist | grep codegen
bin/gdbus-codegen
share/glib-2.0/codegen/__init__.py
share/glib-2.0/codegen/__init__.pyc
share/glib-2.0/codegen/__init__.pyo
share/glib-2.0/codegen/codegen.py
share/glib-2.0/codegen/codegen.pyc
share/glib-2.0/codegen/codegen.pyo
share/glib-2.0/codegen/codegen_docbook.py
share/glib-2.0/codegen/codegen_docbook.pyc
share/glib-2.0/codegen/codegen_docbook.pyo
share/glib-2.0/codegen/codegen_main.py
share/glib-2.0/codegen/codegen_main.pyc
share/glib-2.0/codegen/codegen_main.pyo
share/glib-2.0/codegen/config.py
share/glib-2.0/codegen/config.pyc
share/glib-2.0/codegen/config.pyo
share/glib-2.0/codegen/dbustypes.py
share/glib-2.0/codegen/dbustypes.pyc
share/glib-2.0/codegen/dbustypes.pyo
share/glib-2.0/codegen/parser.py
share/glib-2.0/codegen/parser.pyc
share/glib-2.0/codegen/parser.pyo
share/glib-2.0/codegen/utils.py
share/glib-2.0/codegen/utils.pyc
share/glib-2.0/codegen/utils.pyo
@dirrm share/glib-2.0/codegen



The __pycache__ folder in glib-2.0/codegen has the following files:

angst(/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__) # ll
total 336
-rw-r--r--  1 root  wheel   405B Sep  2 14:54 __init__.cpython-32.pyc
-rw-r--r--  1 root  wheel   405B Sep  2 14:54 __init__.cpython-32.pyo
-rw-r--r--  1 root  wheel   114K Sep  2 14:54 codegen.cpython-32.pyc
-rw-r--r--  1 root  wheel   114K Sep  2 14:54 codegen.cpython-32.pyo
-rw-r--r--  1 root  wheel    16K Sep  2 14:54 codegen_docbook.cpython-32.pyc
-rw-r--r--  1 root  wheel    16K Sep  2 14:54 codegen_docbook.cpython-32.pyo
-rw-r--r--  1 root  wheel   6.0K Sep  2 14:54 codegen_main.cpython-32.pyc
-rw-r--r--  1 root  wheel   6.0K Sep  2 14:54 codegen_main.cpython-32.pyo
-rw-r--r--  1 root  wheel   266B Sep  2 14:54 config.cpython-32.pyc
-rw-r--r--  1 root  wheel   266B Sep  2 14:54 config.cpython-32.pyo
-rw-r--r--  1 root  wheel    13K Sep  2 14:54 dbustypes.cpython-32.pyc
-rw-r--r--  1 root  wheel    13K Sep  2 14:54 dbustypes.cpython-32.pyo
-rw-r--r--  1 root  wheel   7.3K Sep  2 14:54 parser.cpython-32.pyc
-rw-r--r--  1 root  wheel   7.3K Sep  2 14:54 parser.cpython-32.pyo
-rw-r--r--  1 root  wheel   2.8K Sep  2 14:54 utils.cpython-32.pyc
-rw-r--r--  1 root  wheel   2.8K Sep  2 14:54 utils.cpython-32.pyo



I have the following config options set for the port:

angst(/usr/ports/devel/glib20) # make showconfig
===> The following configuration options are available for glib-2.36.3_4:
     COLLATION_FIX=off: fix string collation
     DEBUG=off: Build with debugging support




And the contents of my /etc/make.conf:

angst(/usr/ports/devel/glib20) # cat /etc/make.conf
WITH_PKGNG=yes

# KRB5_HOME=/usr/local
# used by the pam_krb5 port
KRB5_IMPL=mit
KRB5_DOC=NO

DEFAULT_VERSIONS= ruby=1.9 python=3.2



My checkout of ports is current to r367070. Here is the last commit to devel/glib20:

------------------------------------------------------------------------
r366944 | tijl | 2014-09-01 15:52:11 -0400 (Mon, 01 Sep 2014) | 4 lines

Convert to USES=libtool and USES=python

Obtained from:  gnome-dev

Index: pkg-plist
===================================================================
--- pkg-plist   (revision 366943)
+++ pkg-plist   (revision 366944)
@@ -262,25 +262,25 @@
 include/glib-2.0/gobject/gvaluecollector.h
 include/glib-2.0/gobject/gvaluetypes.h
 lib/libgio-2.0.a
-lib/libgio-2.0.la
 lib/libgio-2.0.so
 lib/libgio-2.0.so.0
+lib/libgio-2.0.so.%%LIBVERSION%%
 lib/libglib-2.0.a
-lib/libglib-2.0.la
 lib/libglib-2.0.so
 lib/libglib-2.0.so.0
+lib/libglib-2.0.so.%%LIBVERSION%%
 lib/libgmodule-2.0.a
-lib/libgmodule-2.0.la
 lib/libgmodule-2.0.so
 lib/libgmodule-2.0.so.0
+lib/libgmodule-2.0.so.%%LIBVERSION%%
 lib/libgobject-2.0.a
-lib/libgobject-2.0.la
 lib/libgobject-2.0.so
 lib/libgobject-2.0.so.0
+lib/libgobject-2.0.so.%%LIBVERSION%%
 lib/libgthread-2.0.a
-lib/libgthread-2.0.la
 lib/libgthread-2.0.so
 lib/libgthread-2.0.so.0
+lib/libgthread-2.0.so.%%LIBVERSION%%
 libdata/pkgconfig/gio-2.0.pc
 libdata/pkgconfig/gio-unix-2.0.pc
 libdata/pkgconfig/glib-2.0.pc
Index: Makefile
===================================================================
--- Makefile    (revision 366943)
+++ Makefile    (revision 366944)
@@ -4,7 +4,7 @@

 PORTNAME=      glib
 PORTVERSION=   2.36.3
-PORTREVISION=  3
+PORTREVISION=  4
 CATEGORIES=    devel
 MASTER_SITES=  GNOME
 DIST_SUBDIR=   gnome2
@@ -22,17 +22,16 @@
 LIB_DEPENDS+=  libpcre.so:${PORTSDIR}/devel/pcre \
                libffi.so:${PORTSDIR}/devel/libffi

-USE_AUTOTOOLS= libtool
+GNU_CONFIGURE= yes
 USE_LDCONFIG=  yes
 # iconv:wchar_t - our iconv in base doesn't support utf-8 -> wchar_t (boooo)
 # (wchar_t is used by glibmm, rawtherapee triggered this)
-USES+=         gettext gmake iconv:wchar_t pathfix pkgconfig shebangfix perl5
-USE_GNOME=     ltverhack
-USE_PYTHON=    yes
-PYTHON_PY3K_PLIST_HACK=        yes
-CONFIGURE_ARGS=        --enable-static \
-               --disable-gtk-doc --with-html-dir=${PREFIX}/share/doc \
+USES+=         gettext gmake iconv:wchar_t libtool pathfix perl5 \
+               pkgconfig python shebangfix
+PYTHON_FEATURES=       py3kplist
+CONFIGURE_ARGS=        --disable-gtk-doc --with-html-dir=${PREFIX}/share/doc \
                --disable-man --without-xml-catalog \
+               --enable-static \
                --with-pcre=system \
                --disable-fam
 CONFIGURE_ENV= ac_cv_header_sys_inotify_h=
@@ -42,6 +41,9 @@

 SHEBANG_FILES= */*.pl glib/gen-iswide-table.py

+LIBVERSION=    0.3600.3
+PLIST_SUB+=    LIBVERSION=${LIBVERSION}
+
 OPTIONS_DEFINE=        COLLATION_FIX DEBUG
 COLLATION_FIX_DESC=    fix string collation


------------------------------------------------------------------------
Comment 1 Kevin Thompson 2014-09-02 19:22:54 UTC
This is my fault. devel/glib20 doesn't work with python3.2, which I have set as my default in /etc/make.conf.

This thread has more info and patches for fixing that eventual problem:
http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2014-March/273674.html


For the time being, can anything be done to force this port to use only the supported version of python, or at least IGNORE if python 3.2 is the system default?
Comment 2 Tijl Coosemans freebsd_committer freebsd_triage 2014-09-02 20:09:37 UTC
In the port Makefile there are these two lines:

USES+= gettext gmake iconv:wchar_t libtool pathfix perl5 \
       pkgconfig python shebangfix

Does it work if you change "python" to "python:2" here?
Comment 3 Kevin Thompson 2014-09-02 20:37:41 UTC
Indeed it does; that seems to fix it instantly.
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2014-09-02 20:53:10 UTC
Actually, please remove that ":2" again and change this line:

PYTHON_FEATURES= py3kplist

into:

USE_PYTHON= py3kplist
Comment 5 Kevin Thompson 2014-09-02 21:05:35 UTC
Changing "PYTHON_FEATURES= py3kplist" to "USE_PYTHON= py3kplist" allowed it to compile against python3.2 and install correctly.
Comment 6 Tijl Coosemans freebsd_committer freebsd_triage 2014-09-03 19:15:53 UTC
Fixed in r367216