all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Fix guile-emacs build failure
@ 2016-02-28 19:44 Ricardo Wurmus
  2016-02-28 19:50 ` Efraim Flashner
  0 siblings, 1 reply; 7+ messages in thread
From: Ricardo Wurmus @ 2016-02-28 19:44 UTC (permalink / raw)
  To: guix-devel

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

Hi Guix,

Guile Emacs can no longer be built.  GCC fails a configure test:

~~~~~~~~~~~~~
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/guix-build-guile-emacs-20150512.41120e0.drv-0/source':
configure: error: C compiler cannot create executables
See `config.log' for more details
~~~~~~~~~~~~~

“config.log” reveals that GCC failed on the following trivial file:

~~~~~~~~~~~~~
/* confdefs.h */
#define PACKAGE_NAME "GNU Emacs"
#define PACKAGE_TARNAME "emacs"
#define PACKAGE_VERSION "24.4.50"
#define PACKAGE_STRING "GNU Emacs 24.4.50"
#define PACKAGE_BUGREPORT "bug-gnu-emacs@gnu.org"
#define PACKAGE_URL "http://www.gnu.org/software/emacs/"
#define PACKAGE "emacs"
#define VERSION "24.4.50"
#define MAIL_USE_POP 1
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
~~~~~~~~~~~~~

So I opened an environment with “guix environment --pure guile-emacs”
and ran “gcc --verbose conftest.c”, where “conftest.c” contains the test
programme above.  This is what I get:

~~~~~~~~~~~~~
rekado@banana in source [env]: gcc --verbose conftest.c 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/gnu/store/pg8nnqprjxgwhwiyh8nhbphzj53ax77i-gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: 
Thread model: posix
gcc version 4.9.3 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 /gnu/store/pg8nnqprjxgwhwiyh8nhbphzj53ax77i-gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/cc1 -quiet -v conftest.c -quiet -dumpbase conftest.c -mtune=generic -march=x86-64 -auxbase conftest -version -o /tmp/ccp7oiXi.s
GNU C (GCC) version 4.9.3 (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.9.3, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/no-gcc-local-prefix/include"
ignoring nonexistent directory "/gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../../../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /gnu/store/b2r0dq25720qilqr4m4a436gxy8ppml3-profile/include
 /gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include
 /gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed
 /gnu/store/sgzfawy95pfn7nsw3xvmca58llm5zzbc-glibc-2.22/include
End of search list.
GNU C (GCC) version 4.9.3 (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.9.3, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: b87adce59d40c64e9bafeee32b3f9c51
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/ccNJYsWO.o /tmp/ccp7oiXi.s
GNU assembler version 2.25.1 (x86_64-unknown-linux-gnu) using BFD version (GNU Binutils) 2.25.1
COMPILER_PATH=/gnu/store/pg8nnqprjxgwhwiyh8nhbphzj53ax77i-gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/:/gnu/store/pg8nnqprjxgwhwiyh8nhbphzj53ax77i-gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/:/gnu/store/pg8nnqprjxgwhwiyh8nhbphzj53ax77i-gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/:/gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/:/gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/gnu/store/b2r0dq25720qilqr4m4a436gxy8ppml3-profile/lib/:/gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/:/gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../../:/gnu/store/sgzfawy95pfn7nsw3xvmca58llm5zzbc-glibc-2.22/lib
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 /gnu/store/pg8nnqprjxgwhwiyh8nhbphzj53ax77i-gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/collect2 -plugin /gnu/store/pg8nnqprjxgwhwiyh8nhbphzj53ax77i-gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/liblto_plugin.so -plugin-opt=/gnu/store/pg8nnqprjxgwhwiyh8nhbphzj53ax77i-gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccpvCgWk.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /gnu/store/sgzfawy95pfn7nsw3xvmca58llm5zzbc-glibc-2.22/lib/ld-linux-x86-64.so.2 /gnu/store/b2r0dq25720qilqr4m4a436gxy8ppml3-profile/lib/crt1.o /gnu/store/b2r0dq25720qilqr4m4a436gxy8ppml3-profile/lib/crti.o /gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/crtbegin.o -L/gnu/store/b2r0dq25720qilqr4m4a436gxy8ppml3-profile/lib -L/gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3 -L/gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../.. -L/gnu/store/sgzfawy95pfn7nsw3xvmca58llm5zzbc-glibc-2.22/lib /tmp/ccNJYsWO.o -lgcc --as-needed -lgcc_s --no-as-needed -L/gnu/store/sgzfawy95pfn7nsw3xvmca58llm5zzbc-glibc-2.22/lib -rpath=/gnu/store/sgzfawy95pfn7nsw3xvmca58llm5zzbc-glibc-2.22/lib -rpath=/gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib -lgcc_s -lc -lgcc --as-needed -lgcc_s --no-as-needed /gnu/store/pkasxagsa4z4viscfpl6sjszmdmwncl1-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/crtend.o /gnu/store/b2r0dq25720qilqr4m4a436gxy8ppml3-profile/lib/crtn.o
collect2: error: ld terminated with signal 6 [Aborted]
Throw without catch before boot:
Aborting.
~~~~~~~~~~~~~

“Throw without catch before boot” actually sounds like a Guile error, so
I looked at whether there have been any changes to
“guile-for-guile-emacs” (or “guile-next” from which it inherits)
recently, and yes: commit dd90ed892a7dbe13a214b2d7ebf321b866211374
changed the search paths for “guile-next”, which broke
“guile-for-guile-emacs”.

The attached patch adds a “native-search-paths” field to
“guile-for-guile-emacs” to override the one specified by “guile-next”.

~~ Ricardo


[-- Attachment #2: 0001-gnu-guile-for-guile-emacs-Use-guile-2.0-search-paths.patch --]
[-- Type: text/x-patch, Size: 1544 bytes --]

From a1e9bb30d410f83b69ccb980c0052913ccfb3dd8 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sun, 28 Feb 2016 20:42:13 +0100
Subject: [PATCH] gnu: guile-for-guile-emacs: Use guile-2.0 search paths.

* gnu/packages/guile.scm (guile-for-guile-emacs)[native-search-paths]:
  Use the same search paths as guile-2.0.
---
 gnu/packages/guile.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 5349fda..882a62d 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -255,7 +256,16 @@ without requiring the source code to be rewritten.")
        ("flex" ,flex)
        ("texinfo" ,texinfo)
        ("gettext" ,gnu-gettext)
-       ,@(package-native-inputs guile-next)))))
+       ,@(package-native-inputs guile-next)))
+    ;; Same as in guile-2.0
+    (native-search-paths
+     (list (search-path-specification
+            (variable "GUILE_LOAD_PATH")
+            (files '("share/guile/site/2.0")))
+           (search-path-specification
+            (variable "GUILE_LOAD_COMPILED_PATH")
+            (files '("lib/guile/2.0/ccache"
+                     "share/guile/site/2.0")))))))
 
 \f
 ;;;
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-13 22:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-28 19:44 [PATCH] Fix guile-emacs build failure Ricardo Wurmus
2016-02-28 19:50 ` Efraim Flashner
2016-02-28 19:58   ` Ricardo Wurmus
2016-03-12 17:47     ` Danny Milosavljevic
2016-03-12 21:17       ` Christopher Allan Webber
2016-03-12 21:42         ` Danny Milosavljevic
2016-03-13 22:05         ` Ludovic Courtès

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.