From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: Re: Building Guix with Guile 2.1 Date: Wed, 21 Sep 2016 21:40:10 +0200 Message-ID: <877fa5oxd1.fsf@T420.taylan> References: <87fuotl367.fsf@gnu.org> <874m59fan7.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmnOT-0007x0-H4 for guix-devel@gnu.org; Wed, 21 Sep 2016 15:41:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmnOP-00067R-78 for guix-devel@gnu.org; Wed, 21 Sep 2016 15:41:20 -0400 In-Reply-To: <874m59fan7.fsf@igalia.com> (Andy Wingo's message of "Wed, 21 Sep 2016 19:03:24 +0200") 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" To: Andy Wingo Cc: guix-devel Andy Wingo writes: > On Wed 21 Sep 2016 10:23, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Hello! >> >> Nalaginrut reported that Guix fails to build with Guile 2.2, which was a >> bit of a shame, hence commits e465d9e19087ab150f7e31f21c09e4a147b93b36 >> and 9d126aa2b504bb9fad536eac186805ff623e96be. >> >> Now, the hack in build-aux/compile-all.scm doesn=E2=80=99t quite work wi= th 2.2, >> and it was already quite fragile. > > Which hack? You mean loading modules before compiling? I guess you > should load the compiler modules too FWIW, perhaps that's an issue. > > If there is a nice change we can do to make module-loading thread-safe, > let's think about that :) It's probably the biggest thread-safety > problem we have in Guile and now would be the right time to fix it. It would be neat to make module loading thread-safe indeed! Not sure if this issue is related to that though... Currently the .go compilation phase of 'make' errors like: > [... snip ...] > LOAD (guix build-system haskell) > LOAD (guix build-system perl) > LOAD (guix build-system python) > LOAD (guix build-system waf) > Backtrace: > 18 (primitive-load "/home/taylan/src/guix/./build-aux/comp?") > In ice-9/eval.scm: > 608:8 17 (_ #(#(#(#(#(# ?) ?) ?) ?) ?)) > In ice-9/boot-9.scm: > 262:13 16 (for-each1 ("guix/build-system/waf.scm" "guix/build-?" ?)) > 2788:17 15 (resolve-interface (guix build-system waf) #:select _ # ?) > 2713:10 14 (_ (guix build-system waf) _ _ #:ensure _) > 2989:16 13 (try-module-autoload _ _) > 2325:4 12 (save-module-excursion #) > 3009:22 11 (_) > In unknown file: > 10 (primitive-load-path "guix/build-system/waf" #) > In ice-9/eval.scm: > 710:20 9 (primitive-eval (define-module (guix build-system #) # ?)) > In ice-9/psyntax.scm: > 1209:36 8 (expand-top-sequence ((define-module (guix # waf) # ?)) ?) > 1156:24 7 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) > 279:10 6 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?) > In ice-9/eval.scm: > 293:34 5 (_ #) > In ice-9/boot-9.scm: > 2849:10 4 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?) > 2801:10 3 (resolve-interface (guix build-system python) #:select _ ?) > 262:13 2 (for-each1 (default-python default-python2)) > 2806:38 1 (_ _) > In unknown file: > 0 (scm-error misc-error #f "~A" ("no binding `default-p?") ?) > > ERROR: In procedure scm-error: > ERROR: no binding `default-python' in module (guix build-system python) That's in the phase where the modules are all loaded by calling 'resolve-interface' on their names, which is *not* done in parallel. To quote compile-all.scm: > [... snip ...] > > ;;; To work around (FIXME), we want to load a= ll > ;;; files to be compiled first. We do this via resolve-interface so that= the > ;;; top-level of each file (module) is only executed once. > (define (load-module-file file) > (let ((module (file->module file))) > (format #t " LOAD ~a~%" module) > (resolve-interface module))) > > [... snip ...] > > (match (command-line) > ((_ . files) > (let ((files (filter file-needs-compilation? files))) > (for-each load-module-file files) > (let ((mutex (make-mutex))) > (par-for-each (lambda (file) > (compile-file* file mutex)) > files))))) I ran guile via ./pre-inst-env and executed (resolve-interface '(guix build-system waf)) manually and actually got a similar / the same error: > [... snip ...] > ;;; WARNING: compilation of /home/taylan/src/guix/guix/build-system/waf.s= cm failed: > ;;; ERROR: no binding `default-python' in module (guix build-system pytho= n) > ERROR: In procedure scm-error: > ERROR: no binding `default-python' in module (guix build-system python) Looking into (guix build-system waf), it contains: > ... > #:use-module ((guix build-system python) > #:select (default-python default-python2)) > ... but (guix build-system python) does not export default-python. Apparently Guile 2.0 allows this (to select private bindings), but 2.2 does not. Reading the documentation for #:select I can't really tell which behavior is intended. Taylan