unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guix-devel <guix-devel@gnu.org>
Subject: tk-update update
Date: Thu, 26 Nov 2015 10:09:41 +0100	[thread overview]
Message-ID: <87r3jd2kkq.fsf@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2223 bytes --]

Hello!

As you may have noticed, the ‘tk-update’ branch is not merged yet.

There’s one problem, manifesting itself in webkitgtk-2.4
(http://hydra.gnu.org/build/831334):

--8<---------------cut here---------------start------------->8---
  GEN      DerivedSources/WebCore/CommandLineAPIModuleSource.h
Traceback (most recent call last):
  File "/gnu/store/7lqv9lk5j0kg6yrhwqh5cbwqbibzmxgl-glib-2.46.1-bin/bin/gdbus-codegen", line 37, in <module>
    from codegen import codegen_main
  File "/gnu/store/fvg98wicda2ia6wxx90gfbs8ydy27qdi-glib-2.46.1/share/glib-2.0/codegen/codegen_main.py", line 28, in <module>
    from . import parser
  File "/gnu/store/fvg98wicda2ia6wxx90gfbs8ydy27qdi-glib-2.46.1/share/glib-2.0/codegen/parser.py", line 23, in <module>
    import xml.parsers.expat
  File "/gnu/store/5v7xrwnzz0d1h9qfwwq5aaj33a6d7xm1-python-3.4.3/lib/python3.4/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: dynamic module does not define init function (PyInit_pyexpat)
--8<---------------cut here---------------end--------------->8---

The problem can be reproduced this way:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix environment --ad-hoc python-2 python-3 -- python3
Python 3.4.3 (default, Jan  1 1970, 00:00:01) 
[GCC 4.9.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['PYTHONPATH']
'/gnu/store/q405y94pbnx028mygranaww5pnbqhnq1-python-2.7.10/lib/python2.7/site-packages:/gnu/store/q405y94pbnx028mygranaww5pnbqhnq1-python-2.7.10/lib/python2.7/lib-dynload:/gnu/store/5v7xrwnzz0d1h9qfwwq5aaj33a6d7xm1-python-3.4.3/lib/python3.4/site-packages:/gnu/store/5v7xrwnzz0d1h9qfwwq5aaj33a6d7xm1-python-3.4.3/lib/python3.4/lib-dynload:/home/ludo/.guix-profile/lib/python2.7/site-packages:/run/current-system/profile/lib/python2.7/site-packages'
>>> import pyexpat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function (PyInit_pyexpat)
--8<---------------cut here---------------end--------------->8---

What happens is that as a consequence of d7572b4, which does:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 410 bytes --]

@@ -215,7 +233,8 @@
     (native-search-paths
      (list (search-path-specification
             (variable "PYTHONPATH")
-            (files '("lib/python2.7/site-packages")))))
+            (files '("lib/python2.7/site-packages"
+                     "lib/python2.7/lib-dynload")))))
     (home-page "http://python.org")
     (synopsis "High-level, dynamically-typed programming language")
     (description

[-- Attachment #3: Type: text/plain, Size: 676 bytes --]


… we end up with python2’s pyexpat.so in the search path, and python3
fails when it tries to load it.  (This change was done so that .so files
such as tkinter.so can be found even when they don’t lie under Python’s
prefix.)

My analysis is that it’s “reasonable” to expect breakage when mixing
python2 and python3 in the same environment, and that the problem here
is more that standalone programs like ‘gdbus-codegen’ should be wrapped
to have their PYTHONPATH set in stone.

What do people think?

If there’s consensus, we need to fix GLib in that branch, which means
rebuilding a lot of things again (604 packages.)

Thanks,
Ludo’.

             reply	other threads:[~2015-11-26  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26  9:09 Ludovic Courtès [this message]
2015-11-26 11:27 ` tk-update update Ricardo Wurmus
2015-11-26 13:34   ` Ludovic Courtès
2015-11-26 17:04 ` Ludovic Courtès
2015-11-29 22:05   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3jd2kkq.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).