From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: emacs package Date: Thu, 18 Sep 2014 20:37:30 +0200 Message-ID: References: <87y4tliahf.fsf@gnu.org> <87r3zabohm.fsf@gnu.org> <8738bp16k4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=089e0160a3beef749405035b468f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUgaK-0005bB-UZ for guix-devel@gnu.org; Thu, 18 Sep 2014 14:37:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUgaI-0002df-UQ for guix-devel@gnu.org; Thu, 18 Sep 2014 14:37:40 -0400 In-Reply-To: <8738bp16k4.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel@gnu.org --089e0160a3beef749405035b468f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Sep 18, 2014 at 2:01 PM, Ludovic Court=C3=A8s wrote: > Federico Beffa skribis: > >> This is the test recipe that I built: >> >> (use-modules (guix) (gnu) (srfi srfi-1) >> (guix packages) >> (guix download)) >> >> (let ((emacs (car (find-packages-by-name "emacs"))) >> (libcanberra (car (find-packages-by-name "libcanberra"))) >> (gtk+ (car (find-packages-by-name "gtk+")))) >> (package >> (inherit emacs) >> (name "emacs-canberra") >> (version "24.3") >> (source (origin >> (method url-fetch) >> (uri "mirror://gnu/emacs/emacs-24.3.tar.xz") >> (sha256 >> (base32 >> "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh")) >> (patches (list (search-patch >> "/home/beffa/src/guix/git/guix/gnu/packages/patches/emacs-configure-sh.p= atch"))))) > > No need for =E2=80=98search-path=E2=80=99 here. since the absolute file n= ame is given. > >> (inputs >> (alist-cons "gtk+" (list gtk+) >> (alist-delete "gtk+" >> (alist-cons "libcanberra" (list libcanberra) >> (package-inputs emacs))))))) > > I put it in the REPL, and then used =E2=80=98package-transitive-inputs=E2= =80=99 to see > if there was any GTK+ left: > > --8<---------------cut here---------------start------------->8--- > scheme@(guile-user)> (let ((emacs (car (find-packages-by-name "emacs"))) > (libcanberra (car (find-packages-by-name "libcanberra"))) > (gtk+ (car (find-packages-by-name "gtk+")))) > (package > > [...] > > $7 =3D # > scheme@(guile-user)> (filter (match-lambda > ((label (? package? p) . _) > (string=3D? "gtk+" (package-name p)))) > (package-transitive-inputs $7)) > $8 =3D (("gtk+" #)= ) > --8<---------------cut here---------------end--------------->8--- > > There=E2=80=99s only one GTK+ here. > > Could you try =E2=80=98ldd emacs=E2=80=99 on this Emacs, and see what it = returns? > > Thanks, > Ludo=E2=80=99. Yes, you are right. Yesterday I was messing around with the environment variable GTK_MODULE. I guess that confused me. Having undefined it now I only see reference to gtk-3: $ ldd /gnu/store/cd8x9llkvfj29rwzd455a7pf0fq6kwnl-emacs-canberra-24.3/bin/e= macs-24.3 linux-vdso.so.1 (0x00007fff4edff000) libtiff.so.5 =3D> /gnu/store/0y0p2pi4pnjxzfl1xzvd241wzd42zihl-libtiff-4.0.3/lib/libtiff.so.5 (0x00007f347ad0e000) libjpeg.so.8 =3D> /gnu/store/99p3ciijacdzay73rpsz3h68qv4rpf21-libjpeg-8d/lib/libjpeg.so.8 (0x00007f347aad4000) libpng15.so.15 =3D> /gnu/store/gq2yb0df0m15h417bpl5lqms7wr0f404-libpng-1.5.17/lib/libpng15.so.1= 5 (0x00007f347a8ab000) libz.so.1 =3D> /gnu/store/k53im094qqjgg0yf0rfy9ci9xqs27lv7-zlib-1.2.7/lib/libz.so.1 (0x00007f347a693000) libm.so.6 =3D> /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libm.so.6 (0x00007f347a392000) libgif.so.4 =3D> /gnu/store/w4d0ivdg77s42qvnj6kwvaar8j8wilq6-giflib-4.2.3/lib/libgif.so.4 (0x00007f347a18a000) libXpm.so.4 =3D> /gnu/store/cqwjzl9ccsx2i9lya4q9q7gabbs8zfgm-libxpm-3.5.10/lib/libXpm.so.4 (0x00007f3479f79000) libgtk-3.so.0 =3D> /gnu/store/5shj344c9vrh4fx93r9lfjjrrr97fmjv-gtk+-3.10.1/lib/libgtk-3.so.0 (0x00007f347987b000) libgdk-3.so.0 =3D> /gnu/store/5shj344c9vrh4fx93r9lfjjrrr97fmjv-gtk+-3.10.1/lib/libgdk-3.so.0 (0x00007f34795ea000) libatk-1.0.so.0 =3D> /gnu/store/fvslzymf14bk04c8dbqlza18b6b8ki9q-atk-2.10.0/lib/libatk-1.0.so.0 (0x00007f34793c8000) libgio-2.0.so.0 =3D> /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libgio-2.0.so.0 (0x00007f3479057000) libpangocairo-1.0.so.0 =3D> /gnu/store/blp52rm0zx4508kaplb46sc1bwxl2iad-pango-1.34.1/lib/libpangocairo-= 1.0.so.0 (0x00007f3478e4a000) libgdk_pixbuf-2.0.so.0 =3D> /gnu/store/9dx5hlknyi4pcxqdda0b299w46pcg5j1-gdk-pixbuf-2.28.2/lib/libgdk_pi= xbuf-2.0.so.0 (0x00007f3478c2a000) libcairo-gobject.so.2 =3D> /gnu/store/kcm3qfllrjlf0zy61854a8lj6p8bmspn-cairo-1.12.16/lib/libcairo-gobj= ect.so.2 (0x00007f3478a22000) libpango-1.0.so.0 =3D> /gnu/store/blp52rm0zx4508kaplb46sc1bwxl2iad-pango-1.34.1/lib/libpango-1.0.s= o.0 (0x00007f34787d8000) libcairo.so.2 =3D> /gnu/store/kcm3qfllrjlf0zy61854a8lj6p8bmspn-cairo-1.12.16/lib/libcairo.so.2 (0x00007f34784d2000) libgobject-2.0.so.0 =3D> /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libgobject-2.0.= so.0 (0x00007f3478282000) libglib-2.0.so.0 =3D> /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libglib-2.0.so.= 0 (0x00007f3477f51000) libSM.so.6 =3D> /gnu/store/by18z1yihhp2ci8wi1aippd1i1850r3x-libsm-1.2.1/lib/libSM.so.6 (0x00007f3477d4a000) libICE.so.6 =3D> /gnu/store/8irn4rn8xzw7cwif368fx45g2k4gqsma-libice-1.0.8/lib/libICE.so.6 (0x00007f3477b2f000) libX11.so.6 =3D> /gnu/store/4n4xhxm150z7d0n7ki6mbr553hyvxp87-libx11-1.5.0/lib/libX11.so.6 (0x00007f34777f6000) libXrender.so.1 =3D> /gnu/store/0m3lgjilccpiw32vqi65k8b66zhdb6v5-libxrender-0.9.7/lib/libXrender= .so.1 (0x00007f34775ed000) libXft.so.2 =3D> /gnu/store/s48isysmn3xxjd8va6hc5j6sb4g1amfi-libxft-2.3.1/lib/libXft.so.2 (0x00007f34773d8000) libasound.so.2 =3D> /gnu/store/vw3lq9z0p02zv24p8zmk0qsj6wxgb6ij-alsa-lib-1.0.27.1/lib/libasound= .so.2 (0x00007f34770b4000) librt.so.1 =3D> /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/librt.so.1 (0x00007f3476eac000) libdbus-1.so.3 =3D> /gnu/store/80lyw961agzz0vpkwkccpzxri12yrc41-dbus-1.6.4/lib/libdbus-1.so.3 (0x00007f3476c66000) libxml2.so.2 =3D> /gnu/store/lavqwx6qi6nvlm5cj1h2rbw9yn63mdpp-libxml2-2.9.0/lib/libxml2.so.2 (0x00007f3476901000) libncursesw.so.5 =3D> /gnu/store/zncycfxkkgn6hsziw3wmpsdfabhdi3n8-ncurses-5.9/lib/libncursesw.so.= 5 (0x00007f347669f000) libfreetype.so.6 =3D> /gnu/store/rgrckir6k1zi8490z4sn52d9pzcqw872-freetype-2.4.11/lib/libfreetype= .so.6 (0x00007f34763ff000) libfontconfig.so.1 =3D> /gnu/store/yi31nvrp18x0241zddyyg0m9wl8qglhn-fontconfig-2.10.93/lib/libfontc= onfig.so.1 (0x00007f34761c4000) libgnutls.so.28 =3D> /gnu/store/rpf0i00hnaql1qi1xchb7nkcfq8h0d84-gnutls-3.2.15/lib/libgnutls.so.= 28 (0x00007f3475ec1000) libpthread.so.0 =3D> /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libpthread.so.0 (0x00007f3475ca3000) libc.so.6 =3D> /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libc.so.6 (0x00007f34758fa000) liblzma.so.5 =3D> /gnu/store/ah9rclsxmnzg9xif7ws9d4bm82v4lr1l-xz-5.0.4/lib/liblzma.so.5 (0x00007f34756d8000) libgcc_s.so.1 =3D> /gnu/store/1qf4rsznfhvdis39jzdmx0dfjy2jwzgz-gcc-4.8.3-lib/lib/libgcc_s.so.1 (0x00007f34754c2000) libxcb.so.1 =3D> /gnu/store/wl8llszn3q574ijksab621fwv6b4sjsy-libxcb-1.8.1/lib/libxcb.so.1 (0x00007f34752a5000) libXau.so.6 =3D> /gnu/store/xpnyzjq3viyqvqrhsr4vg6gzips9r7sy-libxau-1.0.7/lib/libXau.so.6 (0x00007f34750a2000) libXdmcp.so.6 =3D> /gnu/store/fssqlvp8rbfxm4p02d7pczdi5aq4fxsr-libxdmcp-1.1.1/lib/libXdmcp.so.= 6 (0x00007f3474e9d000) libdl.so.2 =3D> /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libdl.so.2 (0x00007f3474c99000) libXinerama.so.1 =3D> /gnu/store/grh86nv12p1m4fnysmlf59k8x68c35rj-libxinerama-1.1.2/lib/libXinera= ma.so.1 (0x00007f3474a97000) libharfbuzz.so.0 =3D> /gnu/store/a8xlnnxhla612yiinlfpg79vvs01fhqs-harfbuzz-0.9.22/lib/libharfbuzz= .so.0 (0x00007f3474847000) libXi.so.6 =3D> /gnu/store/yyhqn5fcxi28frn5ca4yk2afx4qcfa6z-libxi-1.6.1/lib/libXi.so.6 (0x00007f3474638000) libpixman-1.so.0 =3D> /gnu/store/dvrvjz8f24saqbv921mwdgfm5x4v1p5s-pixman-0.32.4/lib/libpixman-1.s= o.0 (0x00007f347438e000) libxcb-shm.so.0 =3D> /gnu/store/wl8llszn3q574ijksab621fwv6b4sjsy-libxcb-1.8.1/lib/libxcb-shm.so.= 0 (0x00007f347418c000) libxcb-render.so.0 =3D> /gnu/store/wl8llszn3q574ijksab621fwv6b4sjsy-libxcb-1.8.1/lib/libxcb-render.= so.0 (0x00007f3473f83000) libXext.so.6 =3D> /gnu/store/ijal248zay4yzbzrjcvnfis9mc14h1ry-libxext-1.3.1/lib/libXext.so.6 (0x00007f3473d71000) libatk-bridge-2.0.so.0 =3D> /gnu/store/mpwapvwy6zwj4rj0jd0hlsvh6pljhb44-at-spi2-atk-2.10.0/lib/libatk-b= ridge-2.0.so.0 (0x00007f3473b46000) libatspi.so.0 =3D> /gnu/store/974vn9yjhpzibh8ci06gn7njka3c79di-at-spi2-core-2.10.0/lib/libatsp= i.so.0 (0x00007f3473919000) libpangoft2-1.0.so.0 =3D> /gnu/store/blp52rm0zx4508kaplb46sc1bwxl2iad-pango-1.34.1/lib/libpangoft2-1.= 0.so.0 (0x00007f3473705000) libgthread-2.0.so.0 =3D> /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libgthread-2.0.= so.0 (0x00007f3473504000) libexpat.so.1 =3D> /gnu/store/y0fahbrfx871dijpb5w164y7r2zl6i5j-expat-2.1.0/lib/libexpat.so.1 (0x00007f34732db000) libgmodule-2.0.so.0 =3D> /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libgmodule-2.0.= so.0 (0x00007f34730d8000) libresolv.so.2 =3D> /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libresolv.so.2 (0x00007f3472ec1000) libffi.so.6 =3D> /gnu/store/5c94pmrv0x37qjn9qm5w9nphqz1r6l2v-libffi-3.0.13/lib/libffi.so.6 (0x00007f3472cb8000) libuuid.so.1 =3D> /gnu/store/jcxd13rx81h2hcjvf80c8iwpnvp65k3b-util-linux-2.21/lib/libuuid.so.= 1 (0x00007f3472ab4000) /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/ld-linux-x86= -64.so.2 (0x00007f347af80000) libtasn1.so.6 =3D> /gnu/store/52kdi2gmrl2ms92as0nsxbbkndqx07s4-libtasn1-4.1/lib/libtasn1.so.6 (0x00007f34728a2000) libnettle.so.4 =3D> /gnu/store/ybrsdvzzd9mwjkx01dcxlv1i6d1p5cd6-nettle-2.7.1/lib/libnettle.so.4 (0x00007f3472675000) libhogweed.so.2 =3D> /gnu/store/ybrsdvzzd9mwjkx01dcxlv1i6d1p5cd6-nettle-2.7.1/lib/libhogweed.so.= 2 (0x00007f3472447000) libgmp.so.10 =3D> /gnu/store/1sjpwj0hlazs8nhx50dhihx6nr9mskjq-gmp-6.0.0a/lib/libgmp.so.10 (0x00007f34721ba000) In the mean time I've found out the existence of a simple test program called canberra-gtk-play in the libcanberra package. With this I tested that I can actually play a sound, but it gives the same message: $ canberra-gtk-play -i phone-incoming-call Gtk-Message: Failed to load module "canberra-gtk-module" After playing somewhat with GTK_PATH I've found that if I set it like shown below I do not get the warning message: $ GTK_PATH=3D"/home/beffa/.guix-profile/lib/gtk-3.0" /gnu/store/cd8x9llkvfj29rwzd455a7pf0fq6kwnl-emacs-canberra-24.3/bin/emacs GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. $ GTK_PATH=3D"/home/beffa/.guix-profile/lib/gtk-3.0" canberra-gtk-play -i phone-incoming-call However, with the official emacs package I still get it: $ GTK_PATH=3D"/home/beffa/.guix-profile/lib/gtk-2.0" emacs Gtk-Message: Failed to load module "canberra-gtk-module" GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. $ GTK_PATH=3D"/home/beffa/.guix-profile/lib/gtk-3.0" emacs (emacs:7105): Gtk-WARNING **: GTK+ module /home/beffa/.guix-profile/lib/gtk-3.0/modules/libcanberra-gtk-module.so cannot be loaded. GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported. Gtk-Message: Failed to load module "canberra-gtk-module" GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. So, I've rebuilt emacs without libcanberra, but with gtk-3 with the attached recipe and now the message is gone: $ GTK_PATH=3D/home/beffa/.guix-profile/lib/gtk-3.0 /gnu/store/4y7ic831rbawm96qb1n4da19x9qlwk73-emacs-gtk3-24.3/bin/emacs GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. So my conclusion is: Given that libcanberra is built with gtk-3 and emacs builds fine with gtk-3, I would suggest to change gtk version in the emacs package (I've also added --with-x-toolkit=3Dgtk3 as flag to configure. Not sure if this is really necessary). In addition, it would be nice not to have to define GTK_PATH. I guess that would require some modification to either libcanberra or the gtk package. On a side note, I built a couple of variants of emacs-canberra. After a while I wanted to check which one is the most recent one with $ ls -l /gnu/store/*emacs-canb* and have found out that all files in the store have a time stamp of "1 Jan 1970". Why is guix not producing the expected time stamps? Regards, Fede --089e0160a3beef749405035b468f Content-Type: text/x-scheme; charset=US-ASCII; name="emacs-gtk3.scm" Content-Disposition: attachment; filename="emacs-gtk3.scm" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i08fw6uv0 KHVzZS1tb2R1bGVzIChndWl4KSAoZ251KSAoc3JmaSBzcmZpLTEpCgkgICAgIChndWl4IHBhY2th Z2VzKQoJICAgICAoZ3VpeCBkb3dubG9hZCkpCgoobGV0ICgoZW1hY3MgKGNhciAoZmluZC1wYWNr YWdlcy1ieS1uYW1lICJlbWFjcyIpKSkKICAgICAgKGd0aysgKGNhciAoZmluZC1wYWNrYWdlcy1i eS1uYW1lICJndGsrIikpKSkKICAocGFja2FnZQogICAoaW5oZXJpdCBlbWFjcykKICAgKG5hbWUg ImVtYWNzLWd0azMiKQogICAodmVyc2lvbiAiMjQuMyIpCiAgIChzb3VyY2UgKG9yaWdpbgoJICAg IChtZXRob2QgdXJsLWZldGNoKQoJICAgICh1cmkgIm1pcnJvcjovL2dudS9lbWFjcy9lbWFjcy0y NC4zLnRhci54eiIpCgkgICAgKHNoYTI1NgoJICAgICAoYmFzZTMyCgkgICAgICAiMTM4NXF6czNi c2E1MnM1cmNuY2Jya3hseWRrdzBhanpydmZ4Z3Y4cndzNWZ4NTEya2FraCIpKQoJICAgIChwYXRj aGVzIChsaXN0ICIvaG9tZS9iZWZmYS9zcmMvZ3VpeC9naXQvZ3VpeC9nbnUvcGFja2FnZXMvcGF0 Y2hlcy9lbWFjcy1jb25maWd1cmUtc2gucGF0Y2giKSkpKQogICAgKGFyZ3VtZW50cwogICAgICco Izpjb25maWd1cmUtZmxhZ3MKICAgICAgIChsaXN0IChzdHJpbmctYXBwZW5kICItLXdpdGgtY3J0 LWRpcj0iIChhc3NvYy1yZWYgJWJ1aWxkLWlucHV0cyAibGliYyIpCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAiL2xpYiIpCgkgICAgICItLXdpdGgteD15ZXMiCgkgICAgICItLXdpdGgteC10 b29sa2l0PWd0azMiKQogICAgICAgIzpwaGFzZXMgKGFsaXN0LWNvbnMtYmVmb3JlCiAgICAgICAg ICAgICAgICAgJ2NvbmZpZ3VyZSAnZml4LS9iaW4vcHdkCiAgICAgICAgICAgICAgICAgKGxhbWJk YSBfCiAgICAgICAgICAgICAgICAgICA7OyBVc2UgYHB3ZCcsIG5vdCBgL2Jpbi9wd2QnLgogICAg ICAgICAgICAgICAgICAgKHN1YnN0aXR1dGUqIChmaW5kLWZpbGVzICIuIiAiXk1ha2VmaWxlXFwu aW4kIikKICAgICAgICAgICAgICAgICAgICAgKCgiL2Jpbi9wd2QiKQogICAgICAgICAgICAgICAg ICAgICAgInB3ZCIpKSkKICAgICAgICAgICAgICAgICAlc3RhbmRhcmQtcGhhc2VzKSkpCiAgIChp bnB1dHMgCiAgICAoYWxpc3QtY29ucyAiZ3RrKyIgKGxpc3QgZ3RrKykKCQkoYWxpc3QtZGVsZXRl ICJndGsrIiAocGFja2FnZS1pbnB1dHMgZW1hY3MpKSkpKSkK --089e0160a3beef749405035b468f--