Subject: Re: bug#13848: Statically linking guile-2.0.

From: [email-masked]
Date: Sun, 10 Mar 2013 23:03:08 +0100

Ok, came pretty far, but then, during the GUILEC phase it started complaining that "poll" is not available, poll.go was't created then, and finally it failed to install poll.go

Here's the log. I tried it both with and without posix and threads enabled.

wrote `web/server.go'
  GUILEC web/server/http.go
Backtrace:
In system/base/compile.scm:
 153: 19 [#<procedure 1f1e400 at system/base/compile.scm:151:8 (port)> #<closed: file 0>]
 216: 18 [read-and-compile #<input: web/server/http.scm 5> #:from ...]
 232: 17 [lp () #f #<module (#{ g96}#) 1f5e900>]
 180: 16 [lp (#<procedure compile-tree-il (x e opts)>) (define-module # # ...) ...]
In ice-9/boot-9.scm:
2191: 15 [save-module-excursion #<procedure 21348e8 at language/scheme/compile-tree-il.scm:29:3 ()>]
In language/scheme/compile-tree-il.scm:
  31: 14 [#<procedure 21348e8 at language/scheme/compile-tree-il.scm:29:3 ()>]
In ice-9/psyntax.scm:
1091: 13 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...]
 976: 12 [scan ((define-module (web server http) #:use-module ...)) () ...]
 270: 11 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
In ice-9/eval.scm:
 411: 10 [eval # ()]
In ice-9/boot-9.scm:
2741: 9 [define-module* (web server http) #:filename ...]
2716: 8 [resolve-imports ((# # #) (#) (#) (#) ...)]
2654: 7 [resolve-interface (ice-9 poll) #:select ...]
2579: 6 [#<procedure 1d54f70 at ice-9/boot-9.scm:2567:4 (name #:optional autoload version #:key ensure)> # ...]
2850: 5 [try-module-autoload (ice-9 poll) #f]
2191: 4 [save-module-excursion #<procedure 21cde70 at ice-9/boot-9.scm:2851:17 ()>]
2870: 3 [#<procedure 21cde70 at ice-9/boot-9.scm:2851:17 ()>]
In unknown file:
   ?: 2 [primitive-load-path "ice-9\\poll" ...]
   ?: 1 [load-extension "libguile-2.0" "scm_init_poll"]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 1f1e3a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)> misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 1f1e3a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: In procedure %init-poll: `poll' unavailable on this platform
  GUILEC web/uri.go
wrote `web/uri.go'
make[4]: Entering directory `/c/Users/shookie/guiletest/lib/guile-2.0/module'
make[4]: Nothing to be done for `install-exec-am'.
  GUILEC ice-9/poll.go
Backtrace:
In ice-9/eval.scm:
 432: 19 [eval # #]
 387: 18 [eval # #]
In srfi/srfi-1.scm:
 619: 17 [for-each #<procedure 1f10ac0 at scripts/compile.scm:179:14 (file)> #]
In scripts/compile.scm:
 182: 16 [#<procedure 1f10ac0 at scripts/compile.scm:179:14 (file)> "ice-9/poll.scm"]
In system/base/target.scm:
  59: 15 [with-target "i686-pc-mingw32" ...]
In system/base/compile.scm:
 150: 14 [compile-file "ice-9/poll.scm" #:output-file ...]
  43: 13 [call-once #<procedure 1f103e0 at system/base/compile.scm:56:5 ()>]
In ice-9/boot-9.scm:
 171: 12 [with-throw-handler #t ...]
In system/base/compile.scm:
  59: 11 [#<procedure 1f103c0 at system/base/compile.scm:58:9 ()>]
 153: 10 [#<procedure 1f10400 at system/base/compile.scm:151:8 (port)> #<closed: file 0>]
 216: 9 [read-and-compile #<input: ice-9/poll.scm 5> #:from ...]
 232: 8 [lp (#<tree-il (let # # ...)>) #<directory (ice-9 poll) 214ddc8> ...]
 180: 7 [lp (#<procedure compile-tree-il (x e opts)>) (eval-when # #) ...]
In ice-9/boot-9.scm:
2191: 6 [save-module-excursion #<procedure 2158c18 at language/scheme/compile-tree-il.scm:29:3 ()>]
In language/scheme/compile-tree-il.scm:
  31: 5 [#<procedure 2158c18 at language/scheme/compile-tree-il.scm:29:3 ()>]
In ice-9/psyntax.scm:
1091: 4 [expand-top-sequence ((eval-when # #)) () ((top)) ...]
 976: 3 [scan ((eval-when # #)) () ((top)) ...]
 270: 2 [scan ((load-extension # "scm_init_poll")) () ((top)) ...]
In unknown file:
   ?: 1 [load-extension "libguile-2.0" "scm_init_poll"]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 1f103a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)> misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 1f103a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: In procedure %init-poll: `poll' unavailable on this platform
  GUILEC scripts/autofrisk.go
Backtrace:
In ice-9/psyntax.scm:
1101: 19 [expand-top-sequence ((define (unglob pattern) (let # #))) () ...]
1259: 18 [#<procedure 2181540 at ice-9/psyntax.scm:1067:36 ()>]
1605: 17 [expand-simple-lambda (# . #) () (()) ...]
1509: 16 [parse (((# #) . #(syntax-object # # #))) () () () () () ()]
In ice-9/boot-9.scm:
 627: 15 [map #<procedure 21add50 at ice-9/psyntax.scm:1510:50 (x)> ((# . #))]
In ice-9/psyntax.scm:
2114: 14 [expand-let (let # #) (# #) (# # #) ...]
In ice-9/boot-9.scm:
 627: 13 [map #<procedure 21acf20 at ice-9/psyntax.scm:2114:49 (x)> (#)]
In ice-9/psyntax.scm:
1257: 12 [#<procedure 21acf20 at ice-9/psyntax.scm:2114:49 (x)> (open-input-pipe #)]
1186: 11 [syntax-type (open-input-pipe #) (# #) (# # #) ...]
 579: 10 [syntax-type open-input-pipe (# #) (# # #) ...]
 292: 9 [get-global-definition-hook open-input-pipe (hygiene scripts autofrisk)]
In unknown file:
   ?: 8 [module-variable #<directory (scripts autofrisk) 214ddc8> open-input-pipe]
In ice-9/boot-9.scm:
2790: 7 [b #<autoload (ice-9 popen) 214d6c0> open-input-pipe #f]
2579: 6 [#<procedure 1d53f50 at ice-9/boot-9.scm:2567:4 (name #:optional autoload version #:key ensure)> # ...]
2850: 5 [try-module-autoload (ice-9 popen) #f]
2191: 4 [save-module-excursion #<procedure 21adc60 at ice-9/boot-9.scm:2851:17 ()>]
2870: 3 [#<procedure 21adc60 at ice-9/boot-9.scm:2851:17 ()>]
In unknown file:
   ?: 2 [primitive-load-path "ice-9\\popen" ...]
   ?: 1 [load-extension "libguile-2.0" "scm_init_popen"]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 1f103a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)> misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 1f103a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: In procedure dynamic-link: file: "libguile-2.0", message: "The specified module could not be found."
  GUILEC scripts/scan-api.go
Backtrace:
In system/base/compile.scm:
 153: 19 [#<procedure 1f10400 at system/base/compile.scm:151:8 (port)> #<closed: file 0>]
 216: 18 [read-and-compile #<input: scripts/scan-api.scm 5> #:from ...]
 232: 17 [lp () #f #<module (#{ g96}#) 1f51900>]
 180: 16 [lp # # # ...]
In ice-9/boot-9.scm:
2191: 15 [save-module-excursion #<procedure 2107840 at language/scheme/compile-tree-il.scm:29:3 ()>]
In language/scheme/compile-tree-il.scm:
  31: 14 [#<procedure 2107840 at language/scheme/compile-tree-il.scm:29:3 ()>]
In ice-9/psyntax.scm:
1091: 13 [expand-top-sequence ((define-module # :use-module # ...)) () ((top)) ...]
 976: 12 [scan ((define-module (scripts scan-api) :use-module ...)) () ...]
 270: 11 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
In ice-9/eval.scm:
 411: 10 [eval # ()]
In ice-9/boot-9.scm:
2741: 9 [define-module* (scripts scan-api) #:filename ...]
2716: 8 [resolve-imports (((ice-9 popen)) ((ice-9 rdelim)) ((ice-9 regex)))]
2654: 7 [resolve-interface (ice-9 popen) #:select ...]
2579: 6 [#<procedure 1d53f70 at ice-9/boot-9.scm:2567:4 (name #:optional autoload version #:key ensure)> # ...]
2850: 5 [try-module-autoload (ice-9 popen) #f]
2191: 4 [save-module-excursion #<procedure 2134108 at ice-9/boot-9.scm:2851:17 ()>]
2870: 3 [#<procedure 2134108 at ice-9/boot-9.scm:2851:17 ()>]
In unknown file:
   ?: 2 [primitive-load-path "ice-9\\popen" ...]
   ?: 1 [load-extension "libguile-2.0" "scm_init_popen"]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 1f103a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)> misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 1f103a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: In procedure dynamic-link: file: "libguile-2.0", message: "The specified module could not be found."
  GUILEC web/server/http.go
Backtrace:
In system/base/compile.scm:
 153: 19 [#<procedure 1f1b400 at system/base/compile.scm:151:8 (port)> #<closed: file 0>]
 216: 18 [read-and-compile #<input: web/server/http.scm 5> #:from ...]
 232: 17 [lp () #f #<module (#{ g96}#) 1f5b900>]
 180: 16 [lp (#<procedure compile-tree-il (x e opts)>) (define-module # # ...) ...]
In ice-9/boot-9.scm:
2191: 15 [save-module-excursion #<procedure 2112960 at language/scheme/compile-tree-il.scm:29:3 ()>]
In language/scheme/compile-tree-il.scm:
  31: 14 [#<procedure 2112960 at language/scheme/compile-tree-il.scm:29:3 ()>]
In ice-9/psyntax.scm:
1091: 13 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...]
 976: 12 [scan ((define-module (web server http) #:use-module ...)) () ...]
 270: 11 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
In ice-9/eval.scm:
 411: 10 [eval # ()]
In ice-9/boot-9.scm:
2741: 9 [define-module* (web server http) #:filename ...]
2716: 8 [resolve-imports ((# # #) (#) (#) (#) ...)]
2654: 7 [resolve-interface (ice-9 poll) #:select ...]
2579: 6 [#<procedure 1d53f60 at ice-9/boot-9.scm:2567:4 (name #:optional autoload version #:key ensure)> # ...]
2850: 5 [try-module-autoload (ice-9 poll) #f]
2191: 4 [save-module-excursion #<procedure 2304db0 at ice-9/boot-9.scm:2851:17 ()>]
2870: 3 [#<procedure 2304db0 at ice-9/boot-9.scm:2851:17 ()>]
In unknown file:
   ?: 2 [primitive-load-path "ice-9\\poll" ...]
   ?: 1 [load-extension "libguile-2.0" "scm_init_poll"]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 1f1b3a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)> misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 1f1b3a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: In procedure %init-poll: `poll' unavailable on this platform

 /bin/install -c -m 644  ice-9/psyntax-pp.go ice-9/boot-9.go ice-9/vlist.go ice-9/r4rs.go ice-9/r5rs.go ice-9/deprecated.go ice-9/and-let-star.go ice-9/binary-ports.go ice-9/calling.go ice-9/command-line.go ice-9/common-list.go ice-9/con
trol.go ice-9/curried-definitions.go ice-9/debug.go ice-9/documentation.go ice-9/eval-string.go ice-9/expect.go ice-9/format.go ice-9/futures.go ice-9/getopt-long.go ice-9/hcons.go ice-9/i18n.go ice-9/iconv.go ice-9/lineio.go ice-9/ls.go
 ice-9/mapping.go ice-9/match.go ice-9/networking.go ice-9/null.go ice-9/occam-channel.go ice-9/optargs.go ice-9/poe.go ./ice-9/poll.go ice-9/posix.go ice-9/q.go ice-9/rdelim.go ice-9/receive.go ice-9/regex.go ice-9/runq.go ice-9/rw.go '
/c/Users/shookie/guiletest/lib/lib/guile/2.0/ccache//ice-9'
/bin/install: cannot stat `./ice-9/poll.go': No such file or directory
make[4]: *** [install-nobase_ccacheDATA] Error 1
make[4]: Leaving directory `/c/Users/shookie/guiletest/lib/guile-2.0/module'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/c/Users/shookie/guiletest/lib/guile-2.0/module'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/c/Users/shookie/guiletest/lib/guile-2.0'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/c/Users/shookie/guiletest/lib/guile-2.0'
make: *** [lib/lib/libguile-2.0.a] Error 2

On 10.03.2013, at 20:23, Andy Wingo <[email-masked]> wrote:

> On Sun 10 Mar 2013 18:32, Andy Wingo <[email-masked]> writes:
> 
>>> The problem is, when I do build bdw-gc with posix threads, the guile
>>> module compiling is all broken, it periodically drops messages like
>>> this:
>>> 
>>>  GUILEC ice-9/eval.go
>>> Backtrace:
>>> In unknown file:
>>>   ?: 3 [apply-smob/1 #<boot-closure 192c100 (_ _ _)> #t ...]
>>>   ?: 2 [apply-smob/1 #<catch-closure 1ccee70>]
>>>   ?: 1 [primitive-eval ((@ # %) (begin # # #))]
>>>   ?: 0 [chmod #<closed: file 0> 438]
> 
> I have made what might be a fix for this issue.  Can you try this
> tarball:
> 
>  http://wingolog.org/priv/guile-2.0.7.182-e9381.tar.gz
> 
> Thanks,
> 
> Andy
> -- 
> http://wingolog.org/