drscheme (version 370) is currently marked BROKEN (Fails to install (signal 11)). On my machine, if BROKEN is commented out of the Makefile, then it doesn't even build. Previous versions have built successfully under FreeBSD-6, and version 3.99.0.4, from the PLT subversion repository also builds and installs just fine. Fix: Uncomment the patch line, above, where the named file contains the following: The second patch, to sighand.c copes with the change in delivered signal on a memory page fault, in FreeBSD-7. The first patch, to wx_keym.cxx seems to relate to some extra strictness in the xform.ss program.--YKbF5M141OjuzNkOmG7jjyfaLXOqakpPl0zz5IyOy5vfl4FJ Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" diff -ur plt-371.3/src/mred/wxme/wx_keym.cxx plt-371.3.new/src/mred/wxme/wx_keym.cxx --- plt-371.3/src/mred/wxme/wx_keym.cxx 2007-08-03 02:56:05.000000000 +1000 +++ plt-371.3.new/src/mred/wxme/wx_keym.cxx 2007-12-18 17:19:10.000000000 +1100 @@ -512,14 +512,20 @@ if (i >= MAX_BUF - 1) return 0; buffer[i] = keyseq[kp]; - if (buffer[i] < 128) - buffer[i] = tolower(buffer[i]); + if (buffer[i] < 128) { + wxchar t; + t = tolower(buffer[i]); + buffer[i] = t; + } } buffer[i] = 0; code = 0; if (buffer[1]) { - if (buffer[0] < 128) - buffer[0] = tolower(buffer[0]); + if (buffer[0] < 128) { + wxchar t; + t = tolower(buffer[0]); + buffer[0] = t; + } for (i = 0; keylist[i].str; i++) { if (!wx_c_strcmp(buffer, keylist[i].str)) { code = keylist[i].code; diff -ur plt-371.3/src/mzscheme/gc2/sighand.c plt-371.3.new/src/mzscheme/gc2/sighand.c --- plt-371.3/src/mzscheme/gc2/sighand.c 2007-08-08 22:11:24.000000000 +1000 +++ plt-371.3.new/src/mzscheme/gc2/sighand.c 2007-12-18 16:56:53.000000000 +1100 @@ -27,13 +27,14 @@ /* As of 2007/06/29, this is a guess for NetBSD! */ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # include <signal.h> +# include <sys/param.h> void fault_handler(int sn, siginfo_t *si, void *ctx) { if (!designate_modified(si->si_addr)) abort(); } # define NEED_SIGACTION -# if defined(__FreeBSD__) +# if defined(__FreeBSD__) && (__FreeBSD_version < 700000) # define USE_SIGACTON_SIGNAL_KIND SIGBUS # else # define USE_SIGACTON_SIGNAL_KIND SIGSEGV How-To-Repeat: This is the script that I've been using to try building outside of the ports tree. Ports has ver=370. The current release is 371, and 371.3 is available as a pre-release, which is what I've used here. If the maintainer could upgrade, as well as apply this patch, that'd be neat, too. #!/bin/sh -v ver=371.3 rm -rf plt-${ver} tar xvfz ../Desktop/plt-${ver}-src-unix.tgz #patch -p0 <plt-${ver}-sigsegv.patch cd plt-${ver}/src PREFIX=/usr/local X11BASE=/usr/local CFLAGS="-O2 -fno-strict-aliasing -pipe -g" LDFLAGS=-L/usr/local/lib CPPFLAGS="-I/usr/local/include -DLONG64" LIBTOOL=/usr/local/bin/libtool ./configure --prefix=${PREFIX} --enable-shared --enable-xft --enable-gl \ --enable-xrender --enable-cairo --with-x --enable-pthread \ --enable-lt=${LIBTOOL} \ --x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib \ CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ CPPFLAGS="${CPPFLAGS}" \ --mandir=/usr/local/man amd64-portbld-freebsd7.0 gmake
Responsible Changed From-To: freebsd-ports-bugs->jkoshy Over to maintainer (via the GNATS Auto Assign Tool)
A short update: DrScheme v372 (which incorporates the changes in the patch in this PR) fails to build on my amd64/8-current box. The symptoms are a SIGBUS when mzscheme is first run during the build. Tweaking sysctl "machdep.prot_fault_translation" to causes the build to fail in other ways. I'll investigate further on i386 and/or FreeBSD 7. Regards, Koshy
On Thu, 03 Jan 2008 05:49:22 -0000 Joseph Koshy <jkoshy@FreeBSD.org> wrote: > A short update: DrScheme v372 (which incorporates the changes in > the patch in this PR) fails to build on my amd64/8-current box. > The symptoms are a SIGBUS when mzscheme is first run during the > build. Tweaking sysctl "machdep.prot_fault_translation" to causes > the build to fail in other ways. I'll investigate further on i386 > and/or FreeBSD 7. Just built and installed 372 on my and64/7-STABLE system. Seems to be working fine. My 7-STABLE system was last updated on 29 Dec, fwiw. Cheers, -- Andrew
On Thu, 03 Jan 2008 05:49:22 -0000 Joseph Koshy <jkoshy@FreeBSD.org> wrote: > A short update: DrScheme v372 (which incorporates the changes in > the patch in this PR) fails to build on my amd64/8-current box. > The symptoms are a SIGBUS when mzscheme is first run during the > build. Tweaking sysctl "machdep.prot_fault_translation" to causes > the build to fail in other ways. I'll investigate further on i386 > and/or FreeBSD 7. Hmm. Mred (aka drscheme) is now failing in a way that sounds similar, for me, on 7-STABLE. I've tried a a bunch of source fixes (it now compiles with -Werror-implicit-function-declaration, which is usually important for 64-bit issues) but they haven't helped. This is all particularly frustrating because mzscheme itself seems to have no problems, only mred. So I suspect the wxwindows libraries, but the segv failure appears to happen before then. One other factor that might impact: I've got 3G RAM in this box now, instead of the 1G that I had before. Maybe some aliasing/truncation issues are showing up? Anyway, to tackle this from another angle (and because at about the time drscheme stopped working, epiphany started to crash too), I'm planning to try regressing my FreeBSD environment to a time when it worked, and see if I can figure out what has changed... Since the fault seems to be in the garbage collector, do you know of a place where the FreeBSD/amd64 virtual memory map is described? It'd be nice to be able to recognize bogus addresses as such, in the debugger. Cheers, -- Andrew
On Sat, Jan 19, 2008 at 06:26:52PM +1100, Andrew Reilly wrote: > Anyway, to tackle this from another angle (and because at about > the time drscheme stopped working, epiphany started to crash > too), I'm planning to try regressing my FreeBSD environment to > a time when it worked, and see if I can figure out what has > changed... Yep, works with a kernel/userland built from a check-out dated 4 Jan 2008. Guess I need to binary-search to the point where it stops working... This could be a drag. -- Andrew
Try this set of patches. Most are incidental missing-prototype clean-ups, and one converts a macro into an inline function, so that it was easier to debug, but the other (converting malloc to calloc in two places) is essential. -- Andrew
Responsible Changed From-To: jkoshy->freebsd-ports-bugs Resetting maintainership of lang/drscheme.
State Changed From-To: open->closed Committed, thanks!
pav 2008-06-19 02:50:47 UTC FreeBSD ports repository Modified files: lang/drscheme Makefile Added files: lang/drscheme/files patch-sighand.c patch-wx_keym.cxx Log: - Fix segfaults, unbreak - Add missed xorg dependency PR: ports/118808 Submitted by: Andrew Reilly <areilly@bigpond.net.au> Revision Changes Path 1.40 +1 -3 ports/lang/drscheme/Makefile 1.1 +22 -0 ports/lang/drscheme/files/patch-sighand.c (new) 1.1 +28 -0 ports/lang/drscheme/files/patch-wx_keym.cxx (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"