On Thu, Sep 18, 2014 at 2:01 PM, Ludovic Courtès 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.patch"))))) > > No need for ‘search-path’ here. since the absolute file name 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 ‘package-transitive-inputs’ 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 = # > scheme@(guile-user)> (filter (match-lambda > ((label (? package? p) . _) > (string=? "gtk+" (package-name p)))) > (package-transitive-inputs $7)) > $8 = (("gtk+" #)) > --8<---------------cut here---------------end--------------->8--- > > There’s only one GTK+ here. > > Could you try ‘ldd emacs’ on this Emacs, and see what it returns? > > Thanks, > Ludo’. 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/emacs-24.3 linux-vdso.so.1 (0x00007fff4edff000) libtiff.so.5 => /gnu/store/0y0p2pi4pnjxzfl1xzvd241wzd42zihl-libtiff-4.0.3/lib/libtiff.so.5 (0x00007f347ad0e000) libjpeg.so.8 => /gnu/store/99p3ciijacdzay73rpsz3h68qv4rpf21-libjpeg-8d/lib/libjpeg.so.8 (0x00007f347aad4000) libpng15.so.15 => /gnu/store/gq2yb0df0m15h417bpl5lqms7wr0f404-libpng-1.5.17/lib/libpng15.so.15 (0x00007f347a8ab000) libz.so.1 => /gnu/store/k53im094qqjgg0yf0rfy9ci9xqs27lv7-zlib-1.2.7/lib/libz.so.1 (0x00007f347a693000) libm.so.6 => /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libm.so.6 (0x00007f347a392000) libgif.so.4 => /gnu/store/w4d0ivdg77s42qvnj6kwvaar8j8wilq6-giflib-4.2.3/lib/libgif.so.4 (0x00007f347a18a000) libXpm.so.4 => /gnu/store/cqwjzl9ccsx2i9lya4q9q7gabbs8zfgm-libxpm-3.5.10/lib/libXpm.so.4 (0x00007f3479f79000) libgtk-3.so.0 => /gnu/store/5shj344c9vrh4fx93r9lfjjrrr97fmjv-gtk+-3.10.1/lib/libgtk-3.so.0 (0x00007f347987b000) libgdk-3.so.0 => /gnu/store/5shj344c9vrh4fx93r9lfjjrrr97fmjv-gtk+-3.10.1/lib/libgdk-3.so.0 (0x00007f34795ea000) libatk-1.0.so.0 => /gnu/store/fvslzymf14bk04c8dbqlza18b6b8ki9q-atk-2.10.0/lib/libatk-1.0.so.0 (0x00007f34793c8000) libgio-2.0.so.0 => /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libgio-2.0.so.0 (0x00007f3479057000) libpangocairo-1.0.so.0 => /gnu/store/blp52rm0zx4508kaplb46sc1bwxl2iad-pango-1.34.1/lib/libpangocairo-1.0.so.0 (0x00007f3478e4a000) libgdk_pixbuf-2.0.so.0 => /gnu/store/9dx5hlknyi4pcxqdda0b299w46pcg5j1-gdk-pixbuf-2.28.2/lib/libgdk_pixbuf-2.0.so.0 (0x00007f3478c2a000) libcairo-gobject.so.2 => /gnu/store/kcm3qfllrjlf0zy61854a8lj6p8bmspn-cairo-1.12.16/lib/libcairo-gobject.so.2 (0x00007f3478a22000) libpango-1.0.so.0 => /gnu/store/blp52rm0zx4508kaplb46sc1bwxl2iad-pango-1.34.1/lib/libpango-1.0.so.0 (0x00007f34787d8000) libcairo.so.2 => /gnu/store/kcm3qfllrjlf0zy61854a8lj6p8bmspn-cairo-1.12.16/lib/libcairo.so.2 (0x00007f34784d2000) libgobject-2.0.so.0 => /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libgobject-2.0.so.0 (0x00007f3478282000) libglib-2.0.so.0 => /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libglib-2.0.so.0 (0x00007f3477f51000) libSM.so.6 => /gnu/store/by18z1yihhp2ci8wi1aippd1i1850r3x-libsm-1.2.1/lib/libSM.so.6 (0x00007f3477d4a000) libICE.so.6 => /gnu/store/8irn4rn8xzw7cwif368fx45g2k4gqsma-libice-1.0.8/lib/libICE.so.6 (0x00007f3477b2f000) libX11.so.6 => /gnu/store/4n4xhxm150z7d0n7ki6mbr553hyvxp87-libx11-1.5.0/lib/libX11.so.6 (0x00007f34777f6000) libXrender.so.1 => /gnu/store/0m3lgjilccpiw32vqi65k8b66zhdb6v5-libxrender-0.9.7/lib/libXrender.so.1 (0x00007f34775ed000) libXft.so.2 => /gnu/store/s48isysmn3xxjd8va6hc5j6sb4g1amfi-libxft-2.3.1/lib/libXft.so.2 (0x00007f34773d8000) libasound.so.2 => /gnu/store/vw3lq9z0p02zv24p8zmk0qsj6wxgb6ij-alsa-lib-1.0.27.1/lib/libasound.so.2 (0x00007f34770b4000) librt.so.1 => /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/librt.so.1 (0x00007f3476eac000) libdbus-1.so.3 => /gnu/store/80lyw961agzz0vpkwkccpzxri12yrc41-dbus-1.6.4/lib/libdbus-1.so.3 (0x00007f3476c66000) libxml2.so.2 => /gnu/store/lavqwx6qi6nvlm5cj1h2rbw9yn63mdpp-libxml2-2.9.0/lib/libxml2.so.2 (0x00007f3476901000) libncursesw.so.5 => /gnu/store/zncycfxkkgn6hsziw3wmpsdfabhdi3n8-ncurses-5.9/lib/libncursesw.so.5 (0x00007f347669f000) libfreetype.so.6 => /gnu/store/rgrckir6k1zi8490z4sn52d9pzcqw872-freetype-2.4.11/lib/libfreetype.so.6 (0x00007f34763ff000) libfontconfig.so.1 => /gnu/store/yi31nvrp18x0241zddyyg0m9wl8qglhn-fontconfig-2.10.93/lib/libfontconfig.so.1 (0x00007f34761c4000) libgnutls.so.28 => /gnu/store/rpf0i00hnaql1qi1xchb7nkcfq8h0d84-gnutls-3.2.15/lib/libgnutls.so.28 (0x00007f3475ec1000) libpthread.so.0 => /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libpthread.so.0 (0x00007f3475ca3000) libc.so.6 => /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libc.so.6 (0x00007f34758fa000) liblzma.so.5 => /gnu/store/ah9rclsxmnzg9xif7ws9d4bm82v4lr1l-xz-5.0.4/lib/liblzma.so.5 (0x00007f34756d8000) libgcc_s.so.1 => /gnu/store/1qf4rsznfhvdis39jzdmx0dfjy2jwzgz-gcc-4.8.3-lib/lib/libgcc_s.so.1 (0x00007f34754c2000) libxcb.so.1 => /gnu/store/wl8llszn3q574ijksab621fwv6b4sjsy-libxcb-1.8.1/lib/libxcb.so.1 (0x00007f34752a5000) libXau.so.6 => /gnu/store/xpnyzjq3viyqvqrhsr4vg6gzips9r7sy-libxau-1.0.7/lib/libXau.so.6 (0x00007f34750a2000) libXdmcp.so.6 => /gnu/store/fssqlvp8rbfxm4p02d7pczdi5aq4fxsr-libxdmcp-1.1.1/lib/libXdmcp.so.6 (0x00007f3474e9d000) libdl.so.2 => /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libdl.so.2 (0x00007f3474c99000) libXinerama.so.1 => /gnu/store/grh86nv12p1m4fnysmlf59k8x68c35rj-libxinerama-1.1.2/lib/libXinerama.so.1 (0x00007f3474a97000) libharfbuzz.so.0 => /gnu/store/a8xlnnxhla612yiinlfpg79vvs01fhqs-harfbuzz-0.9.22/lib/libharfbuzz.so.0 (0x00007f3474847000) libXi.so.6 => /gnu/store/yyhqn5fcxi28frn5ca4yk2afx4qcfa6z-libxi-1.6.1/lib/libXi.so.6 (0x00007f3474638000) libpixman-1.so.0 => /gnu/store/dvrvjz8f24saqbv921mwdgfm5x4v1p5s-pixman-0.32.4/lib/libpixman-1.so.0 (0x00007f347438e000) libxcb-shm.so.0 => /gnu/store/wl8llszn3q574ijksab621fwv6b4sjsy-libxcb-1.8.1/lib/libxcb-shm.so.0 (0x00007f347418c000) libxcb-render.so.0 => /gnu/store/wl8llszn3q574ijksab621fwv6b4sjsy-libxcb-1.8.1/lib/libxcb-render.so.0 (0x00007f3473f83000) libXext.so.6 => /gnu/store/ijal248zay4yzbzrjcvnfis9mc14h1ry-libxext-1.3.1/lib/libXext.so.6 (0x00007f3473d71000) libatk-bridge-2.0.so.0 => /gnu/store/mpwapvwy6zwj4rj0jd0hlsvh6pljhb44-at-spi2-atk-2.10.0/lib/libatk-bridge-2.0.so.0 (0x00007f3473b46000) libatspi.so.0 => /gnu/store/974vn9yjhpzibh8ci06gn7njka3c79di-at-spi2-core-2.10.0/lib/libatspi.so.0 (0x00007f3473919000) libpangoft2-1.0.so.0 => /gnu/store/blp52rm0zx4508kaplb46sc1bwxl2iad-pango-1.34.1/lib/libpangoft2-1.0.so.0 (0x00007f3473705000) libgthread-2.0.so.0 => /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libgthread-2.0.so.0 (0x00007f3473504000) libexpat.so.1 => /gnu/store/y0fahbrfx871dijpb5w164y7r2zl6i5j-expat-2.1.0/lib/libexpat.so.1 (0x00007f34732db000) libgmodule-2.0.so.0 => /gnu/store/7v44p77l3867slbpnamzs5jgbyps2v7q-glib-2.40.0/lib/libgmodule-2.0.so.0 (0x00007f34730d8000) libresolv.so.2 => /gnu/store/scmy8hnpccld0jszbgdw5csdc9z8f9jf-glibc-2.19/lib/libresolv.so.2 (0x00007f3472ec1000) libffi.so.6 => /gnu/store/5c94pmrv0x37qjn9qm5w9nphqz1r6l2v-libffi-3.0.13/lib/libffi.so.6 (0x00007f3472cb8000) libuuid.so.1 => /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 => /gnu/store/52kdi2gmrl2ms92as0nsxbbkndqx07s4-libtasn1-4.1/lib/libtasn1.so.6 (0x00007f34728a2000) libnettle.so.4 => /gnu/store/ybrsdvzzd9mwjkx01dcxlv1i6d1p5cd6-nettle-2.7.1/lib/libnettle.so.4 (0x00007f3472675000) libhogweed.so.2 => /gnu/store/ybrsdvzzd9mwjkx01dcxlv1i6d1p5cd6-nettle-2.7.1/lib/libhogweed.so.2 (0x00007f3472447000) libgmp.so.10 => /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="/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="/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="/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="/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=/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=gtk3 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