IRC channel logs
2015-12-16.log
back to list of logs
<cmhobbs>nalaginrut, a little late but hello! <sneek>cmhobbs, you have 1 message. <sneek>cmhobbs, fps says: yes, gnunet is available <lcl___>hi all - just tried guile 2.1.1 on a FreeBSD 10.2 system, and encountered a bunch of issues <lcl___>easiest way to reproduce is to get on a FreeBSD 10.2 system and then configure with: --with-libltdl-prefix=/usr/local --with-libgmp-prefix=/usr/local --with-libunistring-prefix=/usr/local --without-threads <lcl___>you'll then see a bunch of compiler warnings (clang 3.4 being the default $CC on such a system) <lcl___>(sorry for the delay, am reproducing myself now) <lcl___>now; the build will get to: "GEN guile-procedures.texi" <lcl___>the trace is (give me a minute) : <wingo>that step is where the newly-built guile is run for the first time <lcl___>Program received signal SIGSEGV, Segmentation fault. <lcl___>0x0000000801c2dbb0 in __bsd_iconv () from /lib/libc.so.7 <lcl___>#0 0x0000000801c2dbb0 in __bsd_iconv () from /lib/libc.so.7 <lcl___>#1 0x0000000800908475 in rpl_iconv (cd=0x24071b0, inbuf=0x0, inbytesleft=0x0, outbuf=0x0, outbytesleft=0x0) at iconv.c:448 <lcl___>#2 0x00000008009069ce in mem_cd_iconveh_internal (src=0x6c80d0 "ice-9/eval.scm", srclen=14, cd=0x24071b0, cd1=0x24071c0, cd2=0x24071d0, handler=iconveh_question_mark, extra_alloc=8, offsets=0x0, resultp=<value optimized out>, lengthp=0x1fff) at striconveh.c:412 <lcl___>#3 0x0000000800907b06 in mem_iconveh (src=0x6c80d0 "ice-9/eval.scm", srclen=14, from_codeset=<value optimized out>, to_codeset=<value optimized out>, handler=iconveh_question_mark, offsets=0x0, lengthp=<value optimized out>) at striconveh.c:1023 <lcl___>#4 0x00000008008de9fa in scm_to_stringn (str=0x6d2420, lenp=0x0, encoding=<value optimized out>, handler=SCM_FAILED_CONVERSION_QUESTION_MARK) at strings.c:2241 <lcl___>#5 0x00000008008903df in search_path (path=0x6d0450, filename=0x6d2420, extensions=0x304, require_exts=0x4, stat_buf=0x7fffffffe690) at load.c:570 <lcl___>#6 0x00000008008910a2 in scm_init_eval_in_scheme () at load.c:1093 <lcl___>#7 0x00000008008882aa in scm_i_init_guile (base=<value optimized out>) at init.c:506 <lcl___>#8 0x00000008008e6a73 in with_guile_and_parent (base=0x7fffffffe7a8, data=0x7fffffffe7d8) at threads.c:713 <lcl___>#9 0x0000000800b73f1b in GC_call_with_stack_base () from /usr/local/lib/libgc.so.1 <lcl___>#10 0x00000008008e489b in scm_with_guile (func=0x24071b0, data=<value optimized out>) at threads.c:829 <lcl___>#11 0x0000000800887ed5 in scm_boot_guile (argc=1, argv=0x7fffffffe8d0, closure=0x0) at init.c:321 <lcl___>#12 0x0000000000400bea in main (argc=1, argv=0x7fffffffe8d0) at guile.c:101 <lcl___>if I get rid of the "rpl_" stuff <lcl___>and make iconv()/iconv_open()/iconv_close() calls actually go right through to the libc iconv functions <wingo>i tried to update gnulib before releasing but there were unrelated failures <lcl___>well, just FYI, one of the (many) clang warnings is: <wingo>it could be that we require gnu iconv. but i don't know. this failure rings a bell but a segfault is a pretty bad failure mechanism <lcl___>iconv_open.c:111:18: warning: implicit declaration of function 'iconv_open' is invalid in C99 <lcl___>okay, well, i'll try to investigate that a bit more (update gnulib maybe) <lcl___>there's a "workaround" here, I *think*, which is: build with GCC <wingo>this doesn't sound like a clang/gcc issue fwiw <lcl___>in that multiple versions of clang behave in the same way <lcl___>(while waiting: I suspect clang is just being strict, and there is a genuine issue with gnulib) <wingo>one thing to check: was your libunistring built with iconv support? <lcl___>i don't know if clang has a 'pretend to be GCC' mode on freebsd, maybe it does <wingo>at least it used to be the case that somehow this was optional <wingo>and it could cause freebsd compilation errors <lcl___>interesting - any idea how I would check? <lcl___>(I know nothing about iconv/libunistring to be honest) <lcl___>ok, so my build with GCC 4.8 (which just happened to be installed) is going <lcl___>that 'GEN' appears to complete, and now I see: <lcl___>it stays there for nearly two minutes <wingo>so after that point comes the wait <wingo>it takes a ridiculously long time <wingo>it's building the compiler while it's compiling the compiler etc <wingo>assuming you kicked it off with -j4 or something, expect about 3 minutes for eval.go, 20 for the next file, then things parallelize and it will take another 40 minutes <lcl___> ?: 19 [primitive-load-path "language/cps/utils" #<boot-closure 1d9dba0 ()>] <lcl___> ?: 18 [primitive-eval (define-module (language cps utils) #:use-module ...)] <lcl___> ?: 17 [apply-smob/1 #<boot-closure af6300 (_)> (define-module # #:use-module ...)] <lcl___> ?: 15 [apply-smob/1 #<boot-closure 2a92f60 ()>] <lcl___> ?: 14 [apply-smob/1 #<boot-closure 2a92e40 ()>] <lcl___> ?: 13 [apply-smob/1 #<boot-closure 2a92dc0 ()>] <lcl___> ?: 12 [apply-smob/1 #<boot-closure 2a921c0 ()>] <lcl___> ?: 11 [primitive-load-path "language/cps/intmap" #<boot-closure 2a92140 ()>] <lcl___> ?: 10 [primitive-eval (define-module (language cps intmap) #:use-module ...)] <lcl___> ?: 9 [apply-smob/1 #<boot-closure af6300 (_)> (define-module # #:use-module ...)] <wingo>ACTION waits as the flood comes through <lcl___> ?: 7 [apply-smob/1 #<boot-closure 262ff60 ()>] <lcl___> ?: 6 [apply-smob/1 #<boot-closure 262fe40 ()>] <lcl___> ?: 5 [apply-smob/1 #<boot-closure 262fdc0 ()>] <lcl___> ?: 4 [apply-smob/1 #<boot-closure 262f020 ()>] <lcl___> ?: 3 [primitive-load-path "srfi/srfi-18" #<boot-closure 264bfa0 ()>] <lcl___> ?: 1 [scm-error misc-error #f ...] <lcl___> ?: 0 [apply-smob/1 #<boot-closure cd8760 (_ . _)> misc-error ...] <lcl___>ERROR: Makefile:1892: recipe for target 'ice-9/eval.go' failed <lcl___>so, just to clarify: I get that backtrace if I build with GCC4.8 <lcl___>*or* clang (3.4+) so long as I zap the "rpl_" iconv stuff <wingo>so srfi-18 is the date/time library. it relies on some locale-related facilities from the host. <wingo>just to check, have you been able to build a 2.0 guile? <wingo>srfi-18 is the thread library <wingo>maybe you built without threads and that carps? there is something in that file that wants the value of (current-thread)... hum <wingo>for the purposes of that file, returning #f for (current-thread) would be acceptable <wingo>and indeed, loading srfi-18 without threading support will throw. hum. <wingo>lcl___: if you are up for it, just remove the line from intmap.scm that says <wingo> #:use-module (srfi srfi-18) <wingo>because the binding that module needs, `current-thread', is actually provided by the (guile) as well <lcl___>(oh, you've probably guessed but building with --with-threads doesn't work) <lcl___>there it's a silly issue, on freebsd the thread-capable boehm GC library has a different name <lcl___>I *assume* that if the configure script knew or could be taught that, the linker errors (can't find GC_blah_blah()) would go away <lcl___>I hereby declare your fix successful! <lcl___>it has been sitting here for 3.5 minutes already <wingo>and now, ignore the build process for an hour or so :) <wingo>i have a blog post pending about why things are so slow and things to make it faster, but we should also probably print out a message warning people about what's happening :) <lcl___>well, thanks in advance for fixing that srfi-18 thing <wingo>np, thanks for the report. happy hacking :) <lcl___>thanks! i have to run away now, but i'll be back (tm) <wingo>i'll give a go building guile with clang sometime <lcl___>yep, the warnings should be informative. but probably to the gnulib folk as much as to you :( <rjmacready>i wanted to use guile as a scripting language for a c++ command line application <alezost>rjmacready: I think the main resource is the guile manual (I'm not competent though :-)) <davexunit>the manual documents which procedures have C variants <alezost>yes, there are many "scm_*" procedures all over the manual <rjmacready>hmm, so i assume that if i want to load a file, i have to run scm_c_primitive_load( ...filename... ) <rjmacready>does anybody have any fancy setup for developing in scheme? other than straight emacs / vi / whatever? <rjmacready>i have some experience with emacs + slime + sbcl <paroneayea>rjmacready: yeah geiser is a lot like slime for scheme <paroneayea>rjmacready: also add company-mode onto what davexunit recommended for nice autocomplete :) <paroneayea>autocomplete is less immediately needed than the other things, but super nice :) <paroneayea>davexunit: ah right, it does... just not as fancily <davexunit>otherwise i don't know how it could possibly know what Scheme symbols are available <davexunit>paroneayea: oh cool, I thought it was just one of those "complete things that you've typed before" things <davexunit>amazing how many things become easier with a running system to talk to <paroneayea>rjmacready: I'll argue that once you start using guile + geiser, the main problem you'll have is that you might have to go back to using some other language, and it's just not as nice as an environment :) <davexunit>"hey Scheme environment, what things begin with 'foo'?" <paroneayea>rjmacready: I say as a person who does a lot of python (and runs a big python project!) <davexunit>paroneayea is right. I've become a spoiled, bitter Geiser user. <paroneayea>davexunit: I think maybe I should build a whole second tutorial for guile which is how to get the optimal guile + emacs setup :) <paroneayea>(obviously it does not belong in the main tutorial) <paroneayea>ACTION tacks that on top of the teetering pile of projects on his plate <davexunit>paroneayea: that would be good though for more experienced users <davexunit>a "here's to unlock all the awesome" tutorial <paroneayea>hey wingo, I had an email exchange with Jonathan Rees, and he said that the W7 security kernel had "barely anything to it" but that he'd release it publicly anyway, and here it is: https://github.com/jar398/w7 <rjmacready>also, silly question, does anybody uses guile for web applications? <davexunit>for example, in the GNU Guix project, we have a small application called 'guix publish' that is a guile web server <davexunit>web programming with Guile is nice, just needs more bells and whistles <paroneayea>davexunit: a friend of mine recently said they use the web interface regularly <paroneayea>davexunit: it's not merged into guix yet I think right? <davexunit>paroneayea: I had no idea that people other than rekado used that <davexunit>it's only useful for searching things at the moment <davexunit>phew, finished up assigning Scheme symbols to SDL2's keycode and scancode constants. <davexunit>that was one of the most tedious things I've done in awhile <davexunit>not too many more events to wrap before I've covered all of what Sly uses. <davexunit>then I just need to wrap a handful of things from SDL_ttf, SDL_mixer, and SDL_image and I'm ready to rock. <davexunit>I'll release version 0.1 and request patches to add more stuff. <nalaginrut>I always want to use SDL for games, but we have game engine now <davexunit>I'm just curious because I hope to recruit more helpers <nalaginrut>I hope I can help, but I spend much time on Artanis and compilers...alas, maybe we need more people ;-P <davexunit>just hoping to eventually not be the only one maintaining some of this stuff :) <nalaginrut>I think documents are important, especially some "internal document" to help people know your design and the principle, or they can hardly help <davexunit>guile-sdl2 0.1 will not have a manual, but subsequent releases will. <nalaginrut>besides, we need more posts to help people learn Guile <nalaginrut>read the manual is the most important way, but not the interesting way <nalaginrut>inotify works, Artanis will have file monitoring to load modules automatically in debug-mode <rjmacready>is it normal for scm_call_* to crash if it's called in the not-main thread? <rjmacready>ah the chapter 5.4.5 seems to imply that any thread that wants to call guile needs to run one of the initialization functions