View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006660 | GNUnet | other | public | 2020-12-06 01:01 | 2020-12-06 12:25 |
| Reporter | md | Assigned To | |||
| Priority | low | Severity | major | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | GNU/Linux | OS | Guix System | OS Version | v??? |
| Product Version | Git master | ||||
| Summary | 0006660: gnunet-guile does not install go-files in correct location | ||||
| Description | gnunet-guile installs .scm and .go files in the same directory. However, guile only searches for .go files in $GUILE_LOAD_COMPILED_PATH and not $GUILE_LOAD_PATH (and in two additional locations based upon the configuration of guile). So when importing a gnunet-guile module, the .scm is recompiled. As the .scm of (gnu gnunet config) is not installed and guile won't find the .go of (gnu gnunet config), imports fail. | ||||
| Steps To Reproduce | guix environment guile-gnunet --ad-goc guile-gnunet [env] $ guile -c '(@ (gnu gnunet identity) ego?) Yes, the guix package of guile-gnunet is a bit old (2015), but the installation directories haven't changed and neither has the special status of (gnu gnunet config) | ||||
| Additional Information | guile --version: guile (GNU Guile) 2.0.14 guix --version: guix (GNU Guix) 0ed6c7444e9a5509df11d4802bb257f3bc883733 Solution: do one or both of below: * install the .scm of (gnu gnunet config) * install .go files where guile can find them. For Guix System a ./configure --godir=??? parameter would be practical p.s. could a gnunet-guile project be made in Mantis for gnunet-guile specific issues? | ||||
| Tags | No tags attached. | ||||
| Attached Files | log (2,687 bytes)
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /gnu/store/8m2r3r56y2yslg0f1f19g1kgvzr4zjh0-profile/share/guile/site/2.0/gnu/gnunet/identity.scm ;;; compiling /gnu/store/8m2r3r56y2yslg0f1f19g1kgvzr4zjh0-profile/share/guile/site/2.0/gnu/gnunet/common.scm ;;; WARNING: compilation of /gnu/store/8m2r3r56y2yslg0f1f19g1kgvzr4zjh0-profile/share/guile/site/2.0/gnu/gnunet/common.scm failed: ;;; ERROR: no code for module (gnu gnunet config) ;;; WARNING: compilation of /gnu/store/8m2r3r56y2yslg0f1f19g1kgvzr4zjh0-profile/share/guile/site/2.0/gnu/gnunet/identity.scm failed: ;;; ERROR: no code for module (gnu gnunet config) Backtrace: In ice-9/psyntax.scm: 302: 19 [get-global-definition-hook ego? (public gnu gnunet identity)] In ice-9/boot-9.scm: 2825: 18 [#<procedure 7fee2a98aea0 at ice-9/boot-9.scm:2813:4 (name #:optional autoload version #:key ensure)> # ...] 3101: 17 [try-module-autoload (gnu gnunet identity) #f] 2412: 16 [save-module-excursion #<procedure 7fee2a8f8cc0 at ice-9/boot-9.scm:3102:17 ()>] 3121: 15 [#<procedure 7fee2a8f8cc0 at ice-9/boot-9.scm:3102:17 ()>] In unknown file: ?: 14 [primitive-load-path "gnu/gnunet/identity" ...] In ice-9/eval.scm: 505: 13 [#<procedure 7fee2aaf5620 at ice-9/eval.scm:499:4 (exp)> #] In ice-9/psyntax.scm: 1107: 12 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...] 990: 11 [scan ((define-module (gnu gnunet identity) #:use-module ...)) () ...] 279: 10 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...] In ice-9/eval.scm: 411: 9 [eval # ()] In ice-9/boot-9.scm: 2987: 8 [define-module* (gnu gnunet identity) #:filename ...] 2962: 7 [resolve-imports ((#) (#) (#) (#) ...)] 2900: 6 [resolve-interface (gnu gnunet configuration) #:select ...] 2825: 5 [#<procedure 7fee2a98aea0 at ice-9/boot-9.scm:2813:4 (name #:optional autoload version #:key ensure)> # ...] 3101: 4 [try-module-autoload (gnu gnunet configuration) #f] 2412: 3 [save-module-excursion #<procedure 7fee2a43d300 at ice-9/boot-9.scm:3102:17 ()>] 3121: 2 [#<procedure 7fee2a43d300 at ice-9/boot-9.scm:3102:17 ()>] In unknown file: ?: 1 [primitive-load-path "gnu/gnunet/configuration" ...] In /gnu/store/8m2r3r56y2yslg0f1f19g1kgvzr4zjh0-profile/share/guile/site/2.0/gnu/gnunet/configuration.scm: 36: 0 [#<procedure 7fee2a4242c0 ()>] /gnu/store/8m2r3r56y2yslg0f1f19g1kgvzr4zjh0-profile/share/guile/site/2.0/gnu/gnunet/configuration.scm:36:0: In procedure #<procedure 7fee2a4242c0 ()>: /gnu/store/8m2r3r56y2yslg0f1f19g1kgvzr4zjh0-profile/share/guile/site/2.0/gnu/gnunet/configuration.scm:36:0: In procedure module-lookup: Unbound variable: define-gnunet | ||||
|
|
The attached patch fixes the issue How to test when running Guix: 1. apply the patch 2. guix environment --pure --ad-hoc guile@2.0 guile-gnunet --with-git-url=guile-gnunet=$PWD --with-commit=guile-gnunet=1049583ecc26a32b5afdedd7c49cd252a1aab74a with 1049583ecc26a32b5afdedd7c49cd252a1aab74a the commit hash after applying the patch and $PWD the location of the git repo 3. $guile scheme@(guile-user)> (use-modules (gnu gnunet identity) 4. Success! 0027-build-Install-.go-and-.scm-in-separate-directories.patch (2,358 bytes)
From 1049583ecc26a32b5afdedd7c49cd252a1aab74a Mon Sep 17 00:00:00 2001
From: Maxime Devos <maxime.devos@student.kuleuven.be>
Date: Sun, 6 Dec 2020 11:29:25 +0100
Subject: [PATCH 27/27] build: Install *.go and *.scm in separate directories
* Makefile.am (moduledir): new variable
* Makefile.am (objectdir): new variable
* Makefile.am: install *.scm and *.go separately
* configure.ac: determine the installation directory for
module source code and compiled code
---
Makefile.am | 5 ++++-
configure.ac | 17 ++++++++++++-----
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 93c7029..ba7253d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
# Guile-GNUnet --- Guile bindings for GNUnet.
# Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2020 Maxime Devos <maxime.devos@student.kuleuven.be>
#
# This file is part of Guile-GNUnet.
#
@@ -31,8 +32,10 @@ MODULES = \
GOBJECTS = $(MODULES:%.scm=%.go) gnu/gnunet/config.go
+moduledir = @guilemoduledir@
+objectdir = @guileobjectdir@
nobase_dist_guilemodule_DATA = $(MODULES)
-nobase_nodist_guilemodule_DATA = $(GOBJECTS)
+nobase_nodist_object_DATA = $(GOBJECTS)
# TODO: Handle tests.
diff --git a/configure.ac b/configure.ac
index b4405c1..a309220 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,16 +21,23 @@ dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
dnl Make sure they are available.
m4_pattern_forbid([PKG_CHECK_MODULES])
m4_pattern_forbid([GUILE_MODULE_AVAILABLE])
+m4_pattern_forbid([GUILE_PKG])
+m4_pattern_forbid([GUILE_PROGS])
+m4_pattern_allow([GUILE_PKG_ERRORS])
+GUILE_PKG([2.0])
+GUILE_PROGS
-PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.7])
-AC_PATH_PROG([GUILE], [guile])
-AC_PATH_PROG([GUILD], [guild])
if test "x$GUILD" = "x"; then
AC_MSG_ERROR(['guild' binary not found; please check your Guile 2.x installation.])
fi
-
-guilemoduledir="${datarootdir}/guile/site/2.0"
+if test "x$GUILE_EFFECTIVE_VERSION" = "x2.0"; then
+ PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.7])
+fi
+dnl Installation directories for .scm and .go files.
+guilemoduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION"
+guileobjectdir="${libdir}/guile/$GUILE_EFFECTIVE_VERSION/site-ccache"
AC_SUBST([guilemoduledir])
+AC_SUBST([guileobjectdir])
AC_CACHE_SAVE
--
2.29.2
|
|
|
oops, these patches are against the old tree from 2015, not the new tree. The new tree is fine actually. |