* [bug #30480] VM: load looks for files in the wrong directory @ 2010-07-18 22:51 Luca Saiu 2010-07-18 22:54 ` Luca Saiu 0 siblings, 1 reply; 13+ messages in thread From: Luca Saiu @ 2010-07-18 22:51 UTC (permalink / raw) To: Luca Saiu, bug-guile URL: <http://savannah.gnu.org/bugs/?30480> Summary: VM: load looks for files in the wrong directory Project: Guile Submitted by: positrone Submitted on: Mon 19 Jul 2010 12:51:53 AM CEST Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: The behavior of the load function in bytecode programs is wrong and different from interpreted programs. * The interpreter works just like 1.8 did: loaded files are looked for in paths relative to the directory of the script calling load. This is the reasonable and useful behavior. * The virtual machine looks for the file to load in paths relative to the cwd (I don't know if at startup time or at load time). Absolute pathnames work in either case. Ludovic said this when we spoke about that in Göteborg: load should call canonicalize-path relative to the directory of the file which loads the other one, not relative to `pwd`. Of course this is a regression compared to 1.8. How to reproduce the malfunction, in a particularly simple case (no explicit relative paths in the pathnames given to load): $ cd /tmp; mkdir q; echo '(display "b\n")' > q/b.scm; echo '(load "b.scm")(display "a\n")' > q/a.scm $ rm -rf ~/.cache $ guile --no-autocompile q/a.scm b a $ guile --autocompile q/a.scm ;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-autocompile argument to disable. ;;; compiling q/a.scm ;;; compiled /home/luca/.cache/guile/ccache/2.0-0.Q-LE-8/tmp/q/a.scm.go ERROR: In procedure open-file: ERROR: No such file or directory: "b.scm" _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30480> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug #30480] VM: load looks for files in the wrong directory 2010-07-18 22:51 [bug #30480] VM: load looks for files in the wrong directory Luca Saiu @ 2010-07-18 22:54 ` Luca Saiu 2010-07-18 22:59 ` Luca Saiu 0 siblings, 1 reply; 13+ messages in thread From: Luca Saiu @ 2010-07-18 22:54 UTC (permalink / raw) To: Luca Saiu, bug-guile Follow-up Comment #1, bug #30480 (project guile): I've written "I don't know if at startup time or at load time". Mmm. Since the problem exists, I strongly suspect it's at startup time. Sorry for the noise. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30480> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug #30480] VM: load looks for files in the wrong directory 2010-07-18 22:54 ` Luca Saiu @ 2010-07-18 22:59 ` Luca Saiu 2010-07-24 16:16 ` Ludovic Courtès 0 siblings, 1 reply; 13+ messages in thread From: Luca Saiu @ 2010-07-18 22:59 UTC (permalink / raw) To: Luca Saiu, bug-guile Follow-up Comment #2, bug #30480 (project guile): Sorry again, I must be tired: there was no reason for me to suppose that load changed the current directory. Please ignore my previous comment. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30480> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug #30480] VM: load looks for files in the wrong directory 2010-07-18 22:59 ` Luca Saiu @ 2010-07-24 16:16 ` Ludovic Courtès 2011-02-13 18:51 ` Andy Wingo 0 siblings, 1 reply; 13+ messages in thread From: Ludovic Courtès @ 2010-07-24 16:16 UTC (permalink / raw) To: Ludovic Courtès, Luca Saiu, bug-guile Follow-up Comment #3, bug #30480 (project guile): For the record, this was initially discussed at http://thread.gmane.org/gmane.lisp.guile.bugs/4359 . Ludo'. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30480> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug #30480] VM: load looks for files in the wrong directory 2010-07-24 16:16 ` Ludovic Courtès @ 2011-02-13 18:51 ` Andy Wingo 2011-02-15 11:59 ` Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] Luca Saiu 0 siblings, 1 reply; 13+ messages in thread From: Andy Wingo @ 2011-02-13 18:51 UTC (permalink / raw) To: Ludovic Courtès, Luca Saiu, Andy Wingo, bug-guile Update of bug #30480 (project guile): Status: None => Fixed Open/Closed: Open => Closed _______________________________________________________ Follow-up Comment #4: Fixed, by turning load into a macro that expands to a call to load-in-vicinity. Nasty or awesome? We report, you decide! _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30480> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] 2011-02-13 18:51 ` Andy Wingo @ 2011-02-15 11:59 ` Luca Saiu 2011-02-15 12:08 ` Luca Saiu 2011-02-15 15:38 ` Ludovic Courtès 0 siblings, 2 replies; 13+ messages in thread From: Luca Saiu @ 2011-02-15 11:59 UTC (permalink / raw) Cc: bug-guile, Ludovic Courtès -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/13/2011 07:51 PM, Andy Wingo wrote: > Update of bug #30480 (project guile): > Fixed, by turning load into a macro that expands to a call to > load-in-vicinity. Nasty or awesome? We report, you decide! Awesome :-). This solves the load problem in my old testcase, but testing the new version helped me to expose another problem. My code uses SMOBs with explicit GC mark funcions, as it was written for Guile 1.8; seeing a segmentation fault occurring only in 1.9 made me suspect of some mistake of mine, related to using SMOBs in some unsafe way; but now I find this unlikely, and I think it's a real bug. I've reproduced the problem by using the example in doc/example-smob/ which is much simpler than my own code; the failure is identical. [luca@optimum ~/projects-by-others/guile-from-git-mainline/doc/example-smob]$ ./myguile GNU Guile 1.9.15.114-b81eb Copyright (C) 1995-2011 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> make-image $1 = #<procedure make-image (_ _ _)> scheme@(guile-user)> (define i (make-image "Whistler's Mother" 100 100)) scheme@(guile-user)> i $2 = #<image Whistler's Mother> scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) The current thread is at (nil); Segmentation fault gdb says that the problem is in smob.c, in the smob_mark function: SCM_I_CURRENT_THREAD->current_mark_stack_ptr = mark_stack_ptr; A quick printf showed me that the SCM_I_CURRENT_THREAD macro returned NULL. This happens on an x86_64 GNU/Linux machine, guile from today's git; 1.8 doesn't crash. Thanks. 2.0 will seriously rock :-). - -- Luca Saiu http://www-lipn.univ-paris13.fr/~saiu GNU epsilon: http://www.gnu.org/software/epsilon Marionnet: http://www.marionnet.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1aapIACgkQvzOavibF0ob0rgCdHiCCyk58RxY/B1/JqHXZSlcj CdgAn1Vo0hP/l0cgNPgZ+ei/tKaPSoQH =PDrt -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] 2011-02-15 11:59 ` Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] Luca Saiu @ 2011-02-15 12:08 ` Luca Saiu 2011-02-15 15:38 ` Ludovic Courtès 1 sibling, 0 replies; 13+ messages in thread From: Luca Saiu @ 2011-02-15 12:08 UTC (permalink / raw) To: bug-guile -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/15/2011 12:59 PM, Luca Saiu wrote: > The current thread is at (nil); Segmentation fault Don't worry about the "The current thread is at (nil); ". That was the output of my debug printf :-), which I forgot to delete in that one case. Testing again on an unmodified guile: [luca@optimum ~/projects-by-others/guile-from-git-mainline]$ cd doc/example-smob/ [luca@optimum ~/projects-by-others/guile-from-git-mainline/doc/example-smob]$ ls total 24 4 ChangeLog-2008 4 Makefile 4 README 4 image-type.c 4 myguile.c 4 image-type.h [luca@optimum ~/projects-by-others/guile-from-git-mainline/doc/example-smob]$ make cc `guile-config compile` -c -o image-type.o image-type.c cc `guile-config compile` -c -o myguile.o myguile.c cc image-type.o myguile.o `guile-config link` -o myguile [luca@optimum ~/projects-by-others/guile-from-git-mainline/doc/example-smob]$ ./myguile GNU Guile 1.9.15.114-b81eb Copyright (C) 1995-2011 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> make-image $1 = #<procedure make-image (_ _ _)> scheme@(guile-user)> (define i (make-image "Whistler's Mother" 100 100)) scheme@(guile-user)> i $2 = #<image Whistler's Mother> scheme@(guile-user)> (gc) Segmentation fault [luca@optimum ~/projects-by-others/guile-from-git-mainline/doc/example-smob]$ gdb - --args ./myguile GNU gdb (GDB) 6.8.50.20090628-cvs-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... (no debugging symbols found) (gdb) run Starting program: /home/luca/projects-by-others/guile-from-git-mainline/doc/example-smob/myguile [Thread debugging using libthread_db enabled] [New Thread 0x7ffff602d710 (LWP 24847)] [New Thread 0x7ffff582c710 (LWP 24848)] [New Thread 0x7ffff502b710 (LWP 24849)] [New Thread 0x7ffff482a710 (LWP 24850)] [New Thread 0x7ffff4029710 (LWP 24851)] [New Thread 0x7ffff3828710 (LWP 24852)] [New Thread 0x7ffff3027710 (LWP 24853)] [New Thread 0x7ffff1f76710 (LWP 24854)] [New Thread 0x7ffff1775710 (LWP 24855)] [New Thread 0x7ffff0f74710 (LWP 24856)] [New Thread 0x7ffff0773710 (LWP 24857)] [New Thread 0x7fffeff72710 (LWP 24858)] [New Thread 0x7fffef771710 (LWP 24859)] [New Thread 0x7fffeef70710 (LWP 24860)] [New Thread 0x7fffee76f710 (LWP 24861)] GNU Guile 1.9.15.114-b81eb Copyright (C) 1995-2011 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (define i (make-image "Whistler's Mother" 100 100)) Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGXCPU, CPU time limit exceeded. Program received signal SIGXCPU, CPU time limit exceeded. Program received signal SIGXCPU, CPU time limit exceeded. Program received signal SIGXCPU, CPU time limit exceeded. Program received signal SIGXCPU, CPU time limit exceeded. Program received signal SIGXCPU, CPU time limit exceeded. Program received signal SIGXCPU, CPU time limit exceeded. Program received signal SIGXCPU, CPU time limit exceeded. scheme@(guile-user)> (gc) Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGPWR, Power fail/restart. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff502b710 (LWP 24849)] 0x00007ffff7b0bc64 in smob_mark (addr=0x1945fe0, mark_stack_ptr=0x7ffff501b1d0, mark_stack_limit=0x7ffff502aea0, env=<value optimized out>) at smob.c:506 506 SCM_I_CURRENT_THREAD->current_mark_stack_ptr = mark_stack_ptr; (gdb) - -- Luca Saiu http://www-lipn.univ-paris13.fr/~saiu GNU epsilon: http://www.gnu.org/software/epsilon Marionnet: http://www.marionnet.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1abLUACgkQvzOavibF0oaijwCgncb/S3fjw28PjgwiC+1LrfmK lYIAnRksHfpTGzuT0g+Xy1qwZopIVzWt =UtD7 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] 2011-02-15 11:59 ` Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] Luca Saiu 2011-02-15 12:08 ` Luca Saiu @ 2011-02-15 15:38 ` Ludovic Courtès 2011-02-15 16:17 ` Luca Saiu 1 sibling, 1 reply; 13+ messages in thread From: Ludovic Courtès @ 2011-02-15 15:38 UTC (permalink / raw) To: Luca Saiu; +Cc: bug-guile Hi Luca! Luca Saiu <positron@gnu.org> writes: > I've reproduced the problem by using the example in > doc/example-smob/ > which is much simpler than my own code; the failure is identical. > > [luca@optimum > ~/projects-by-others/guile-from-git-mainline/doc/example-smob]$ ./myguile > GNU Guile 1.9.15.114-b81eb > Copyright (C) 1995-2011 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> make-image > $1 = #<procedure make-image (_ _ _)> > scheme@(guile-user)> (define i (make-image "Whistler's Mother" 100 100)) > scheme@(guile-user)> i > $2 = #<image Whistler's Mother> > scheme@(guile-user)> (gc) > scheme@(guile-user)> (gc) > The current thread is at (nil); Segmentation fault > > gdb says that the problem is in smob.c, in the smob_mark function: > SCM_I_CURRENT_THREAD->current_mark_stack_ptr = mark_stack_ptr; > A quick printf showed me that the SCM_I_CURRENT_THREAD macro returned NULL. > > This happens on an x86_64 GNU/Linux machine, guile from today's git; 1.8 > doesn't crash. I can’t reproduce the problem on x86_64-linux-gnu with a recent CVS snapshot of libgc. Which libgc do you use? Thanks, Ludo’. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] 2011-02-15 15:38 ` Ludovic Courtès @ 2011-02-15 16:17 ` Luca Saiu 2011-02-16 13:23 ` Ludovic Courtès 0 siblings, 1 reply; 13+ messages in thread From: Luca Saiu @ 2011-02-15 16:17 UTC (permalink / raw) To: Ludovic Courtès; +Cc: bug-guile -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 (Hello Ludovic, Andy, and all :-)). On 02/15/2011 04:38 PM, Ludovic Courtès wrote: > I can’t reproduce the problem on x86_64-linux-gnu with a recent CVS > snapshot of libgc. Which libgc do you use? 7.2.4, compiled from sources; I think I've enabled parallel collection, but that shouldn't interfere with Guile, should it? I'll try with the latest stable version. Thanks, - -- Luca Saiu http://www-lipn.univ-paris13.fr/~saiu GNU epsilon: http://www.gnu.org/software/epsilon Marionnet: http://www.marionnet.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1apzAACgkQvzOavibF0oZhEwCdGLBBc4WD7WS2eb9sAOmPH5oH mKAAnRE8AYoY/3Rv6/CYgruQXgrfG2H/ =vyBA -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] 2011-02-15 16:17 ` Luca Saiu @ 2011-02-16 13:23 ` Ludovic Courtès 2011-02-17 9:41 ` Luca Saiu 0 siblings, 1 reply; 13+ messages in thread From: Ludovic Courtès @ 2011-02-16 13:23 UTC (permalink / raw) To: Luca Saiu; +Cc: bug-guile Hi Luca! Happy 2.0 release day! :-) Luca Saiu <positron@gnu.org> writes: > (Hello Ludovic, Andy, and all :-)). > > On 02/15/2011 04:38 PM, Ludovic Courtès wrote: >> I can’t reproduce the problem on x86_64-linux-gnu with a recent CVS >> snapshot of libgc. Which libgc do you use? > > 7.2.4, compiled from sources; I think I've enabled parallel collection, > but that shouldn't interfere with Guile, should it? Unless there’s a bug. :-) Can you try with a stock 7.2? Thanks, Ludo’. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] 2011-02-16 13:23 ` Ludovic Courtès @ 2011-02-17 9:41 ` Luca Saiu 2011-02-17 11:13 ` Likely bug: SMOBs and mark functions Andy Wingo 0 siblings, 1 reply; 13+ messages in thread From: Luca Saiu @ 2011-02-17 9:41 UTC (permalink / raw) To: Ludovic Courtès; +Cc: bug-guile -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/16/2011 02:23 PM, Ludovic Courtès wrote: > Can you try with a stock 7.2? I've tried with the latest 7.2 tarball I've found at http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/ , i.e. the alpha5 of 2011-02-01; to make it quick yes, the thing worked, so the problem probably depended on libgc. Sorry for the noise. Anyway, I've noticed another glitch, which again may or may not be my fault. Testing 2.0.0 instead of git mainline. Downloaded from ftp, configured, compiled, installed. The only parameter I gave configure was - --prefix=/home/luca/usr . I've been doing that for years: my PATH, LIBRARY_PATH, LD_LIBRARY_PATH, and friends should be ok: [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ env | grep home\/luca\/usr CPLUS_INCLUDE_PATH=/home/luca/usr/include:/usr/local/include:/usr/include:/usr/X11R6/include:/usr/include/X11 MANPATH=/home/luca/usr/man:/home/luca/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/man:/usr/share/man:/usr/X11R6/man:/usr/X11R6/share/man OBJC_INCLUDE_PATH=/home/luca/usr/include:/usr/local/include:/usr/include:/usr/X11R6/include:/usr/include/X11 LIBRARY_PATH=/home/luca/usr/lib:/home/luca/usr/lib64:/lib:/usr/local/lib:/usr/lib:/usr/X11R6/lib:/lib64:/usr/local/lib64:/usr/lib64:/usr/X11R6/lib64 LD_LIBRARY_PATH=/home/luca/usr/lib:/home/luca/usr/lib64:/lib:/usr/local/lib:/usr/lib:/usr/X11R6/lib:/lib64:/usr/local/lib64:/usr/lib64:/usr/X11R6/lib64 CPATH=/home/luca/usr/include:/usr/local/include:/usr/include:/usr/X11R6/include:/usr/include/X11 PATH=/home/luca/bin:/home/luca/usr/bin:/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin C_INCLUDE_PATH=/home/luca/usr/include:/usr/local/include:/usr/include:/usr/X11R6/include:/usr/include/X11 INFOPATH=/home/luca/usr/info:/home/luca/usr/share/info:/usr/local/info:/usr/local/share/info:/usr/info:/usr/share/info:/usr/X11R6/info:/usr/X11R6/share/info I've found a pkg-config problem (occurring when I try to compile the exemple-smob example with the provided Makefile) which I don't remember seeing with git snapshots: [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ pkg-config guile-2.0 --cflags Package guile-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `guile-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'guile-2.0' found This might have something to do with my unusual multiple prefixes, but it didn't happen with snapshots! guile-config still works fine. Is this the problem? I have this file: /home/luca/usr/lib/pkgconfig/guile-2.0.pc But nothing related to guile-2.0 in /home/luca/usr/lib/pkgconfig/ Now I don't have any other version of guile installed. I've never taken the time to really understand pkg-config, and I have to admit I'm somewhat prejudiced against it. Anyway, now Guile should even support installing several different versions; isn't there a clean way of using different prefixes with pkg-config? I really like to do that, because this allows me to use different prefixes for differently dangerous tests, rather than trashing /usr/local or /usr with all my experiments. If I ignore pkg-config for the moment and compile the SMOB example the old way, everything works: [luca@optimum ~/projects-by-others/guile-2.0.0/doc]$ cd example-smob/ [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ ls total 24 4 ChangeLog-2008 4 Makefile 4 README 4 image-type.c 4 myguile.c 4 image-type.h [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ gcc -c `guile-config compile` myguile.c [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ gcc -c `guile-config compile` image-type.c [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ gcc `guile-config link` image-type.o myguile.o [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ ls total 44 4 ChangeLog-2008 4 Makefile 4 README 4 image-type.c 4 myguile.c 4 image-type.h 4 image-type.o 4 myguile.o 12 a.out* [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ ./a.out GNU Guile 2.0.0 Copyright (C) 1995-2011 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. And this I can't crash guile by calling gc. So what I was speaking about in the previous messages was indeed a false alarm. Sorry. Thanks for 2.0 :-) - -- Luca Saiu http://www-lipn.univ-paris13.fr/~saiu GNU epsilon: http://www.gnu.org/software/epsilon Marionnet: http://www.marionnet.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1c7S0ACgkQvzOavibF0oZGSgCghzID9oB+Zv8e1zycCEi2lED1 epQAn0uPbvMbImC7n/+NHSb9Og6cXYpT =c1tg -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Likely bug: SMOBs and mark functions 2011-02-17 9:41 ` Luca Saiu @ 2011-02-17 11:13 ` Andy Wingo 2011-02-17 14:08 ` Luca Saiu 0 siblings, 1 reply; 13+ messages in thread From: Andy Wingo @ 2011-02-17 11:13 UTC (permalink / raw) To: Luca Saiu; +Cc: bug-guile, Ludovic Courtès On Thu 17 Feb 2011 10:41, Luca Saiu <positron@gnu.org> writes: > I've tried with the latest 7.2 tarball I've found at > http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/ , i.e. the > alpha5 of 2011-02-01; to make it quick yes, the thing worked, so the > problem probably depended on libgc. Sorry for the noise. NP. Did you also enable parallel collection on that build? > [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ > pkg-config guile-2.0 --cflags > Package guile-2.0 was not found in the pkg-config search path. > Perhaps you should add the directory containing `guile-2.0.pc' > to the PKG_CONFIG_PATH environment variable > No package 'guile-2.0' found Indeed, just as you add paths to the other env vars, you need to do so for pkg-config. See "Environment Variables" in the pkg-config(1) man page. > [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ gcc -c > `guile-config compile` myguile.c This is really strange, for me, because I think the current guile-config just shells out to pkg-config. Is it possible you modified the environment in the meantime? > Thanks for 2.0 :-) Thanks for the bug reports :) Have fun with Guile, Andy -- http://wingolog.org/ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Likely bug: SMOBs and mark functions 2011-02-17 11:13 ` Likely bug: SMOBs and mark functions Andy Wingo @ 2011-02-17 14:08 ` Luca Saiu 0 siblings, 0 replies; 13+ messages in thread From: Luca Saiu @ 2011-02-17 14:08 UTC (permalink / raw) To: Andy Wingo; +Cc: bug-guile, Ludovic Courtès -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/17/2011 12:13 PM, Andy Wingo wrote: > On Thu 17 Feb 2011 10:41, Luca Saiu <positron@gnu.org> writes: > >> I've tried with the latest 7.2 tarball I've found at >> http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/ , i.e. the >> alpha5 of 2011-02-01; to make it quick yes, the thing worked, so the >> problem probably depended on libgc. Sorry for the noise. > > NP. Did you also enable parallel collection on that build? Not on that build, as you requested a 'stock' GC. Now I'm testing again with parallel marking enabled... >> [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ >> pkg-config guile-2.0 --cflags >> Package guile-2.0 was not found in the pkg-config search path. >> Perhaps you should add the directory containing `guile-2.0.pc' >> to the PKG_CONFIG_PATH environment variable >> No package 'guile-2.0' found > > Indeed, just as you add paths to the other env vars, you need to do so > for pkg-config. > > See "Environment Variables" in the pkg-config(1) man page. I will. Thanks. >> [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ gcc -c >> `guile-config compile` myguile.c > > This is really strange, for me, because I think the current guile-config > just shells out to pkg-config. Indeed. > Is it possible you modified the environment in the meantime? I didn't modify the environment, but the source of guile-config explains everything: after configuration, I see the second line of guile-config as PKG_CONFIG_PATH="/home/luca/usr/lib/pkgconfig:$PKG_CONFIG_PATH" , and I see that PKG_CONFIG_PATH is (at least part of) what you were hinting at in pkg-config(1). So, just for completeness, I'm fixing my PKG_CONFIG_PATH and testing again; this time with parallel marking on, GC version 7_2alpha5-20110107. [luca@optimum ~/projects-by-others/guile-2.0.0]$ export PKG_CONFIG_PATH="/home/luca/usr/lib/pkgconfig:$PKG_CONFIG_PATH" [luca@optimum ~/projects-by-others/guile-2.0.0]$ cd doc/example-smob/ [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ make cc `pkg-config guile-2.0 --cflags` -c -o image-type.o image-type.c cc `pkg-config guile-2.0 --cflags` -c -o myguile.o myguile.c cc image-type.o myguile.o `pkg-config guile-2.0 --libs` -o myguile [luca@optimum ~/projects-by-others/guile-2.0.0/doc/example-smob]$ ./myguile GNU Guile 2.0.0 Copyright (C) 1995-2011 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> make-image $1 = #<procedure make-image (_ _ _)> scheme@(guile-user)> (define i (make-image "Whistler's Mother" 100 100)) scheme@(guile-user)> i $2 = #<image Whistler's Mother> scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> (gc) scheme@(guile-user)> And it works. Good :-). Sorry again, - -- Luca Saiu http://www-lipn.univ-paris13.fr/~saiu GNU epsilon: http://www.gnu.org/software/epsilon Marionnet: http://www.marionnet.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1dK+IACgkQvzOavibF0obsTACeJPfbUJ7eL9bQ+Nm2w1pIaBi9 BG0AoKG3q25XfmxQkWiyJTBsFIrs9Miw =uWmd -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-02-17 14:08 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-07-18 22:51 [bug #30480] VM: load looks for files in the wrong directory Luca Saiu 2010-07-18 22:54 ` Luca Saiu 2010-07-18 22:59 ` Luca Saiu 2010-07-24 16:16 ` Ludovic Courtès 2011-02-13 18:51 ` Andy Wingo 2011-02-15 11:59 ` Likely bug: SMOBs and mark functions [Was: Re: [bug #30480] VM: load looks for files in the wrong directory] Luca Saiu 2011-02-15 12:08 ` Luca Saiu 2011-02-15 15:38 ` Ludovic Courtès 2011-02-15 16:17 ` Luca Saiu 2011-02-16 13:23 ` Ludovic Courtès 2011-02-17 9:41 ` Luca Saiu 2011-02-17 11:13 ` Likely bug: SMOBs and mark functions Andy Wingo 2011-02-17 14:08 ` Luca Saiu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).