From unknown Thu Aug 14 21:52:52 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10235 <10235@debbugs.gnu.org> To: bug#10235 <10235@debbugs.gnu.org> Subject: Status: guile 3.0.2 segfaults on FreeBSD 9 Reply-To: bug#10235 <10235@debbugs.gnu.org> Date: Fri, 15 Aug 2025 04:52:52 +0000 retitle 10235 guile 3.0.2 segfaults on FreeBSD 9 reassign 10235 guile submitter 10235 "Jim Pryor" severity 10235 normal tag 10235 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 06 12:26:34 2011 Received: (at submit) by debbugs.gnu.org; 6 Dec 2011 17:26:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RXymn-000398-6m for submit@debbugs.gnu.org; Tue, 06 Dec 2011 12:26:34 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RXxLZ-0000Lw-2P for submit@debbugs.gnu.org; Tue, 06 Dec 2011 10:54:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXxKr-0005yX-P9 for submit@debbugs.gnu.org; Tue, 06 Dec 2011 10:53:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:34106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXxKr-0005yT-MD for submit@debbugs.gnu.org; Tue, 06 Dec 2011 10:53:37 -0500 Received: from eggs.gnu.org ([140.186.70.92]:39685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXxKm-0000jY-T0 for bug-guile@gnu.org; Tue, 06 Dec 2011 10:53:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXxKh-0005wb-It for bug-guile@gnu.org; Tue, 06 Dec 2011 10:53:32 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:47705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXxKh-0005oy-ES for bug-guile@gnu.org; Tue, 06 Dec 2011 10:53:27 -0500 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 3A8E620F13 for ; Tue, 6 Dec 2011 10:53:23 -0500 (EST) Received: from web3.nyi.mail.srv.osa ([10.202.2.213]) by compute1.internal (MEProxy); Tue, 06 Dec 2011 10:53:23 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:cc:mime-version :content-transfer-encoding:content-type:subject:date; s=smtpout; bh=VGRtX8+wlzlKmiNkTgMotm/Gp3Y=; b=dD4Lyq9UASt2J7ZQRO+h2S4NnAWT rHRkMme6QoEnkWJb1X+6se7XcgopLNgMrWgBEUedqvmGDdAIuRNjPMKgQOVeCAOy J5bC5ZfzXiJd44+9WAMkkAb3soRUpBfJaFCEP2/I+jYcUsCXQo+acgfjSCCASTVx Mfk83y48V5OUAZo= Received: by web3.nyi.mail.srv.osa (Postfix, from userid 99) id 1790140085; Tue, 6 Dec 2011 10:53:23 -0500 (EST) Message-Id: <1323186803.10347.140661008137717@webmail.messagingengine.com> X-Sasl-Enc: r+pEv9Uj+aP4NIRhc/8HRzCuTBEqtJv8RvsJo6RdONRw 1323186803 From: "Jim Pryor" To: bug-guile@gnu.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" X-Mailer: MessagingEngine.com Webmail Interface Subject: guile 3.0.2 segfaults on FreeBSD 9 Date: Tue, 06 Dec 2011 10:53:23 -0500 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 06 Dec 2011 12:26:31 -0500 Cc: Amatus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hi I'm trying to build guile 3.0.2 on FreeBSD and am having some problems. These are different than what's reported here . I'm running a custom kernel on FreeBSD 9-STABLE. The latest packaging script is from guile 1.8.8 back in July 2011. Here are some changes I made to the packaging script: * added dependency on libunistring and the threaded version of the Boehm GC library. * added a patch to configure.ac, and requested the running of autoconf and autoheader before the configure stage * deleted some seemingly obsolete BSD patches (Specifically, I disabled patches to Makefile.{am,in} and libguile/{eval,read,gc_os_dep}.c. I folded a patch that formerly was applied to libguile/gc.c into a patch to libguile/threads.c, which is where the code seems to have moved. And I disabled patches to config.h.in and configure, since I think these changes are now generated when we run autoconf and autoheader against the patched configure.ac) * had to remove one block from a patch to libguile/threads.c The patch I made to configure.ac, and the remaining FreeBSD patches to a few other files, are appended to the end of this email. Additionally, the BSD packaging script runs this bit of code: REINPLACE_FILES= libguile/smob.c libguile/gc.c \ libguile/mallocs.c libguile/gc-malloc.c post-extract: @find ${WRKSRC}/doc -name "*.info*" -delete post-patch: @cd ${WRKSRC} ; sed -e 's|||g' ${REINPLACE_FILES} @sed -e 's|2.63|%%AUTOCONF_VERSION%%|g' ${WRKSRC}/aclocal.m4 I was able to compile all the .o files, but was getting linking errors: CCLD guile ./.libs/libguile-2.0.so: undefined reference to `GC_unregister_my_thread' ./.libs/libguile-2.0.so: undefined reference to `GC_pthread_create' ./.libs/libguile-2.0.so: undefined reference to `GC_register_my_thread' ./.libs/libguile-2.0.so: undefined reference to `GC_pthread_detach' gmake[3]: *** [guile] Error 1 gmake[3]: Leaving directory `/usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/obj/usr/ports/lang/guile/work/guile-2.0.3' gmake: *** [all] Error 2 *** Error code 1 Stop in /usr/ports/lang/guile. until I made this change in the configure.ac file: -PKG_CHECK_MODULES([BDW_GC], [bdw-gc]) +PKG_CHECK_MODULES([BDW_GC], [bdw-gc-threaded]) Indeed the relevant symbols are located in the libraries installed by our boehm-gc-threaded package, not the libraries installed by our boehm-gc package. OK, so with that change I can compile and link guile just fine. But when I try to run it, I get a segfault. I noticed this because the `make` process never even finishes. We get: SNARF posix.doc SNARF net_db.doc SNARF socket.doc SNARF regex-posix.doc GEN guile-procedures.texi Segmentation fault (core dumped) gmake[3]: *** [guile-procedures.texi] Error 1 gmake[3]: Leaving directory `/usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/obj/usr/ports/lang/guile/work/guile-2.0.3' gmake: *** [all] Error 2 *** Error code 1 Stop in /usr/ports/lang/guile. And indeed if you just go to the libguile directory and execute the build `guile` file manually, you get a segfault. Here is the backtrace: $ libtool --mode=execute gdb guile guile.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... Core was generated by `guile'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25...(no debugging symbols found)...done. Loaded symbols for /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 Reading symbols from /usr/local/lib/libgc-threaded.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgc-threaded.so.1 Reading symbols from /usr/local/lib/libffi.so.5...done. Loaded symbols for /usr/local/lib/libffi.so.5 Reading symbols from /usr/local/lib/libintl.so.9...done. Loaded symbols for /usr/local/lib/libintl.so.9 Reading symbols from /usr/local/lib/libunistring.so.1...done. Loaded symbols for /usr/local/lib/libunistring.so.1 Reading symbols from /usr/local/lib/libiconv.so.3...done. Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /usr/local/lib/libgmp.so.10...done. Loaded symbols for /usr/local/lib/libgmp.so.10 Reading symbols from /usr/local/lib/libltdl.so.7...done. Loaded symbols for /usr/local/lib/libltdl.so.7 Reading symbols from /lib/libcrypt.so.5...done. Loaded symbols for /lib/libcrypt.so.5 Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x000000080091f8a5 in scm_c_vm_run () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 [New Thread 802807400 (LWP 104574/guile)] (gdb) bt #0 0x000000080091f8a5 in scm_c_vm_run () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #1 0x0000000800895e17 in scm_async_click () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #2 0x00000008008f952f in scm_make_smob_type () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #3 0x0000000800890f42 in scm_init_arbiters () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #4 0x00000008008c72c5 in scm_i_init_guile () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #5 0x000000080091b094 in scm_i_init_thread_for_guile () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #6 0x000000080091b0f7 in with_guile_and_parent () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #7 0x0000000800bd3805 in GC_call_with_stack_base () from /usr/local/lib/libgc-threaded.so.1 #8 0x000000080091af81 in scm_i_with_guile_and_parent () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #9 0x00000008008c7135 in scm_boot_guile () from /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 #10 0x0000000000400af0 in main () (gdb) Finally, here are the patches currently being applied to the guile 3.0.2 tarball before running autoconf/autoheader/configure. ----- files/patch-configure.ac ----- --- ./configure.ac.orig 2011-10-07 19:49:48.000000000 -0400 +++ ./configure.ac 2011-12-06 09:35:02.484201526 -0500 @@ -657,7 +657,7 @@ # AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h limits.h malloc.h memory.h process.h string.h \ regex.h rxposix.h rx/rxposix.h sys/dir.h sys/ioctl.h sys/select.h \ -sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \ +sys/time.h sys/times.h sys/stdtypes.h sys/types.h \ sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \ direct.h langinfo.h nl_types.h machine/fpu.h poll.h sched.h]) @@ -775,6 +775,7 @@ # sys/param.h - not in mingw # pthread.h - only available with pthreads. ACX_PTHREAD doesn't # check this specifically, we need it for the timespec test below. +# pthread_np.h - available on FreeBSD # sethostname - the function itself check because it's not in mingw, # the DECL is checked because Solaris 10 doens't have in any header # hstrerror - on Tru64 5.1b the symbol is available in libc but the @@ -782,7 +783,7 @@ # cuserid - on Tru64 5.1b the declaration is documented to be available # only with `_XOPEN_SOURCE' or some such. # -AC_CHECK_HEADERS([crypt.h netdb.h pthread.h sys/param.h sys/resource.h sys/file.h sys/mman.h]) +AC_CHECK_HEADERS([crypt.h netdb.h pthread.h pthread_np.h sys/param.h sys/resource.h sys/file.h sys/mman.h]) AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname) AC_CHECK_DECLS([sethostname, hstrerror, cuserid]) @@ -1253,7 +1254,7 @@ # Boehm's GC library # #-------------------------------------------------------------------- -PKG_CHECK_MODULES([BDW_GC], [bdw-gc]) +PKG_CHECK_MODULES([BDW_GC], [bdw-gc-threaded]) save_LIBS="$LIBS" LIBS="$BDW_GC_LIBS $LIBS" @@ -1364,9 +1365,11 @@ # all; not present on MacOS X or Solaris 10 # pthread_get_stackaddr_np - "np" meaning "non portable" says it # all; specific to MacOS X + # pthread_attr_get_np - "np" meaning "non portable" says it + # all; specific to FreeBSD # pthread_sigmask - not available on mingw # - AC_CHECK_FUNCS(pthread_attr_getstack pthread_getattr_np pthread_get_stackaddr_np pthread_sigmask) + AC_CHECK_FUNCS(pthread_attr_getstack pthread_getattr_np pthread_get_stackaddr_np pthread_attr_get_np pthread_sigmask) # On past versions of Solaris, believe 8 through 10 at least, you # had to write "pthread_once_t foo = { PTHREAD_ONCE_INIT };". @@ -1381,7 +1384,7 @@ if test "$GCC" = "yes"; then # Since GCC only issues a warning for missing braces, so we need # `-Werror' to catch it. - CFLAGS="-Werror -Wmissing-braces $CFLAGS" + CFLAGS="-Wmissing-braces $CFLAGS" fi AC_CACHE_CHECK([whether PTHREAD_ONCE_INIT needs braces], @@ -1544,7 +1547,7 @@ # not be "warning free" if test "${GUILE_ERROR_ON_WARNING}" = yes then - POTENTIAL_GCC_CFLAGS="${POTENTIAL_GCC_CFLAGS} -Werror" + POTENTIAL_GCC_CFLAGS="${POTENTIAL_GCC_CFLAGS}" enable_compile_warnings=no fi ----- files/patch-libguile___scm.h ----- --- libguile/__scm.h 2008-02-23 18:14:28.106264450 -0600 +++ libguile/__scm.h 2008-02-23 18:15:41.306005478 -0600 @@ -411,7 +411,8 @@ * that all the state of the process is contained in the stack. */ -#if defined (sparc) || defined (__sparc__) || defined (__sparc) +#if (defined (sparc) || defined (__sparc__) || defined (__sparc)) && \ + (!defined(__FreeBSD__)) # define SCM_FLUSH_REGISTER_WINDOWS asm("ta 3") #else # define SCM_FLUSH_REGISTER_WINDOWS /* empty */ ----- files/patch-libguile_gen-scmconfig.c ----- --- libguile/gen-scmconfig.c 2008-02-23 21:38:39.310330888 -0600 +++ libguile/gen-scmconfig.c 2008-02-23 21:39:32.909873567 -0600 @@ -123,6 +123,7 @@ #include "gen-scmconfig.h" +#define _ANSI_SOURCE #include #include ----- files/patch-libguile_numbers.c ----- --- ./libguile/numbers.c.orig 2011-10-10 16:24:38.000000000 -0400 +++ ./libguile/numbers.c 2011-12-06 05:26:45.391199972 -0500 @@ -148,7 +148,7 @@ #if defined (GUILE_I) -#if defined HAVE_COMPLEX_DOUBLE +#if defined HAVE_COMPLEX_DOUBLE && (defined HAVE_CLOG || defined HAVE_CLOG10 || defined HAVE_CEXP || defined HAVE_USABLE_CSQRT) && defined (SCM_COMPLEX_VALUE) /* For an SCM object Z which is a complex number (ie. satisfies SCM_COMPLEXP), return its value as a C level "complex double". */ ----- files/patch-libguile_pthread-threads.h ----- --- libguile/pthread-threads.h 2008-02-27 10:31:41.564950412 -0600 +++ libguile/pthread-threads.h 2008-02-27 10:36:08.383652510 -0600 @@ -26,6 +26,9 @@ */ #include +#if HAVE_PTHREAD_NP_H +# include +#endif #include /* Threads ----- files/patch-libguile_threads.c ----- --- ./libguile/threads.c.orig 2011-10-07 19:49:48.000000000 -0400 +++ ./libguile/threads.c 2011-12-06 05:29:36.754202532 -0500 @@ -120,8 +120,15 @@ void *start, *end; size_t size; +#if HAVE_PTHREAD_ATTR_GET_NP + pthread_attr_init (&attr); + pthread_attr_get_np (pthread_self (), &attr); + pthread_attr_getstack (&attr, &start, &size); + pthread_attr_destroy (&attr); +#elif HAVE_PTHREAD_GETATTR_NP pthread_getattr_np (pthread_self (), &attr); pthread_attr_getstack (&attr, &start, &size); +#endif end = (char *)start + size; #if SCM_STACK_GROWS_UP @@ -2200,6 +2207,20 @@ return (void *) ctx->uc_mcontext.sc_ar_bsp; } # endif /* linux */ +# ifdef __FreeBSD__ +# include +void * +scm_ia64_register_backing_store_base (void) +{ + return (void *)0x8000000000000000; +} +void * +scm_ia64_ar_bsp (const void *opaque) +{ + const ucontext_t *ctx = opaque; + return (void *)(ctx->uc_mcontext.mc_special.bspstore + ctx->uc_mcontext.mc_special.ndirty); +} +# endif /* __FreeBSD__ */ #endif /* __ia64__ */ -- dubiousjim@gmail.com From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 22 10:37:56 2011 Received: (at 10235) by debbugs.gnu.org; 22 Dec 2011 15:37:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdkiO-0003zM-4d for submit@debbugs.gnu.org; Thu, 22 Dec 2011 10:37:56 -0500 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62] helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdkiI-0003zA-Fn for 10235@debbugs.gnu.org; Thu, 22 Dec 2011 10:37:50 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 9B1A08C5D; Thu, 22 Dec 2011 10:35:35 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=h3RnMaYMCc3274xjfZg3TzKJqPc=; b=ne8KHT BovNGpLvNdXyUtgIwp40y/RvFwrtMgqCqOpnkvxxBjSS1CXumiNwZomXkjiat2Lw oaGzI9oaAgTWX14yB3dZDmX5Ru8vCUhbjp0fxEAdjFcFb0L97jLx6x2j44wmlPdD RXNWY9Zg5xWINdqzuLcLd2w/9UY3T03FnTGQM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=QG840o2BJkdAckV/drPmwB8vOjrcfCRI m/oWxAqzgQq8aDp1FT3V49q0iYcU11D+YJBeWlcDQ03/gRxxBt9vbd7DEeynickH 8qeWYtZpxlNpfU7+eP+Ag2UsZywZA8IL7i0sRLtRnBlkD6fdEBXMZmfKzn+2bjrR UEReC1i5xD0= Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 94B448C5C; Thu, 22 Dec 2011 10:35:35 -0500 (EST) Received: from badger (unknown [184.174.165.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 3F9D48C5B; Thu, 22 Dec 2011 10:35:35 -0500 (EST) From: Andy Wingo To: "Jim Pryor" Subject: Re: bug#10235: guile 2.0.3 segfaults on FreeBSD 9 References: <1323186803.10347.140661008137717@webmail.messagingengine.com> Date: Thu, 22 Dec 2011 10:35:33 -0500 In-Reply-To: <1323186803.10347.140661008137717@webmail.messagingengine.com> (Jim Pryor's message of "Tue, 06 Dec 2011 10:53:23 -0500") Message-ID: <87r4zwpqka.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pobox-Relay-ID: 975AA358-2CB2-11E1-A466-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10235 Cc: Amatus , 10235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Hi Jim, There are some packaging-specific things in your mail, one bug, and a few FreeBSD-related things that we should probably fold into Guile. I'll try to reply only to those things that we need to do in Guile. On Tue 06 Dec 2011 10:53, "Jim Pryor" writes: > REINPLACE_FILES= libguile/smob.c libguile/gc.c \ > libguile/mallocs.c libguile/gc-malloc.c > > post-patch: > @cd ${WRKSRC} ; sed -e 's|||g' I have fixed these files to use stdlib.h instead of malloc.h. > GEN guile-procedures.texi > Segmentation fault (core dumped) That's a problem :) > And indeed if you just go to the libguile directory and execute the > build `guile` file manually, you get a segfault. Here is the backtrace: > > #0 0x000000080091f8a5 in scm_c_vm_run () from > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 > [New Thread 802807400 (LWP 104574/guile)] > (gdb) bt > #0 0x000000080091f8a5 in scm_c_vm_run () from > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 > #1 0x0000000800895e17 in scm_async_click () from > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 > #2 0x00000008008f952f in scm_make_smob_type () from > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 Can you get a backtrace with symbols? Also, once you have built a version with symbols, I would like to see what is triggering this async, and what the error is. So if you could run: GUILE_AUTO_COMPILE=0 libtool --mode=execute gdb libguile/guile and see what happens, that would be great. You will likely be able to reproduce this error that way. > --- ./configure.ac.orig 2011-10-07 19:49:48.000000000 -0400 > +++ ./configure.ac 2011-12-06 09:35:02.484201526 -0500 > @@ -657,7 +657,7 @@ > # > AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h limits.h malloc.h > memory.h process.h string.h \ > regex.h rxposix.h rx/rxposix.h sys/dir.h sys/ioctl.h sys/select.h \ > -sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \ > +sys/time.h sys/times.h sys/stdtypes.h sys/types.h \ > sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \ > direct.h langinfo.h nl_types.h machine/fpu.h poll.h sched.h]) Why did you need to do this? > +# pthread_np.h - available on FreeBSD I applied this and the supporting code, with some small changes. Thanks. I also applied the itanium patch. > -#if defined (sparc) || defined (__sparc__) || defined (__sparc) > +#if (defined (sparc) || defined (__sparc__) || defined (__sparc)) && \ > + (!defined(__FreeBSD__)) > # define SCM_FLUSH_REGISTER_WINDOWS asm("ta 3") > #else > # define SCM_FLUSH_REGISTER_WINDOWS /* empty */ Why is this? > ----- files/patch-libguile_gen-scmconfig.c ----- > --- libguile/gen-scmconfig.c 2008-02-23 21:38:39.310330888 -0600 > +++ libguile/gen-scmconfig.c 2008-02-23 21:39:32.909873567 -0600 > @@ -123,6 +123,7 @@ > > #include "gen-scmconfig.h" > > +#define _ANSI_SOURCE > #include > #include > Why is this? > ----- files/patch-libguile_numbers.c ----- > --- ./libguile/numbers.c.orig 2011-10-10 16:24:38.000000000 -0400 > +++ ./libguile/numbers.c 2011-12-06 05:26:45.391199972 -0500 > @@ -148,7 +148,7 @@ > > > #if defined (GUILE_I) > -#if defined HAVE_COMPLEX_DOUBLE > +#if defined HAVE_COMPLEX_DOUBLE && (defined HAVE_CLOG || defined > HAVE_CLOG10 || defined HAVE_CEXP || defined HAVE_USABLE_CSQRT) && > defined (SCM_COMPLEX_VALUE) > > /* For an SCM object Z which is a complex number (ie. satisfies > SCM_COMPLEXP), return its value as a C level "complex double". */ Why is this? OK, I think that's all that we need to do in Guile. If you can get back to me with some explanations on these patches and a transcript of your debugging session, that would be great. Also, if you are able to build from git, you will find some of your changes incorporated there. Thanks! Andy -- http://wingolog.org/ From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 22 16:43:38 2011 Received: (at 10235) by debbugs.gnu.org; 22 Dec 2011 21:43:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdqQL-00043N-L0 for submit@debbugs.gnu.org; Thu, 22 Dec 2011 16:43:38 -0500 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62] helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdqQF-00043C-Lx for 10235@debbugs.gnu.org; Thu, 22 Dec 2011 16:43:35 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 732A88FD9; Thu, 22 Dec 2011 16:41:19 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=R6Ki/hJ9dgvM5HpFYPB3oiHkvWs=; b=Im1pRb lYjQ+GrwHEf94RlNzml9IeS7UYYPWS0Xb/FIoukx0kGbEB3RGqnJT7nenFD1K5uj qihFNSGFmgNAJ+/ckUefOdxDRn5jIWPCaiKRE5FaH9bPsF+6PvS0sabd5B0JpjmL ki+WEj+F1tvY37wwAUPs07vnHMiuipn1U/VMw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; q=dns; s=sasl; b=GVjIHphyXzwVqgd1YJZVBSoaFCYm3Onj rWq7c+9foEXOhJwHbmzjXxDrD0GxWqRfqjQZ0ePEBVGp/jZ0kA6XavHpfYt/QvxO THLdKrxmKkam8NfWMcSi9816hMivAEN7D3qowB4WSyoGXV7dKExzFwibE94GOBo/ KLQraerKb70= Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 6BAFF8FD8; Thu, 22 Dec 2011 16:41:19 -0500 (EST) Received: from badger (unknown [184.174.165.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 054538FD4; Thu, 22 Dec 2011 16:41:18 -0500 (EST) From: Andy Wingo To: "Jim Pryor" Subject: Re: bug#10235: guile 2.0.3 segfaults on FreeBSD 9 In-Reply-To: <1324569357.9323.140661014858397@webmail.messagingengine.com> (Jim Pryor's message of "Thu, 22 Dec 2011 10:55:57 -0500") References: <1323186803.10347.140661008137717@webmail.messagingengine.com> <87r4zwpqka.fsf@pobox.com> <1324569357.9323.140661014858397@webmail.messagingengine.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Date: Thu, 22 Dec 2011 16:41:16 -0500 Message-ID: <87fwgcp9mr.fsf@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pobox-Relay-ID: AEDAC214-2CE5-11E1-9D19-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10235 Cc: 10235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Hi Jim Thanks for the reply. Let's keep the bug in the Cc. (Sending again with the bug on the Cc this time.) There is no rush on this; I'm happy to work asynchronously. The git repo is indeed at http://git.savannah.gnu.org/cgit/guile.git; use the stable-2.0 branch, though. Cheers, Andy On Thu 22 Dec 2011 10:55, "Jim Pryor" writes: > Hi Andy, thanks for the email. I will get back to you about this as soon > as I have some time to look into it again---which I fear won't be > immediately. > > Some quick replies below. > > > On Thu, Dec 22, 2011, at 10:35 AM, Andy Wingo wrote: >> Hi Jim, >> >> There are some packaging-specific things in your mail, one bug, and a >> few FreeBSD-related things that we should probably fold into Guile. >> I'll try to reply only to those things that we need to do in Guile. >> >> On Tue 06 Dec 2011 10:53, "Jim Pryor" writes: >> >> > REINPLACE_FILES= libguile/smob.c libguile/gc.c \ >> > libguile/mallocs.c libguile/gc-malloc.c >> > >> > post-patch: >> > @cd ${WRKSRC} ; sed -e 's|||g' >> >> I have fixed these files to use stdlib.h instead of malloc.h. >> >> > GEN guile-procedures.texi >> > Segmentation fault (core dumped) >> >> That's a problem :) >> >> > And indeed if you just go to the libguile directory and execute the >> > build `guile` file manually, you get a segfault. Here is the backtrace: >> > >> > #0 0x000000080091f8a5 in scm_c_vm_run () from >> > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 >> > [New Thread 802807400 (LWP 104574/guile)] >> > (gdb) bt >> > #0 0x000000080091f8a5 in scm_c_vm_run () from >> > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 >> > #1 0x0000000800895e17 in scm_async_click () from >> > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 >> > #2 0x00000008008f952f in scm_make_smob_type () from >> > /usr/obj/usr/ports/lang/guile/work/guile-2.0.3/libguile/.libs/libguile-2.0.so.25 >> >> Can you get a backtrace with symbols? > > OK, I will do that. > >> Also, once you have built a version with symbols, I would like to see >> what is triggering this async, and what the error is. So if you could >> run: >> >> GUILE_AUTO_COMPILE=0 libtool --mode=execute gdb libguile/guile >> >> and see what happens, that would be great. You will likely be able to >> reproduce this error that way. >> >> > --- ./configure.ac.orig 2011-10-07 19:49:48.000000000 -0400 >> > +++ ./configure.ac 2011-12-06 09:35:02.484201526 -0500 >> > @@ -657,7 +657,7 @@ >> > # >> > AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h limits.h malloc.h >> > memory.h process.h string.h \ >> > regex.h rxposix.h rx/rxposix.h sys/dir.h sys/ioctl.h sys/select.h \ >> > -sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \ >> > +sys/time.h sys/times.h sys/stdtypes.h sys/types.h \ >> > sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \ >> > direct.h langinfo.h nl_types.h machine/fpu.h poll.h sched.h]) >> >> Why did you need to do this? > > I don't know. Many of these patches are carried over from the existing > port on FreeBSD. (I think that's 1.8.8.) I'll see if I can get the > maintainer to explain, or experiment with omitting the patches and > seeing what breaks. > >> >> > +# pthread_np.h - available on FreeBSD >> >> I applied this and the supporting code, with some small changes. >> Thanks. I also applied the itanium patch. >> >> > -#if defined (sparc) || defined (__sparc__) || defined (__sparc) >> > +#if (defined (sparc) || defined (__sparc__) || defined (__sparc)) && \ >> > + (!defined(__FreeBSD__)) >> > # define SCM_FLUSH_REGISTER_WINDOWS asm("ta 3") >> > #else >> > # define SCM_FLUSH_REGISTER_WINDOWS /* empty */ >> >> Why is this? > > > I don't know, existing patch in the FreeBSD port that I just updated to > apply cleanly to the new version. As before, I'll try to find out more. > I don't have a sparc machine so I can't test what happens if the patch > is omitted. > > >> >> > ----- files/patch-libguile_gen-scmconfig.c ----- >> > --- libguile/gen-scmconfig.c 2008-02-23 21:38:39.310330888 -0600 >> > +++ libguile/gen-scmconfig.c 2008-02-23 21:39:32.909873567 -0600 >> > @@ -123,6 +123,7 @@ >> > >> > #include "gen-scmconfig.h" >> > >> > +#define _ANSI_SOURCE >> > #include >> > #include >> > >> >> Why is this? > > I think I had to add that to get the build to work on FreeBSD. I'll try > to get details for you. > > >> >> > ----- files/patch-libguile_numbers.c ----- >> > --- ./libguile/numbers.c.orig 2011-10-10 16:24:38.000000000 -0400 >> > +++ ./libguile/numbers.c 2011-12-06 05:26:45.391199972 -0500 >> > @@ -148,7 +148,7 @@ >> > >> > >> > #if defined (GUILE_I) >> > -#if defined HAVE_COMPLEX_DOUBLE >> > +#if defined HAVE_COMPLEX_DOUBLE && (defined HAVE_CLOG || defined >> > HAVE_CLOG10 || defined HAVE_CEXP || defined HAVE_USABLE_CSQRT) && >> > defined (SCM_COMPLEX_VALUE) >> > >> > /* For an SCM object Z which is a complex number (ie. satisfies >> > SCM_COMPLEXP), return its value as a C level "complex double". */ >> >> Why is this? > > > Ditto, I'll try to get details. > > >> >> OK, I think that's all that we need to do in Guile. If you can get back >> to me with some explanations on these patches and a transcript of your >> debugging session, that would be great. Also, if you are able to build >> from git, you will find some of your changes incorporated there. > > Sure, I'll use git. I assume this is the repo at > ? -- http://wingolog.org/ From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 27 18:07:03 2012 Received: (at request) by debbugs.gnu.org; 27 Nov 2012 23:07:03 +0000 Received: from localhost ([127.0.0.1]:42305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TdUF4-0002p6-Ul for submit@debbugs.gnu.org; Tue, 27 Nov 2012 18:07:03 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:37793) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TdUF3-0002od-7L for request@debbugs.gnu.org; Tue, 27 Nov 2012 18:07:01 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 6EE55AD58 for ; Wed, 28 Nov 2012 00:05:09 +0100 (CET) Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UTpP1Dc6FOlX for ; Wed, 28 Nov 2012 00:05:09 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 1C49EAD54 for ; Wed, 28 Nov 2012 00:05:09 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: request@debbugs.gnu.org Date: Wed, 28 Nov 2012 00:05:07 +0100 Message-ID: <87txsad4v0.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 10235 moreinfo thanks [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: request X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 10235 moreinfo thanks [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4996] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject tags 10235 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 17:15:20 2013 Received: (at 10235-close) by debbugs.gnu.org; 10 Mar 2013 21:15:20 +0000 Received: from localhost ([127.0.0.1]:44490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UEnaR-0006rt-Rj for submit@debbugs.gnu.org; Sun, 10 Mar 2013 17:15:20 -0400 Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:48610 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UEnaO-0006rh-Kp for 10235-close@debbugs.gnu.org; Sun, 10 Mar 2013 17:15:18 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 80D90BF99 for <10235-close@debbugs.gnu.org>; Sun, 10 Mar 2013 17:14:25 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=BgcaMQkJ8X3sEX8otlf6CJoHDdQ=; b=DUU/ur c2TgJmGbCaToLTdPmfcZwVKpMBEno8VRRAdzf5LLMHTbiNZpYJ2gH+cX5jnZGp+V ZSKr6JxMqYgcT2qDz96CP0pWKVjUEJLvdwWjILbqyyNvO3irKwdQ0nw7Y8SIjNM6 QPxU74Ait0SSFG1D+QjErgyfuAo51lGykl8qE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=lr65pD2YaMnIyr85mVHuMlZSsoymRy4S YbLyB061ihYzfkybdV66MXuI5NbpNkho8AjrlriYw5whwWyfYVkg7zXMZ6co4om3 7IV3q5vhRvZ+EKqzVK8H0fbA5b6wMZ9BmzqTgDPylFm76f0AFqJMdFNpKQkKjdcA +1u2Kj1wDMA= Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 79D5CBF98 for <10235-close@debbugs.gnu.org>; Sun, 10 Mar 2013 17:14:25 -0400 (EDT) Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 00FD2BF97 for <10235-close@debbugs.gnu.org>; Sun, 10 Mar 2013 17:14:24 -0400 (EDT) From: Andy Wingo To: 10235-close@debbugs.gnu.org Subject: Re: bug#10235: guile 2.0.3 segfaults on FreeBSD 9 References: <1323186803.10347.140661008137717@webmail.messagingengine.com> <87r4zwpqka.fsf@pobox.com> <1324569357.9323.140661014858397@webmail.messagingengine.com> <87fwgcp9mr.fsf@pobox.com> Date: Sun, 10 Mar 2013 22:14:21 +0100 In-Reply-To: <87fwgcp9mr.fsf@pobox.com> (Andy Wingo's message of "Thu, 22 Dec 2011 16:41:16 -0500") Message-ID: <87boarufde.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 7C4A3100-89C7-11E2-9C0E-59240E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 10235-close X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) Closing this report due to lack of information. Please file a new bug with new build issues. Thanks! Andy -- http://wingolog.org/ From unknown Thu Aug 14 21:52:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 08 Apr 2013 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator