all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 宋文武 <iyzsong@openmailbox.org>, Guix-devel <guix-devel@gnu.org>,
	iyzsong@member.fsf.org, 20889@debbugs.gnu.org
Subject: bug#20889: Tkinter moved to separate output
Date: Mon, 30 Nov 2015 17:45:58 +0100	[thread overview]
Message-ID: <CAKrPhPPp4hkbNezo5mJv8UX=7UH0ftNuDrj+aVzMNTDBZrpFNw@mail.gmail.com> (raw)
In-Reply-To: <87two4e9v8.fsf@gnu.org>

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

On Sun, Nov 29, 2015 at 11:09 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Federico Beffa <beffa@ieee.org> skribis:
>
>> On Mon, Nov 16, 2015 at 1:57 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>>> Federico Beffa <beffa@ieee.org> skribis:
>>>> Yes, given that the back-end currently used by matploblib doesn't
>>>> work, I would change that by using 'Tkinter'.
>>>>
>>>> Since you are at it, I would also change the default back-end by
>>>> changing 'GTK3Agg' to 'TkAgg' in the following snippet:
>>>>
>>>> (lambda (port)
>>>>   (format port "[rc_options]~%
>>>> backend = GTK3Agg~%")))))
>>>
>>> OTOH I see that Matploblib already depends on GTK+ 3.x and
>>> python-pygobject, so maybe it’s best to stick to GTK+ by default?
>>
>> Unfortunately, the back-ends based on GTK+ are broken and I didn't
>> manage to find how to fix the problem.
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20888
>>
>> That's why I'm looking forward to get Tkinter :-)
>
> Could you or someone else test this patch on current master?

It does not work. It can't find the tcl/tk header files:

...
                 tkagg: no  [The C/C++ header for Tk (tk.h) could not be
                        found.  You may need to install the development
                        package.]
...

With the attached patch it does find the headers, but then it fails at
link time.

...
g++ -pthread -shared
-Wl,-rpath=/gnu/store/cxrqlhbr6xqgi08x3amd0lvl6m7sxx57-python-3.4.3/lib
build/temp.linux-x86_64-3.4/src/agg_py_transforms.o
build/temp.linux-x86_64-3.4/src/_tkagg.o
build/temp.linux-x86_64-3.4/extern/agg24/src/agg_bezier_arc.o
build/temp.linux-x86_64-3.4/extern/agg24/src/agg_curves.o
build/temp.linux-x86_64-3.4/extern/agg24/src/agg_image_filters.o
build/temp.linux-x86_64-3.4/extern/agg24/src/agg_trans_affine.o
build/temp.linux-x86_64-3.4/extern/agg24/src/agg_vcgen_contour.o
build/temp.linux-x86_64-3.4/extern/agg24/src/agg_vcgen_dash.o
build/temp.linux-x86_64-3.4/extern/agg24/src/agg_vcgen_stroke.o
build/temp.linux-x86_64-3.4/extern/agg24/src/agg_vpgen_segmentator.o
build/temp.linux-x86_64-3.4/extern/CXX/IndirectPythonInterface.o
build/temp.linux-x86_64-3.4/extern/CXX/cxxsupport.o
build/temp.linux-x86_64-3.4/extern/CXX/cxx_extensions.o
build/temp.linux-x86_64-3.4/extern/CXX/cxxextensions.o
-L/gnu/store/ipsq9hlk6k0w1qfiw0y0a03bxkp2clhl-tcl-8.6.4/lib
-L/gnu/store/my9wgryzpfvksng6k7h87xz9rphdwddw-tk-8.6.4/lib
-L/usr/local/lib -L/usr/local/lib
-L/gnu/store/cxrqlhbr6xqgi08x3amd0lvl6m7sxx57-python-3.4.3/lib -ltcl
-ltk -lstdc++ -lm -lpython3.4m -o
build/lib.linux-x86_64-3.4/matplotlib/backends/_tkagg.cpython-34m.so
ld: cannot find -ltcl
ld: cannot find -ltk
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1
phase `build' failed after 94.8 seconds
...

Looking into the failed build directory, it seems that PKG_CONFIG_PATH
is set correctly. Still, it doesn't get the correct flags.

Regards,
Fede

[-- Attachment #2: mpl.patch --]
[-- Type: text/x-diff, Size: 1510 bytes --]

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 39d0751..4dfe557 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3190,6 +3190,7 @@ transcendental functions).")
      `(("python-pyparsing" ,python-pyparsing)
        ("python-pygobject" ,python-pygobject)
        ("gobject-introspection" ,gobject-introspection)
+       ("python-tkinter" ,python "tk")
        ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
        ;; from 'gtk+') provides the required 'typelib' files used by
        ;; 'gobject-introspection'. The location of these files is set with the
@@ -3224,7 +3225,8 @@ transcendental functions).")
        ;; FIXME: Add backends when available.
        ;("python-wxpython" ,python-wxpython)
        ;("python-pyqt" ,python-pyqt)
-       ))
+       ("tcl" ,tcl)
+       ("tk" ,tk)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("texlive" ,texlive)
@@ -3243,8 +3245,13 @@ transcendental functions).")
             (setenv "HOME" (getcwd))
             (call-with-output-file "setup.cfg"
               (lambda (port)
-                (format port "[rc_options]~%
-backend = GTK3Agg~%")))))
+                (format port "[directories]~%
+basedirlist = ~a,~a~%
+~%
+[rc_options]~%
+backend = TkAgg~%"
+                        (assoc-ref inputs "tcl")
+                        (assoc-ref inputs "tk"))))))
         (alist-cons-after
          'install 'install-doc
          (lambda* (#:key outputs #:allow-other-keys)

  reply	other threads:[~2015-11-30 16:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12  5:50 [PATCH] tk: Hardcode path to TK_LIBRARY 宋文武
2015-11-12 12:58 ` bug#20889: " Ludovic Courtès
2015-11-12 12:58 ` Ludovic Courtès
2015-11-13 11:55   ` bug#20889: " 宋文武
2015-11-13 11:55   ` 宋文武
2015-11-16  8:42   ` bug#20889: Tkinter moved to separate output Ludovic Courtès
2015-11-16 11:44     ` Federico Beffa
2015-11-16 12:57       ` Ludovic Courtès
2015-11-16 13:16         ` Federico Beffa
2015-11-29 22:09           ` Ludovic Courtès
2015-11-30 16:45             ` Federico Beffa [this message]
2015-11-29 22:09           ` bug#20889: " Ludovic Courtès
2015-11-16 13:16         ` Federico Beffa
  -- strict thread matches above, loose matches on Subject: below --
2015-12-01 20:19 Federico Beffa
2015-12-01 22:00 ` Ludovic Courtès
2015-12-02 17:28   ` bug#20889: " Federico Beffa
2015-12-01 22:00 ` Ludovic Courtès
2015-06-24  7:14 bug#20889: python Tkinter Federico Beffa
2015-12-01 20:19 ` bug#20889: Tkinter moved to separate output Federico Beffa

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

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

  git send-email \
    --in-reply-to='CAKrPhPPp4hkbNezo5mJv8UX=7UH0ftNuDrj+aVzMNTDBZrpFNw@mail.gmail.com' \
    --to=beffa@ieee.org \
    --cc=20889@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=iyzsong@member.fsf.org \
    --cc=iyzsong@openmailbox.org \
    --cc=ludo@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.