Re: guile-2.0.0 fails to build without threads
Andy Wingo wi...@pobox.com writes: Fixed in git, for the time being. It's an arms race with the compiler, and clearly code clarity is losing: FWIW, I think I looked a while back at the possibility of detecting stack direction at Guile runtime instead - where it is in principle trivial - and then we'd no longer need this configure-time check. IIRC it (runtime detection) looked like a quite straightforward change. I didn't proceed at the time because the configure-time detection still seemed to be easy and robust; but if that is now starting to become untrue... Neil
Re: guile-2.0.0 fails to build without threads
On Fri 17 Jun 2011 12:25, Andy Wingo wi...@pobox.com writes: On Sat 21 May 2011 15:51, Marco Maggi marco.maggi-i...@poste.it writes: Andy Wingo wrote: Thanks. You seem to be running on system in which the stackgrows up.Isthat thecase?Check libguile/scmconfig.h and config.log. Yes, I have: #define SCM_STACK_GROWS_UP 1 /* 0 or 1 */ maybe the problem is that GCC 4.6.0 with -O3 optimises the program in such a way that the test is invalidated. This bug is also present in Autoconf, where this test comes from originally. I have reported it there. I have no idea what kind of test can defeat such an omniscient inliner. Fixed in git, for the time being. It's an arms race with the compiler, and clearly code clarity is losing: int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = dummy; *addr = addr dummy ? 1 : addr == dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) 0; } See http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00032.html. Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
On Fri 20 May 2011 20:41, Marco Maggi marco.maggi-i...@poste.it writes: Andy Wingo wrote: Thanks. You seem to be running on system in which the stackgrows up.Isthat thecase?Check libguile/scmconfig.h and config.log. Yes, I have: #define SCM_STACK_GROWS_UP 1 /* 0 or 1 */ in scmconfig.h; my system is just a i686-pc-linux-gnu. But on those systems, the stack grows down, no? I suggest that this is a configuration error somehow. Check your config.log. Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
Andy Wingo wrote: On Fri 20 May 2011 20:41, Marco Maggi marco.maggi-i...@poste.it writes: Andy Wingo wrote: Thanks. You seem to be running on system in which the stackgrows up.Isthat thecase?Check libguile/scmconfig.h and config.log. Yes, I have: #define SCM_STACK_GROWS_UP 1 /* 0 or 1 */ in scmconfig.h; my system is just a i686-pc-linux-gnu. But on those systems, the stack grows down, no? I suggest that this is a configuration error somehow. Check your config.log. Someone left ACTION-IF-FALSE empty and also left the test without checking message in this chunk of configure.ac: SCM_I_GSC_STACK_GROWS_UP=0 AC_RUN_IFELSE([AC_LANG_SOURCE( [AC_INCLUDES_DEFAULT int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = dummy; return find_stack_direction (); } else return (dummy addr) ? 1 : -1; } int main () { return find_stack_direction () 0; }])], [SCM_I_GSC_STACK_GROWS_UP=1], [], [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h)]) so I can only guess that what happens is described by the following chunk of config.log: configure:39214: checking for iconveh_escape_sequence configure:39232: gcc -o conftest -O3 -march=i686 -mtune=i686 conftest.c -lcrypt -lm 5 configure:39232: $? = 0 configure:39232: ./conftest configure:39232: $? = 0 configure:39234: result: 2 configure:39295: gcc -o conftest -O3 -march=i686 -mtune=i686 conftest.c -lcrypt -lm 5 configure:39295: $? = 0 configure:39295: ./conftest configure:39295: $? = 0 configure:39310: checking for BDW_GC the test between checking for iconveh_escape_sequence and checking for BDW_GC; the exit status is zero, which causes the variable to be correctly set to: SCM_I_GSC_STACK_GROWS_UP='1' maybe the problem is that GCC 4.6.0 with -O3 optimises the program in such a way that the test is invalidated. -- Marco Maggi
Re: guile-2.0.0 fails to build without threads
Marco Maggi marco.maggi-i...@poste.it writes: Someone left ACTION-IF-FALSE empty This is fine, isn't it? and also left the test without checking message in this chunk of configure.ac: Agree that that is unhelpful. maybe the problem is that GCC 4.6.0 with -O3 optimises the program in such a way that the test is invalidated. Could it be that it is not strictly allowed to compare two pointers that don't point into the same object, and that GCC now enforces this? From http://en.wikipedia.org/wiki/Pointer_%28computing%29, under C and C++: Pointer arithmetic, that is, the ability to modify a pointer's target address with arithmetic operations (as well as magnitude comparisons), is restricted by the language standard to remain within the bounds of a single array object (or just after it), though many non-segmented architectures will allow for more lenient arithmetic. Neil
Re: guile-2.0.0 fails to build without threads
On Mon 02 May 2011 08:20, Marco Maggi marco.maggi-i...@poste.it writes: Andy Wingo wrote: stack size (kbytes, -s) 8192 This should be quite large enough. If you are still interested in debugging this issue, can you call scm_stack_report () in gdb from the scm_ithrow? Breakpoint 1, 0xb7f4fa80 in scm_ithrow () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 (gdb) call scm_stack_report() fd7c of stack: 0xbfffe268 - 0xbfffe008 Thanks. You seem to be running on system in which the stack grows up. Is that the case? Check libguile/scmconfig.h and config.log. You mention in your original report: In the stable-2.0 branch I do: $ git clean -dxf $ ./autogen.sh $ ./configure \ --prefix=3D/usr/local \ --enable-shared --disable-static \ CFLAGS=3D'-O3 -march=3Di686 -mtune=3Di686' Are the 3D things an artifact of some mailing list encoding thing, or are they a mis-paste? Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
Marco Maggi marco.maggi-i...@poste.it writes: Andy Wingo wrote: You mention in your original report: CFLAGS=3D'-O3 -march=3Di686 -mtune=3Di686' Are the 3D things an artifact of some mailing list encoding thing, or are they a mis-paste? They were just = characters, but while pasting them into Emacs from a terminal (?) caused them to be converted to =3D for some reason unknown to me. = is encoded as =3D when using MIME's quoted-printable content transfer encoding http://en.wikipedia.org/wiki/Quoted-printable, which is commonly used to encode 8-bit messages for email. (0x3D is the ASCII value of '='). Marco's email should have included the following header, but didn't: Content-Transfer-Encoding: quoted-printable Since the above header was not present, our email clients did not know to decode the quoted-printable escapes. Emacs users could have done: M-x quoted-printable-decode-region to decode the message manually. Best, Mark
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ludo, Andy, On 05/06/11 11:52, Ludovic Courtès wrote: I think I’ve always tested with BDW-GC --enable-threads, even when Guile is --without-threads. did you have time yet to try a BDW-GC with threads disabled? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3I7JsACgkQp/VmCx0OL2xaywCfVygIzsoRjLrXJDNA8+lu9bs0 CqYAn0Y8mHo8v9zkCVSTFTVC/sEWtgzS =0Q4a -END PGP SIGNATURE-
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/05/11 16:25, Ludovic Courtès wrote: Hello, Marijn hk...@gentoo.org writes: On 05/05/11 14:08, Ludovic Courtès wrote: [...] How was libgc compiled? Does its ‘make check’ pass? libgc was compiled from a gentoo ebuild and its sanity tests pass. Which configure flags, make flags, patches, etc.? ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-libatomic-ops=yes --enable-cplusplus --disable-threads And Guile is compiled with --disable-threads, right? Guile is configured with --without-threads. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3DrnMACgkQp/VmCx0OL2xhzwCfQCkTtD4GSLmr8rW5CC3D1zGr dOgAn29FfrvQ+WauXyQ24kbftesp641o =rnXL -END PGP SIGNATURE-
Re: guile-2.0.0 fails to build without threads
Hello, Marijn hk...@gentoo.org writes: On 05/05/11 16:25, Ludovic Courtès wrote: Hello, Marijn hk...@gentoo.org writes: On 05/05/11 14:08, Ludovic Courtès wrote: [...] How was libgc compiled? Does its ‘make check’ pass? libgc was compiled from a gentoo ebuild and its sanity tests pass. Which configure flags, make flags, patches, etc.? ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-libatomic-ops=yes --enable-cplusplus --disable-threads I think I’ve always tested with BDW-GC --enable-threads, even when Guile is --without-threads. I agree that what you’re doing should work, but can you try BDW-GC --enable-threads? Thanks, Ludo’.
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ludo, On 05/06/11 11:52, Ludovic Courtès wrote: I think I’ve always tested with BDW-GC --enable-threads, even when Guile is --without-threads. I agree that what you’re doing should work, but can you try BDW-GC --enable-threads? Guile compiles and works fine for me when the garbage collector supports threads; that's not a problem. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3D7kgACgkQp/VmCx0OL2xaewCfTctKCIcyCZTpX3iOI5u30my5 /LEAoLbLWYBfbP1nKRfd0h6Apy5Idiuz =t3O7 -END PGP SIGNATURE-
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ludo, On 05/04/11 14:19, Ludovic Courtès wrote: Actually, Marijn: can you try “GC_DUMP_REGULARLY=1 ./meta/guile -c 0”, and check what’s under “Static roots”? More precisely: --8---cut here---start-8--- $ ./meta/gdb-uninstalled-guile GNU gdb (GDB) 7.2 Copyright (C) 2010 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-unknown-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /home/ludo/src/guile/libguile/.libs/guile...done. (gdb) set environment GC_DUMP_REGULARLY 1 (gdb) b main Breakpoint 1 at 0x400ab0: file guile.c, line 69. (gdb) r -c 0 The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/ludo/src/guile/libguile/.libs/guile -c 0 [Thread debugging using libthread_db enabled] Breakpoint 1, main (argc=3, argv=0x7fffce88) at guile.c:69 69 { (gdb) p scm_protects $2 = (SCM *) 0x77dd7788 (gdb) c Continuing. ***Static roots: Total size: 0 ***Heap sections: Total heap size: 65536 Section 0 from 0x663000 to 0x673000 0/16 blacklisted ***Free blocks: Free list 16 (total size 65536): 0x663000 size 65536 not black listed Total of 65536 bytes on free list ***Blocks in use: (kind(0=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set) blocks = 0, bytes = 0 ***Static roots: From 0x601000 to 0x601360 (temporary) From 0x77db to 0x77ddde00 (temporary) ;; ← here! From 0x77a1b000 to 0x77a5e6e0 (temporary) From 0x777ee000 to 0x777f23b0 (temporary) From 0x775d5000 to 0x775d5108 (temporary) From 0x773d1000 to 0x773d18e0 (temporary) From 0x771c5d58 to 0x771c9f08 (temporary) From 0x76eb2a08 to 0x76eb3f60 (temporary) From 0x76c5f450 to 0x76c5f988 (temporary) From 0x76a28000 to 0x76a561c0 (temporary) From 0x7681f000 to 0x7681f0e8 (temporary) From 0x76598000 to 0x7659dbe8 (temporary) From 0x77ffd000 to 0x77ffe188 (temporary) Total size: 725552 --8---cut here---end---8--- Above ‘scm_protects’ clearly appears as a root. Can you check this? IIUC then also for me it appears as a root: ./meta/gdb-uninstalled-guile GNU gdb (Gentoo 7.2 p1) 7.2 Copyright (C) 2010 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-pc-linux-gnu. For bug reporting instructions, please see: http://bugs.gentoo.org/... Reading symbols from /var/tmp/portage/dev-scheme/guile-999/work/guile-999/libguile/.libs/guile...done. (gdb) set environment GC_DUMP_REGULARLY 1 (gdb) b main Breakpoint 1 at 0x400ae0: file guile.c, line 69. (gdb) r -c 0 Starting program: /var/tmp/portage/dev-scheme/guile-999/work/guile-999/libguile/.libs/guile -c 0 Breakpoint 1, main (argc=3, argv=0x7fffd518) at guile.c:69 69 { (gdb) p scm_protects $1 = (SCM *) 0x77bc45a8 (gdb) c Continuing. ***Static roots: Total size: 0 ***Heap sections: Total heap size: 65536 Section 0 from 0x642000 to 0x652000 0/16 blacklisted ***Free blocks: Free list 16 (Total size 65536): 0x642000 size 65536 not black listed Total of 65536 bytes on free list ***Blocks in use: (kind(0=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set) blocks = 0, bytes = 0 ***Static roots: - From 0x601000 to 0x6010c0 (temporary) - From 0x77ddb000 to 0x77ddd5c8 (temporary) - From 0x77b9e000 to 0x77bcabb8 (temporary) ;; - here - From 0x77849000 to 0x7784e8a8 (temporary) - From 0x774c7000 to 0x774c7100 (temporary) - From 0x77282000 to 0x772c3fe0 (temporary) - From 0x7705f000 to 0x7705f5f0 (temporary) - From 0x76e56000 to 0x76e57868 (temporary) - From 0x76b36000 to 0x76b3e140 (temporary) - From 0x768ce000 to 0x768ce2b0 (temporary) - From 0x76696000 to 0x766c41c0 (temporary) - From 0x7648d000 to 0x7648d0e8 (temporary) - From 0x77ffd000 to 0x77ffe188 (temporary) Total size: 721472 ***Heap sections: Total heap size: 65536 Section 0 from 0x642000 to 0x652000 0/16 blacklisted ***Free blocks: Free list 16 (Total size 65536): 0x642000 size 65536 not black listed Total of 65536 bytes on free list ***Blocks in use: (kind(0=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set) blocks = 0, bytes = 0 ***Static roots: - From 0x601000 to 0x6010c0 (temporary) - From
Re: guile-2.0.0 fails to build without threads
Hello! Marijn hk...@gentoo.org writes: (gdb) p scm_protects $1 = (SCM *) 0x77bc45a8 [...] ***Static roots: From 0x601000 to 0x6010c0 (temporary) From 0x77ddb000 to 0x77ddd5c8 (temporary) From 0x77b9e000 to 0x77bcabb8 (temporary) ;; - here Hmm so GC_is_visible (scm_protects) should definitely succeed. How was libgc compiled? Does its ‘make check’ pass? libgc was compiled from a gentoo ebuild and its sanity tests pass. Which configure flags, make flags, patches, etc.? Could you try a different version of libgc? Can you try this program with the same libgc: --8---cut here---start-8--- #include gc/gc.h int foo[123]; int main (int argc, char *argv[]) { GC_INIT (); GC_is_visible (foo); return 0; } --8---cut here---end---8--- compiled and ran your program: gcc -I/usr/include -lgc testgc.c -o testgc ./testgc there was no output. OK. This all sounds really fishy, and I’m pretty much clueless. Maybe you should summarize the situation on the GC list and see whether we’re missing something obvious? Thanks, Ludo’.
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/05/11 14:08, Ludovic Courtès wrote: Hello! Marijn hk...@gentoo.org writes: (gdb) p scm_protects $1 = (SCM *) 0x77bc45a8 [...] ***Static roots: From 0x601000 to 0x6010c0 (temporary) From 0x77ddb000 to 0x77ddd5c8 (temporary) From 0x77b9e000 to 0x77bcabb8 (temporary) ;; - here Hmm so GC_is_visible (scm_protects) should definitely succeed. How was libgc compiled? Does its ‘make check’ pass? libgc was compiled from a gentoo ebuild and its sanity tests pass. Which configure flags, make flags, patches, etc.? ./configure --prefix=/usr --build=x86_64-pc-linux-gnu - --host=x86_64-pc-linux-gnu --mandir=/usr/share/man - --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc - --localstatedir=/var/lib --libdir=/usr/lib64 --with-libatomic-ops=yes - --enable-cplusplus --disable-threads no make flags AFAICS, just ordinary make/make install, no patches. Could you try a different version of libgc? I can try other versions, but perhaps someone on your side should attempt to reproduce by recompiling their boehm-gc with - --disable-threads. This bug has existed for quite some time and for multiple guile and I assume boehm-gc versions. Can you try this program with the same libgc: --8---cut here---start-8--- #include gc/gc.h int foo[123]; int main (int argc, char *argv[]) { GC_INIT (); GC_is_visible (foo); return 0; } --8---cut here---end---8--- compiled and ran your program: gcc -I/usr/include -lgc testgc.c -o testgc ./testgc there was no output. OK. This all sounds really fishy, and I’m pretty much clueless. Maybe you should summarize the situation on the GC list and see whether we’re missing something obvious? Please try to reproduce and then maybe we can do that. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3CrSYACgkQp/VmCx0OL2zo8wCgrDbFr8/wT2RlNScw3zGSPMFT wSMAmwWP8+F7zmF2LEYorKn11Kpk8Isj =UpZk -END PGP SIGNATURE-
Re: guile-2.0.0 fails to build without threads
Hello, Marijn hk...@gentoo.org writes: On 05/05/11 14:08, Ludovic Courtès wrote: [...] How was libgc compiled? Does its ‘make check’ pass? libgc was compiled from a gentoo ebuild and its sanity tests pass. Which configure flags, make flags, patches, etc.? ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-libatomic-ops=yes --enable-cplusplus --disable-threads And Guile is compiled with --disable-threads, right? Thanks, Ludo’.
Re: guile-2.0.0 fails to build without threads
Hi Marijn, Marijn hk...@gentoo.org writes: On 04/28/11 17:09, Ludovic Courtès wrote: Andy Wingo wi...@pobox.com writes: On Thu 28 Apr 2011 15:08, l...@gnu.org (Ludovic Courtès) writes: /* Sanity check. */ if (!GC_is_visible (scm_protects)) abort (); Is this even the right check to make? Yes: the goal is to make sure that the ‘scm_protect’ variable itself is a GC root. Actually, Marijn: can you try “GC_DUMP_REGULARLY=1 ./meta/guile -c 0”, and check what’s under “Static roots”? More precisely: --8---cut here---start-8--- $ ./meta/gdb-uninstalled-guile GNU gdb (GDB) 7.2 Copyright (C) 2010 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-unknown-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /home/ludo/src/guile/libguile/.libs/guile...done. (gdb) set environment GC_DUMP_REGULARLY 1 (gdb) b main Breakpoint 1 at 0x400ab0: file guile.c, line 69. (gdb) r -c 0 The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/ludo/src/guile/libguile/.libs/guile -c 0 [Thread debugging using libthread_db enabled] Breakpoint 1, main (argc=3, argv=0x7fffce88) at guile.c:69 69 { (gdb) p scm_protects $2 = (SCM *) 0x77dd7788 (gdb) c Continuing. ***Static roots: Total size: 0 ***Heap sections: Total heap size: 65536 Section 0 from 0x663000 to 0x673000 0/16 blacklisted ***Free blocks: Free list 16 (total size 65536): 0x663000 size 65536 not black listed Total of 65536 bytes on free list ***Blocks in use: (kind(0=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set) blocks = 0, bytes = 0 ***Static roots: From 0x601000 to 0x601360 (temporary) From 0x77db to 0x77ddde00 (temporary) ;; ← here! From 0x77a1b000 to 0x77a5e6e0 (temporary) From 0x777ee000 to 0x777f23b0 (temporary) From 0x775d5000 to 0x775d5108 (temporary) From 0x773d1000 to 0x773d18e0 (temporary) From 0x771c5d58 to 0x771c9f08 (temporary) From 0x76eb2a08 to 0x76eb3f60 (temporary) From 0x76c5f450 to 0x76c5f988 (temporary) From 0x76a28000 to 0x76a561c0 (temporary) From 0x7681f000 to 0x7681f0e8 (temporary) From 0x76598000 to 0x7659dbe8 (temporary) From 0x77ffd000 to 0x77ffe188 (temporary) Total size: 725552 --8---cut here---end---8--- Above ‘scm_protects’ clearly appears as a root. Can you check this? How was libgc compiled? Does its ‘make check’ pass? What does ‘env | grep ^GC’ say? Can you try this program with the same libgc: --8---cut here---start-8--- #include gc/gc.h int foo[123]; int main (int argc, char *argv[]) { GC_INIT (); GC_is_visible (foo); return 0; } --8---cut here---end---8--- Thanks, Ludo’.
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/28/11 15:08, Ludovic Courtès wrote: Hello, Andy Wingo wi...@pobox.com writes: On Thu 14 Apr 2011 15:25, Marijn hk...@gentoo.org writes: CCLD guile GENguile-procedures.texi 0x75b260 is not a GC visible pointer location GC_is_visible test failed This occurs in gc.c: /* Sanity check. */ if (!GC_is_visible (scm_protects)) abort (); This is on x86_64-linux-gnu, right? yes What version of libgc do you use? 7.1+ is recommended, but I’ve never seen that fail with older versions. 7.2_alpha4 Thanks, Ludo’. -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AF3sACgkQp/VmCx0OL2zg1QCaAy0m3ToR+Q8EJan2iYE8XzbD FGoAoLHN/x4DH5Fl30ZCV3xg0rv3mAra =TEb2 -END PGP SIGNATURE-
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/28/11 17:09, Ludovic Courtès wrote: Andy Wingo wi...@pobox.com writes: On Thu 28 Apr 2011 15:08, l...@gnu.org (Ludovic Courtès) writes: /* Sanity check. */ if (!GC_is_visible (scm_protects)) abort (); Is this even the right check to make? Yes: the goal is to make sure that the ‘scm_protect’ variable itself is a GC root. Actually, Marijn: can you try “GC_DUMP_REGULARLY=1 ./meta/guile -c 0”, and check what’s under “Static roots”? Current stable-2.0 fails with: GENguile-procedures.texi 0x75b320 is not a GC visible pointer location GC_is_visible test failed requested output: ***Static roots: - From 0x601000 to 0x6010c0 (temporary) - From 0x7f79a7ab9000 to 0x7f79a7abb5c8 (temporary) - From 0x7f79a787c000 to 0x7f79a78a8bb8 (temporary) - From 0x7f79a7527000 to 0x7f79a752c8a8 (temporary) - From 0x7f79a71a5000 to 0x7f79a71a5100 (temporary) - From 0x7f79a6f6 to 0x7f79a6fa1fe0 (temporary) - From 0x7f79a6d3d000 to 0x7f79a6d3d5f0 (temporary) - From 0x7f79a6b34000 to 0x7f79a6b35868 (temporary) - From 0x7f79a6814000 to 0x7f79a681c140 (temporary) - From 0x7f79a65ac000 to 0x7f79a65ac2b0 (temporary) - From 0x7f79a6374000 to 0x7f79a63a21c0 (temporary) - From 0x7f79a616b000 to 0x7f79a616b0e8 (temporary) - From 0x7f79a7cdb000 to 0x7f79a7cdc188 (temporary) Total size: 721472 Thanks, Ludo’. You're welcome and thanks for looking into this, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AGAkACgkQp/VmCx0OL2zJ7ACeNTKDiDBDKuz3kb6Xp5Ql3fx1 l1AAn3w3mdrzNfhYO72dM8dNHlLrnI+g =BJor -END PGP SIGNATURE-
Re: guile-2.0.0 fails to build without threads
Hi Marijn, Adding Ludo to the Cc: as he knows more about libgc. On Thu 14 Apr 2011 15:25, Marijn hk...@gentoo.org writes: CCLD guile GENguile-procedures.texi 0x75b260 is not a GC visible pointer location GC_is_visible test failed This occurs in gc.c: /* Sanity check. */ if (!GC_is_visible (scm_protects)) abort (); scm_protects is declared above: /* Hash table that keeps a reference to objects the user wants to protect from garbage collection. It could arguably be private but applications have come to rely on it (e.g., Lilypond 2.13.9). */ SCM scm_protects; This seems to indicate a problem with libgc on your platform. Please check that it is configured correctly. Regards, Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
Hello, Andy Wingo wi...@pobox.com writes: On Thu 14 Apr 2011 15:25, Marijn hk...@gentoo.org writes: CCLD guile GENguile-procedures.texi 0x75b260 is not a GC visible pointer location GC_is_visible test failed This occurs in gc.c: /* Sanity check. */ if (!GC_is_visible (scm_protects)) abort (); This is on x86_64-linux-gnu, right? What version of libgc do you use? 7.1+ is recommended, but I’ve never seen that fail with older versions. Thanks, Ludo’.
Re: guile-2.0.0 fails to build without threads
On Thu 28 Apr 2011 15:08, l...@gnu.org (Ludovic Courtès) writes: /* Sanity check. */ if (!GC_is_visible (scm_protects)) abort (); Is this even the right check to make? Shouldn't it check SCM2PTR (scm_protects) instead of scm_protects? Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
Andy Wingo wi...@pobox.com writes: On Thu 28 Apr 2011 15:08, l...@gnu.org (Ludovic Courtès) writes: /* Sanity check. */ if (!GC_is_visible (scm_protects)) abort (); Is this even the right check to make? Yes: the goal is to make sure that the ‘scm_protect’ variable itself is a GC root. Actually, Marijn: can you try “GC_DUMP_REGULARLY=1 ./meta/guile -c 0”, and check what’s under “Static roots”? Thanks, Ludo’.
Re: guile-2.0.0 fails to build without threads
Marco Maggi wrote: Marijn wrote: guile-2.0.0 fails to build without --disable-threads when libgc (boehm-gc in gentoo) is built without threads: I am following up here because I have a problem at the same point when building branch stable-2.0; Half of the problem is that I still had installed libgc 7.1: upgrading to 7.2a4 fixed the warnings about GC_ functions. I still get the Stack overflow problem though with the stable-2.0 branch. Snapshot guile-2.0.0.179-c89b.tar.gz builds successfully if I use the --without-threads option, but fails in the same way when I do not use the option. -- Marco Maggi
Re: guile-2.0.0 fails to build without threads
Marco Maggi wrote: I still get the Stack overflow problem though with the stable-2.0 branch. Snapshot guile-2.0.0.179-c89b.tar.gz builds successfully if I use the --without-threads option, but fails in the same way when I do not use the option. It looks like it is the darn CFLAGS variable: if I set it on the command line of configure I get the overflow error, if I leave it alone everything goes. It should be user configurable, as a de facto standard. -- Marco Maggi
Re: guile-2.0.0 fails to build without threads
Hi Marco, On Tue 12 Apr 2011 08:49, Marco Maggi marco.maggi-i...@poste.it writes: I am following up here because I have a problem at the same point when building branch stable-2.0; I have just fetched from the repository, so I have the commit c89b452993... Actually, failing at that point is quite common: it's the first time the newly-built Guile is actually used. It would be more appropriate to start a new thread, but since we're here... scmsigs.c: In function 'signal_delivery_thread': scmsigs.c:159:3: warning: implicit declaration of function 'GC_pthread_sigm= ask' [-Wimplicit-function-declaration] This is odd. The configure script should detect the presence of GC_pthread_sigmask, and only emit references to it if it is found. Can you grep your config.log for instances of GC_pthread ? Also, can you grep your libguile/scmconfig.h for PTHREAD ? memoize.c:478:***Mismatching FUNC_NAME. Should be: `#define FUNC_NAME s_@= prompt' These are harmless, but thank you for being thorough in the report. Throw without catch before boot: Throw to key stack-overflow with args (#f Stack overflow #f #f)Aborting. Can you submit a backtrace please? You can do so by running meta/gdb-uninstalled-guile --no-auto-compile, then b scm_ithrow, run, and then bt when the breakpoint hits. Thanks, Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
On Tue 12 Apr 2011 09:26, Marijn hk...@gentoo.org writes: (boehm-gc in gentoo) is built without threads: Interesting. Any plans to change that? CCLD guile ./.libs/libguile-2.2.so: undefined reference to `GC_register_my_thread' Fixed, I think; thanks for the full log. Cheers, Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
On Wed 13 Apr 2011 13:42, Marco Maggi marco.maggi-i...@poste.it writes: Marco Maggi wrote: I still get the Stack overflow problem though with the stable-2.0 branch. Snapshot guile-2.0.0.179-c89b.tar.gz builds successfully if I use the --without-threads option, but fails in the same way when I do not use the option. It looks like it is the darn CFLAGS variable: if I set it on the command line of configure I get the overflow error, if I leave it alone everything goes. It should be user configurable, as a de facto standard. Interesting. It seems that -O3 is consuming more C stack space than with the default -O2. What does your `ulimit -a' print out? Usually we set a stack limit according to some percentage of the rlimits. Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/13/11 12:05, Andy Wingo wrote: On Tue 12 Apr 2011 09:26, Marijn hk...@gentoo.org writes: (boehm-gc in gentoo) is built without threads: Interesting. Any plans to change that? I said *when* libgc (boehm-gc in gentoo) is built without threads. The option to compile boehm-gc with or without threads is exported to users in Gentoo, the same way it will be for Guile. I do admit that this is a source of many compilation failures as many upstreams don't seem to test this configuration, but some people must find this option to build without threads useful or upstream boehm-gc wouldn't provide it in the first place. I don't know enough about boehm-gc to second-guess them nor am I the maintainer of boehm-gc in Gentoo. But Gentoo does enable me to recompile both boehm-gc and guile both configured with --disable-threads with a single simple package manager command while also allowing me to choose which version I want and allowing versions that go check the online (git) repo and get the latest available, so it is extremely simple for me to test against this specific and many other compile failures. CCLD guile ./.libs/libguile-2.2.so: undefined reference to `GC_register_my_thread' Fixed, I think; thanks for the full log. If you commit it, I will test it ;P Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2lqNoACgkQp/VmCx0OL2x23wCfdDo9T1DZm5Clz8FlDfhvf353 uDsAnixxEskTTfrayyjwSRxj8dxfy4GT =Fe9o -END PGP SIGNATURE-
Re: guile-2.0.0 fails to build without threads
Andy Wingo wrote: Interesting. It seems that -O3 is consuming more C stack space than with the default -O2. What does your `ulimit -a' print out? core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 7906 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size(512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 7906 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited -- Marco Maggi
Re: guile-2.0.0 fails to build without threads
On Wed 13 Apr 2011 15:44, Marijn hk...@gentoo.org writes: CCLD guile ./.libs/libguile-2.2.so: undefined reference to `GC_register_my_thread' Fixed, I think; thanks for the full log. If you commit it, I will test it ;P I think I did? Revision 8e76ce94a28c02324aa13de835b1e55282b8b760. Cheers, Andy -- http://wingolog.org/
Re: guile-2.0.0 fails to build without threads
Andy Wingo wrote: Throw without catch before boot: Throw to key stack-overflow with args (#f Stack overflow #f #f)Aborting. Can you submit a backtrace please? (gdb) run Starting program: /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/lt-guile --no-auto-compile [Thread debugging using libthread_db enabled] Breakpoint 1, 0xb7f49b70 in scm_ithrow () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 (gdb) bt #0 0xb7f49b70 in scm_ithrow () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #1 0xb7ec364b in scm_error_scm () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #2 0xb7ec36f1 in scm_error () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #3 0xb7f38d4a in scm_report_stack_overflow () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #4 0xb7f63575 in scm_c_vm_run () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #5 0xb7ec70f7 in scm_primitive_eval () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #6 0xb7eea97b in scm_primitive_load () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #7 0xb7eeb478 in scm_primitive_load_path () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #8 0xb7eeb843 in scm_c_primitive_load_path () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #9 0xb7ee4956 in scm_load_startup_files () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #10 0xb7ee4dde in scm_i_init_guile () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #11 0xb7f46560 in with_guile_and_parent () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #12 0xb7e252be in GC_call_with_stack_base () from /usr/local/lib/libgc.so.1 #13 0xb7f466ef in scm_with_guile () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #14 0xb7ee49c5 in scm_boot_guile () from /home/marco/src/devel/scheme/checkouts/guile/libguile/.libs/libguile-2.0.so.22 #15 0x0804885b in main () -- Marco Maggi
Re: guile-2.0.0 fails to build without threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/13/11 16:09, Andy Wingo wrote: On Wed 13 Apr 2011 15:44, Marijn hk...@gentoo.org writes: CCLD guile ./.libs/libguile-2.2.so: undefined reference to `GC_register_my_thread' Fixed, I think; thanks for the full log. If you commit it, I will test it ;P I think I did? Revision 8e76ce94a28c02324aa13de835b1e55282b8b760. Cheers, Andy The latest I see on http://git.savannah.gnu.org/cgit/guile.git/log/ is bump effective version to 2.2 (0c81a0c13ad39c381e4ff4d073e3158bcfd51a7a) which is the same version as of my previous log. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2lsscACgkQp/VmCx0OL2w82ACgpWoXNmtrjbDx3VsrzD1CjCZy us8An3ykVeUGlzvJ5EmRk01uXZSH0YmG =N90s -END PGP SIGNATURE-
Re: guile-2.0.0 fails to build without threads
Hi, Marco Maggi marco.maggi-i...@poste.it writes: CC posix.lo posix.c:1910:1: error: unknown type name 'cpu_set_t' This file lacks #include sched.h. Can you check whether it solves the problem? Thanks, Ludo’.
Re: guile-2.0.0 fails to build without threads
Marijn wrote: guile-2.0.0 fails to build without --disable-threads when libgc (boehm-gc in gentoo) is built without threads: GENguile-procedures.texi 0x75c140 is not a GC visible pointer location GC_is_visible test failed I am following up here because I have a problem at the same point when building branch stable-2.0; I have just fetched from the repository, so I have the commit c89b452993... On a i686-pc-linux-gnu, I still have installed Autoconf 2.65, while I see that the last is 2.68; I run gcc (GCC) 4.6.0, and: $ ldd /usr/local/lib/libgc.so.1.0.3 linux-gate.so.1 =3D (0xe000) libpthread.so.0 =3D /lib/libpthread.so.0 (0xb76e8000) libdl.so.2 =3D /lib/libdl.so.2 (0xb76e4000) libgcc_s.so.1 =3D /usr/local/lib/libgcc_s.so.1 (0xb76c7000) libc.so.6 =3D /lib/libc.so.6 (0xb7564000) /lib/ld-linux.so.2 (0xb7762000) In the stable-2.0 branch I do: $ git clean -dxf $ ./autogen.sh $ ./configure \ --prefix=3D/usr/local \ --enable-shared --disable-static \ CFLAGS=3D'-O3 -march=3Di686 -mtune=3Di686' everything looks fine; then I do: $ make while it goes I see: CC libguile_2.0_la-rw.lo CC libguile_2.0_la-scmsigs.lo scmsigs.c: In function 'signal_delivery_thread': scmsigs.c:159:3: warning: implicit declaration of function 'GC_pthread_sigm= ask' [-Wimplicit-function-declaration] CC libguile_2.0_la-script.lo CC libguile_2.0_la-simpos.lo then: CC libguile_2.0_la-symbols.lo CC libguile_2.0_la-threads.lo threads.c: In function 'launch_thread': threads.c:962:3: warning: implicit declaration of function 'GC_pthread_deta= ch' [-Wimplicit-function-declaration] threads.c: In function 'scm_call_with_new_thread': threads.c:997:3: warning: implicit declaration of function 'GC_pthread_crea= te' [-Wimplicit-function-declaration] CC libguile_2.0_la-throw.lo CC libguile_2.0_la-trees.lo then: SNARF mallocs.doc SNARF memoize.doc memoize.c:478:***Mismatching FUNC_NAME. Should be: `#define FUNC_NAME s_@= prompt' SNARF modules.doc SNARF numbers.doc then: SNARF options.doc SNARF pairs.doc pairs.c:147:***Missing or erroneous `#define FUNC_NAME s_scm_cdr' pairs.c:150:***Missing or erroneous #undef for scm_car: pairs.c:155:***Missing or erroneous `#define FUNC_NAME s_scm_cddr' pairs.c:158:***Missing or erroneous #undef for scm_cdar: pairs.c:163:***Missing or erroneous `#define FUNC_NAME s_scm_cadr' pairs.c:166:***Missing or erroneous #undef for scm_caar: pairs.c:171:***Missing or erroneous `#define FUNC_NAME s_scm_cdddr' pairs.c:174:***Missing or erroneous #undef for scm_cddar: pairs.c:179:***Missing or erroneous `#define FUNC_NAME s_scm_cdadr' pairs.c:182:***Missing or erroneous #undef for scm_cdaar: pairs.c:187:***Missing or erroneous `#define FUNC_NAME s_scm_caddr' pairs.c:190:***Missing or erroneous #undef for scm_cadar: pairs.c:195:***Missing or erroneous `#define FUNC_NAME s_scm_caadr' pairs.c:198:***Missing or erroneous #undef for scm_caaar: pairs.c:203:***Missing or erroneous `#define FUNC_NAME s_scm_cr' pairs.c:206:***Missing or erroneous #undef for scm_cdddar: pairs.c:211:***Missing or erroneous `#define FUNC_NAME s_scm_cddadr' pairs.c:214:***Missing or erroneous #undef for scm_cddaar: pairs.c:219:***Missing or erroneous `#define FUNC_NAME s_scm_cdaddr' pairs.c:222:***Missing or erroneous #undef for scm_cdadar: pairs.c:227:***Missing or erroneous `#define FUNC_NAME s_scm_cdaadr' pairs.c:230:***Missing or erroneous #undef for scm_cdaaar: pairs.c:235:***Missing or erroneous `#define FUNC_NAME s_scm_cadddr' pairs.c:238:***Missing or erroneous #undef for scm_caddar: pairs.c:243:***Missing or erroneous `#define FUNC_NAME s_scm_cadadr' pairs.c:246:***Missing or erroneous #undef for scm_cadaar: pairs.c:251:***Missing or erroneous `#define FUNC_NAME s_scm_caaddr' pairs.c:254:***Missing or erroneous #undef for scm_caadar: pairs.c:259:***Missing or erroneous `#define FUNC_NAME s_scm_caaadr' pairs.c:262:***Missing or erroneous #undef for scm_cr: SNARF ports.doc SNARF print.doc and finally: SNARF regex-posix.doc GENguile-procedures.texi Throw without catch before boot: Throw to key stack-overflow with args (#f Stack overflow #f #f)Aborting. cat: write error: Broken pipe /bin/sh: line 1: 14549 Done(1) cat alist.doc arbiters.doc a= rray-handle.doc array-map.doc arrays.doc async.doc backtrace.doc boolean.do= c bitvectors.doc bytevectors.doc chars.doc control.doc continuations.doc de= bug.doc deprecated.doc deprecation.doc dynl.doc dynwind.doc eq.doc error.do= c eval.doc evalext.doc expand.doc extensions.doc feature.doc fluids.doc for= eign.doc fports.doc gc-malloc.doc gc.doc gettext.doc generalized-arrays.doc= generalized-vectors.doc goops.doc gsubr.doc guardians.doc hash.doc hashtab= .doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc list.doc load.doc m= acros.doc mallocs.doc memoize.doc modules.doc numbers.doc objprop.doc optio= ns.doc
Re: guile-2.0.0 fails to build without threads
On Thu 07 Apr 2011 16:47, Marijn hk...@gentoo.org writes: guile-2.0.0 fails to build without --disable-threads when libgc (boehm-gc in gentoo) is built without threads: Can you try with a snapshot? Should be fixed in stable-2.0, but it would be nice to get some feedback before releasing 2.0.1. Further guile configure warns about: configure: WARNING: unrecognized options: --disable-debug-freelist which I don't think it should do. I think this is a newer autoconf feature to warn about unknown options. I think this option was removed since 1.8. Andy -- http://wingolog.org/